Skip to content

Repository files navigation

NanoCode

A compact, terminal-native AI coding agent built with Node.js.

NanoCode is a minimal terminal coding agent. Adapt its small, readable agent loop to your workflow without working through a large framework. The model can inspect, modify, and validate a project with Read, Grep, Write, Edit, and Bash, while every tool call and result remains visible.

NanoCode ships with focused defaults but deliberately skips complex features such as sub-agents, plan mode, and plugin ecosystems. Instead, it focuses on the core mechanics of agent engineering: function calling, tool orchestration, human-in-the-loop approvals, workspace guardrails, context compaction, JSONL session persistence, and lightweight observability.

NanoCode runs in two modes: an interactive neon TUI for conversational coding and a one-shot print mode for scripts and automation.

Demo

Screen.Recording.2026-08-26.at.11.24.28.mov

Architecture

NanoCode architecture: modes feed context into a bounded LLM and tool loop, followed by a reply and JSONL session persistence

Quick start

Requires Node.js 22.19+ and an OpenRouter API key.

npm install
npm link
cp .env.example .env
nano-code
nano-code                 # new interactive session
nano-code --continue      # resume latest session
nano-code -p "your task"  # one-shot mode

Interactive commands: /help · /new · /save · /exit

Stack

Node.js · OpenRouter · OpenAI-compatible API · pi-tui · Chalk

Test

npm test
npm run check

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages