Show HN: A tiny shell agent in Rust A developer has released nano-agent, a lightweight shell agent written in Rust that interfaces with any OpenAI-compatible API to execute commands with user approval. The tool, available via Cargo install, offers both one-shot prompting and an interactive REPL mode, with features including MCP tool support, planning mode, and optional sandboxing via bwrap. The agent requires explicit user approval before running any command, positioning it as a security-conscious alternative for developers seeking AI-assisted terminal operations. A tiny shell agent in Rust. Talks to any OpenAI-compatible API, runs commands with your approval, and stays out of the way. cargo install --path . export OPENAI API KEY=sk-... nano-agent "what's in this repo?" That's it. Run nano-agent with no arguments for an interactive REPL. nano-agent "fix the failing test" one-shot prompt nano-agent REPL nano-agent -c continue last session here nano-agent -s pick a recent session Every command the agent wants to run is shown first: bash $ cargo test Approve? y Approve a Approve All n Deny: In the REPL: :q quits, :reset starts over, end a line with \ for multiline. Point it anywhere with an OpenAI-compatible API: export OPENAI BASE URL=http://localhost:11434/v1 e.g. Ollama export OPENAI MODEL=gemma4 Or keep providers in ~/.config/nano/config.json or ./nano config.json : { "provider": "local", "custom providers": { "local": { "provider type": "openai", "base url": "http://localhost:11434/v1", "api key": "", "model": "gemma4" } } } See example config.json /skorotkiewicz/nano-agent/blob/main/example config.json for the full format. MCP tools — add servers under mcp servers in the config; their tools are exposed to the model automatically. Planning mode — prefix a message with /mito to talk to a separate local planning agent that prepares a detailed handoff before the main model acts enable mito-mode in the config . ACP — build with --features acp to run nano as an ACP stdio agent nano-agent --acp or to delegate subtasks to child agents configured under acp agents . A child's working directory is its sandbox boundary; without one, its tools are disabled. Useful environment variables: OPENAI API KEY , OPENAI BASE URL , OPENAI MODEL , NANO MAX STEPS , NANO SANDBOX=0 disable bwrap sandboxing . cargo test cargo test --features acp