Show HN: Aictl – A native AI agent for terminal and macOS, in Rust
Aictl is a native AI agent for terminal and macOS, written in Rust. It provides a single binary with CLI, desktop app, and server components, supporting multiple AI providers with built-in security and extensibility.
v0.45.1 · Rust · single binary · open source
aictl
Native AI agent for your terminal and macOS desktop. Run cloud and local AI models through one secure runtime.
$ curl -sSf https://aictl.app/install.sh | sh
Get startedRun serverGet in touchView on GitHub
aictl
summarize report.pdf
three takeaways
// aictl-desktop
Desktop app
Native macOS app with a graphical chat UI. Same providers, tools, sessions, and agents as the CLI — in a window.
Read more →
$ aictl --auto
› draft release notes from git log
✓ git log · 47 commits
✓ search_files · 12 matches
↳ write_file CHANGELOG.md
// aictl-cli
Command-line interface
Single binary for macOS and Linux. Interactive REPL or one-shot. 35 built-in tools, security policy on by default.
Read more →
POST/v1/chat/completions
GET/v1/models
GET/healthz
200openai · 1.2s
// aictl-server
LLM HTTP proxy server
Second binary, aictl-server. OpenAI-compatible HTTP proxy — point any OpenAI-compatible SDK at it and reach every provider behind one master key.
Read more →
aictl-core rust
Security Layer part of aictl-core
Cloud LLM APIsOllamaLocal · MLX / GGUF
A single Rust crate — aictl-core — powers all three. The agent loop, providers, tools, security, and sessions live in one library.
SESSION9ee82912· 2 messages
ClearRetryUndoCompact
USER
describe in one sentence contents of this dir
ASSISTANT
Let me look at the directory contents.
TOOLlist_directory
[FILE] Cargo.toml [FILE] LICENSE [DIR] .aictl [FILE] AICTL.md [DIR] target [FILE] install.sh [DIR] tests [DIR] website [DIR] .claude [FILE] CLAUDE.md [DIR] src
ASSISTANT
This directory is the root of the aictl Rust workspace, containing source crates (aictl-cli, aictl-core, aictl-server, aictl-desktop), docs, install scripts, and standard project files.
Type a message
$ curl -sSf https://aictl.app/install.sh | sh
⌥⌘1aictl
[-_-] aictl 0.45.1 (latest) — AI agent in your terminal |_| anthropic · claude-sonnet-4-6 35 tools · dir: aictl/ cwd jail: on · subshell blocked · timeout: 30s · disabled tools: 0 keychain (0 locked · 9 plain · 0 both) session: 9ee82912-c760-4444-bfe8-0bc000c173c0 Type a message or /help for commands. Exit with "exit" or Ctrl+D
❯describe in one sentence contents of this dir
Let me look at the directory contents.
list_directory ──
[FILE] Cargo.toml [FILE] .DS_Store [FILE] LICENSE [DIR] .aictl [FILE] AICTL.md [DIR] target [FILE] install.sh [DIR] tests [DIR] website [DIR] .claude … 11 lines hidden … [FILE] CLAUDE.md [DIR] src
─────────────────────────────────────────────────────────────────────────── claude-sonnet-4 · 3↑ (4320⚡) · 69↓ · 1 tool(s) · $0.0024 · 3.2s · ctx 1%
This is the aictl Rust CLI project — an AI agent tool with source code, documentation (README, ARCH, ROADMAP), pricing references, a website, examples, tests, GitHub CI config, and an install script.
─────────────────────────────────────────────────────────────────────────── claude-sonnet-4 · 221↑ (4320⚡) · 53↓ · 1 tool(s) · $0.0031 · 2.3s · ctx 2%
─────────────────────────────────────────────────────────────────────────── 2 reqs · 1 tool(s) · 224↑ · 122↓ · $0.0054 · 6.3s · ctx 2%
❯
$ curl -fsSL https://aictl.app/server/install.sh | sh
~ aictl-server
$ aictl-server
aictl-server v0.45.1 — OpenAI-compatible LLM proxy
listeninghttp://127.0.0.1:7878
master keyresolved from keyring
providersopenai · anthropic · gemini · grok · mistral · deepseek · kimi · zai · ollama
audit~/.aictl/server-audit.log
redactionon (regex + entropy)
● ready
[14:32:18]POST/v1/chat/completionsopenai · gpt-4o-mini2001.24s
[14:32:21]POST/v1/chat/completionsanthropic · sonnet-4-62002.18s
[14:32:24]GET/v1/models2003ms
[14:32:25]POST/v1/chat/completionsdeepseek · v32003.41s
[14:32:28]GET/v1/stats20012ms
[14:32:30]POST/v1/chat/completionsgemini · 2.5-flash2000.97s
Agent loop
Interactive REPL and one-shot mode. Up to 20 tool iterations per turn with confirmation or autonomous execution via --auto. Press Esc to cancel any in-flight call and roll back the turn.
Tools
35 built-in tools spanning shell, files, archives, checksums, clipboard, notifications, web, documents, images, maps, code execution, math, JSON / CSV queries, host probing, and long-term memory. Every call is gated by the security policy. Review with /tools.
Context
/context shows live token and message usage vs. model limits; /compact summarizes the conversation on demand, and the REPL auto-compacts above AICTL_AUTO_COMPACT_THRESHOLD (default 80%).
Sessions
Every REPL run is a session. Persist, name, and resume via /session, or start a private run with --incognito. Full conversation history stored as JSON under ~/.aictl/sessions.
Agents
Reusable system prompts as plain text. Create manually, generate with an LLM, or pull curated ones from the catalogue via /agent. Load on startup with --agent .
Skills
One-turn markdown playbooks under ~/.aictl/skills/. Invoke with / or --skill — the body drives a single turn, then evaporates. Manage via /skills.
Plugins
Add custom tools without forking. Drop an executable plus a plugin.toml manifest into ~/.aictl/plugins//; aictl pipes the tool body in on stdin and returns stdout to the model. Opt in with AICTL_PLUGINS_ENABLED=true; manage via /plugins.
Hooks
Shell commands the harness fires at lifecycle events — SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, and more. Block, approve, rewrite a prompt, or inject context via JSON on stdout. Configured in ~/.aictl/hooks.json; manage via /hooks.
MCP servers
Connect Model Context Protocol servers as a source of additional tools. Declare servers in ~/.aictl/mcp.json (Claude Desktop-compatible shape); their tools merge into the agent loop as mcp____. Opt in with AICTL_MCP_ENABLED=true; manage via /mcp.
Security first
CWD jail, blocked paths, shell command allowlists, environment scrubbing, subshell blocking, injection guard, output sanitization, per-session audit log, and opt-in credential / PII redaction at the network boundary. On by default. Review policy with /security.
Key storage
API keys in macOS Keychain or Linux Secret Service. Transparent fallback to plain text when no keyring is available. Lock and unlock on demand via /keys.
Cost meter
Every turn reports token usage, estimated cost, and execution time. Daily and monthly usage stats under /stats.
OpenAI
Anthropic
Google Gemini
xAI Grok
Mistral
DeepSeek
Kimi
Z.ai
Ollama
GGUF experimental
MLX Apple Silicon
AICTLHTTP proxy
switch models mid-session — context of your conversation stays
System
exec_shell — run shell commands
read_file · write_file · edit_file
remove_file · create_directory
list_directory · find_files
search_files — grep across the tree
diff_files — unified diff between two files
archive — tar.gz / tgz / tar / zip create, extract, list
checksum — streaming SHA-256 / MD5 digests
git — restricted status / diff / log / blame / commit
Web & media
fetch_url · extract_website
search_web_fc — via Firecrawl (primary)
search_web_ddg — via DuckDuckGo (fallback, no key)
fetch_datetime · fetch_geolocation
read_image — vision across providers
generate_image — DALL·E, Imagen, Grok
read_document — PDF, DOCX, spreadsheets
view_map — OpenStreetMap / satellite pins (desktop)
draw_chart — Chart.js line / bar / pie / scatter (desktop)
Code & data
run_code — python, node, ruby, perl, lua, bash
lint_file — auto-selected linter per extension
json_query — jq-style JSON filters
csv_query — SQL-like over CSV/TSV
calculate — safe math expression evaluator
Host & network
list_processes — structured ps with filters
check_port — TCP reachability probe
system_info — OS, CPU, memory, disk
clipboard — read / write the system clipboard
notify — desktop notifications (macOS, Linux)
save_memory — persist a fact to long-term memory
Dedicated coding capabilities may be added in the future. If you are looking for an AI agent specialized in software development today, consider Claude Code, Codex, or opencode — they are purpose-built for that workflow.
General purpose, not IDE-only
Most AI coding tools live inside an editor — Copilot in VS Code, Cursor and Windsurf as IDE forks. aictl is a general-purpose agent: write code, research topics, process documents, analyze images, query the web — all from a single terminal session.
Provider neutral
Claude Code is Anthropic-only. Codex and ChatGPT are OpenAI-only. Gemini CLI is Google-only. aictl gives you twelve providers behind one interface — switch from Anthropic to Grok to a local model mid-session and your conversation context stays.
Local inference built in
Native GGUF via llama.cpp is compiled into the binary. No Python, no Ollama server (unless you want it), no sidecar — just the model file and aictl. ChatGPT, Copilot, and Codex have no local path at all. Native MLX on Apple Silicon is supported too — the macOS aarch64 release ships with mlx.metallib placed next to the binary; every other platform's release contains just the aictl binary.
Single binary, zero runtime
One curl and you are running. No Node.js (Claude Code, Codex), no Electron (Cursor, Windsurf), no runtime at all. The Rust binary has no dependencies on macOS or Linux.
Security on by default
CWD jail, shell allowlists, environment scrubbing, prompt injection guard, output sanitization, per-session audit log, and opt-in credential & PII redaction at the network boundary — all shipped out of the box. Most CLI agents run tools with full user privileges and no guardrails. Review the full policy with /security.
Keyring-native secrets
API keys stored in macOS Keychain or Linux Secret Service — not in a dotfile or environment variable. Transparent fallback when no keyring is available. Lock and unlock on demand via /keys.
Cross-provider cost meter
Every turn reports tokens, estimated cost, and wall time. Daily and monthly stats via /stats. When you switch between providers with very different pricing, you see the impact immediately — no separate billing dashboard required.
No subscription, no account
ChatGPT, Copilot, Cursor, and Windsurf require paid subscriptions and vendor accounts. aictl is a free binary — bring your own API keys, pay only for the tokens you use, and keep full control of your data.
Open source
The full source is on GitHub under the PolyForm Noncommercial License. Read it, modify it, learn from it. No telemetry, no analytics, no phone-home — the binary does exactly what you tell it to.
Open the DMG and drag aictl.app into /Applications. Signed with a Developer ID and notarized by Apple — opens cleanly on first launch.
01
Install
$ curl -sSf https://aictl.app/install.sh | sh
02
Configure
$ aictl --config
Interactive wizard for provider, model, and API keys. Stored in ~/.aictl/config or the system keyring.
03
Run
$ aictl
Omit --message to enter the interactive REPL, or pass one for single-shot mode.
Or build from source with Rust:
$ cargo install --path crates/aictl-cli --features "gguf mlx redaction-ner"
Note: the macOS Apple Silicon release ships with --features mlx enabled and includes a sibling mlx.metallib next to the binary (MLX needs the Metal library at runtime). Other platform releases contain just the aictl binary.
Or run inside Docker (multi-stage Rust build → debian:bookworm-slim):
$ docker build -f docker/cli.Dockerfile -t aictl .
$ docker run --rm -it -v "$HOME/.aictl:/home/aictl/.aictl" -v "$PWD:/workspace" aictl
The host's ~/.aictl mount carries config, keys, sessions, and audit between runs; the project mount is what the agent's read_file, write_file, and exec_shell tools operate on. Cargo features (gguf, redaction-ner) are off by default — opt in with --build-arg FEATURES=…. MLX is Apple-Silicon-only and never built in the Linux image.
For more information and usage instructions, see the docs.
Su
[truncated for AI cost control]