█

AI/TLDR

Buy me a coffee
Buy me a coffee

Nanocoder

A community-built terminal coding agent that runs on whichever model you point it at, local or hosted

Autonomous Coding AgentsOpen source
Language
TypeScript
License
MIT
$npm install -g @nanocollective/nanocoder
IN SHORT

What is Nanocoder?

Nanocoder is an open-source coding agent that lives in your terminal. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed MIT. To get started: install the CLI.

Overview

Nanocoder is an open-source coding agent that lives in your terminal. You start it in a project directory, describe what you want in plain language, and it reads files, edits code, runs shell commands and reports back, asking for approval along the way according to the mode you picked. It is built by the Nano Collective, a community group rather than a company, and the project states plainly that there are no paid tiers and no closed-source features gating the useful parts.

The defining choice is that the model is yours. Nanocoder talks to local models through Ollama or to any OpenAI-compatible API, and the README names OpenRouter, Anthropic and Google as examples; the CLI also has device-code logins for GitHub Copilot and ChatGPT/Codex. Providers are declared in an `agents.config.json` file — per user, per project, or both — and a `--provider` / `--model` pair on the command line picks one for a single run. The collective frames this as a principle: the harness stays multi-provider so you are never tied to one vendor, and your code does not leave your machine unless you send it to a hosted model.

Control over what the agent may do is organised into five development modes, cycled with Shift+Tab: normal (confirm every tool that can change something), auto-accept (most tools run, but bash and commits still prompt), yolo (nothing prompts), plan (mutation tools are removed and the agent writes a plan for you to approve) and architect (edits run, then you keep or revert the whole turn). Around that sit the pieces you would expect from a mature agent: checkpoints you can roll back to, auto-saved sessions you can resume, context compaction, a task list, and a `@` file picker with line-range support.

It is also built to be extended and embedded. Skills bundle custom slash commands, subagents with their own context and model, model-callable shell-script tools and cron or file-change triggers run by a per-project daemon. Lifecycle hooks run your own shell command before or after a tool call and can veto it. MCP servers add tools, `nanocoder --acp` turns it into an Agent Client Protocol server for editors such as Zed, and a VS Code extension shows live diffs of proposed changes. A non-interactive `run` command with optional JSON output covers scripts and CI.

What it does

  • Bring your own model: local models via Ollama or any OpenAI-compatible API, configured per user or per project in agents.config.json and switchable mid-session with /model
  • Five development modes — normal, auto-accept, yolo, plan and architect — cycled with Shift+Tab or chosen at launch with --mode
  • Checkpoints, auto-saved and resumable sessions, context compaction and a built-in task list for long pieces of work
  • Skills that bundle slash commands, subagents, custom shell-script tools and cron or file-change triggers, plus lifecycle hooks that can block a tool call
  • MCP servers for extra tools, an ACP server mode for Zed and other editors, and a VS Code extension with live diff previews
  • Headless `nanocoder run` for scripts and CI, with a --json flag that prints one structured result object, and a `nanocoder review` command for branch or PR diffs

Getting started

Nanocoder is a Node.js CLI published on npm, with Homebrew and Nix Flakes as alternatives. You install it once, then run it inside whichever project you want to work on.

Install the CLI

npm is the documented default. On macOS or Linux you can use the project's own Homebrew tap instead.

bashbash
npm install -g @nanocollective/nanocoder

# or, with Homebrew
brew tap nano-collective/nanocoder https://github.com/Nano-Collective/nanocoder
brew install nanocoder

Start it in a project and add a provider

The first launch in a directory asks you to confirm that you trust it. Configure a provider when prompted, or open the interactive wizard with `/settings providers`. Providers are stored in `agents.config.json`.

bashbash
cd your-project
nanocoder
Animated capture of the Nanocoder terminal UI: the pixel-font Nanocoder banner, a tips panel, a status panel listing the working directory, config file, Ollama provider and model, theme and loaded preferences, and an input box asking what you would like help with, with normal mode shown underneath
Nanocoder's start screen shows which provider and model it is using, which config file it loaded and which mode it is in before you type the first request.Nanocoder README ↗

Give it project context

`nanocoder init` analyses the repository and writes an `AGENTS.md` that is loaded into every session. Bundled presets add stack-specific guidance, a `.nanocoderignore` and a `/check` command.

bashbash
nanocoder init
# or with a preset
nanocoder init --preset nextjs

Work interactively

Type a request and press Enter. Use `@` to attach a file (optionally a line range such as `@src/utils.ts:45-80`), `!` to run a shell command whose output becomes context, and Shift+Tab to change how much the agent may do without asking. `/help` lists every slash command.

Pick a provider and mode from the command line

Flags choose the provider, model and starting mode for one launch. The provider name must match one in your config.

bashbash
nanocoder --provider ollama --model llama3.1
nanocoder --mode plan

Run it headless

`run` executes one prompt and exits, auto-accepting tools by default; add `--mode` to change that. `--trust-directory` skips the first-run trust prompt in CI.

bashbash
nanocoder run "write unit tests for all functions in utils.js"
nanocoder --trust-directory --mode plan run "audit the auth module"

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when you want a terminal coding agent that runs against a local Ollama model, so the code and the prompts stay on your machine
  • Reach for it when your team mixes providers and you want one agent, one config file and one set of habits across all of them
  • Reach for it to script coding tasks in CI with `nanocoder run`, using plan mode for read-only audits and JSON output for parsing the result
  • Reach for it when you prefer a community-governed, MIT-licensed tool with no paid tier over a vendor's own agent

How Nanocoder compares

Nanocoder alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
opencode★ 230kOpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app.
Claude Code★ 158kAnthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands.
Orca★ 147kOpen-source desktop workspace that runs Claude Code, Codex, OpenCode and other CLI coding agents in parallel, each in its own git worktree, with a mobile companion app.
OpenAI Codex★ 137kOpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel.
Pi★ 125kMinimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks.
Gemini CLI★ 109kAn open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web.
autoresearch★ 101kKarpathy's minimal harness that hands a coding agent a single-GPU LLM training script and lets it run fixed five-minute experiments, keeping or discarding each change on its own.
Nanocoder★ 2.6kA community-built terminal coding agent that runs on whichever model you point it at, local or hosted