# nanocoder

> nanocoder is an open-source agent for ai models and llm tooling. Open-source coding agent for the terminal that works with local or hosted models. It is available on CLI, macOS, Linux and Self-hosted.

- **Kind:** Agent
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Self-hosted
- **Website:** https://docs.nanocollective.org/nanocoder
- **Repository:** https://github.com/nano-collective/nanocoder
- **GitHub stars:** 2,591
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [coding](https://ai-powered.com/categories/coding-agents)
- **Listing updated:** 2026-12-01

## About

Nanocoder is a terminal-based coding assistant that runs agentic coding sessions against whichever model you choose. You can point it at local models served through Ollama or at any OpenAI-compatible endpoint, including OpenRouter, Requesty, Anthropic and Google, so the choice of provider and the route your code takes stay in your hands.

Beyond interactive sessions, it offers a non-interactive run mode for single prompts, a review command that checks a branch or pull request for bugs, security issues and style problems, and a worktree command that opens a PR in an isolated git worktree for a focused coding session. It has fullscreen and inline rendering modes, and several development modes ranging from normal prompting to auto-accept and plan-first workflows.

The project is aimed at developers who want a coding agent without a subscription or vendor lock-in, and who prefer tooling they can read, modify and run on their own machine.

## Features

- **Multi-provider model support:** Connects to local Ollama models or any OpenAI-compatible API, letting you switch providers from the command line.
- **Non-interactive run mode:** Runs a single task from the shell with a chosen provider and model, useful for scripted analysis or refactors.
- **Branch and PR review:** Reviews a git branch or pull request for bugs, security issues and style violations from the terminal.
- **Isolated worktree sessions:** Checks out a pull request into a separate worktree so the original working tree is left untouched.
- **Development modes:** Offers normal, auto-accept, yolo, plan and architect modes to control how much the agent does without asking.
- **Flexible screen rendering:** Switches between a fullscreen layout with in-app scrolling and an inline mode that uses the native terminal scrollback.

## Good for

- Refactoring a module in a local repository using a model running on your own machine
- Reviewing a teammate's branch or pull request for bugs before merging
- Planning an audit of an authentication module before making changes
- Opening an open pull request in a separate worktree to test it interactively
- Running one-off code analysis from scripts with a chosen provider

## FAQ

### Does Nanocoder require a paid plan?

No. The project states it has no paid tiers gating its features and no closed-source components.

### Which model providers can nanocoder use?

Local models through Ollama and any OpenAI-compatible API, with OpenRouter, Requesty, Anthropic and Google named as examples.

### How is nanocoder installed?

It installs globally with npm as @nanocollective/nanocoder, and is also available through Homebrew and Nix Flakes.

### What does the worktree command need?

It requires Git, an authenticated gh CLI and an interactive terminal.

### What are the best alternatives to nanocoder?

The closest alternatives to nanocoder are opencode, Harny, agenc-core, openclaude and omk.

## Where this comes from

- Description: written from the project's README and the project's website.

## Alternatives

- [opencode](https://ai-powered.com/agents/opencode-2): opencode is a freemium open-source agent for coding.
- [Harny](https://ai-powered.com/agents/harny-2): Harny is an open-source agent for coding.
- [agenc-core](https://ai-powered.com/agents/agenc-core): agenc-core is an open-source agent for coding.
- [openclaude](https://ai-powered.com/agents/openclaude): openclaude is an open-source agent for coding.
- [omk](https://ai-powered.com/agents/omk): omk is an open-source agent for ai models and llm tooling.
- [CoderBaba](https://ai-powered.com/agents/coderbaba): CoderBaba is a free open-source agent for coding.
- [Agav](https://ai-powered.com/agents/agav): Agav is an open-source agent for coding.
- [open-code-review](https://ai-powered.com/agents/open-code-review): open-code-review is an open-source agent for ai models and llm tooling.

---
Source: https://ai-powered.com/agents/nanocoder
