Skip to main content

A lightweight terminal-based AI coding assistant

Project description

nanocode

A lightweight terminal-based AI coding assistant.

nanocode is used to help building itself, including features such as @file path completion.

Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, configuration, and behavior may change incompatibly before a 1.0 release.

Screenshots

Screenshot 1 Screenshot 2

Features

  • Constrained Output: Force model replies into auditable action frames.
  • Verified Edits: Reject stale range edits before they touch files.
  • Autonomous Loop: Chain reading, editing, running, and verification.
  • Live Telemetry: Stream tool intent, token use, and status.

Install

uv tool install nanocode-cli

Upgrade an existing install:

uv tool upgrade nanocode-cli

For local development:

uv sync --extra dev
uv run nanocode

Usage

Start nanocode:

nanocode

Show available commands:

/help

Ask a source-aware question about nanocode itself:

/help how does compact work?

CLI arguments:

  • --yolo: Skip tool execution confirmations.
  • --plan: Plan changes without editing files or running commands.
  • --debug: Write request prompts to the current session directory under ~/.nanocode/sessions/.
  • --config <path>: Path to config file (default: ~/.nanocode/config.toml).
  • --init-config: Create a default config file.
  • -v, --version: Show program version.

Safety

nanocode does NOT provide sandbox protection. It can run shell commands and edit files in the environment where you start it.

If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.

USE AT YOUR OWN RISK.

Tools

  • File: Read, LineCount, ListDir, Search.
  • Edit: Edit, ReplaceRange.
  • Shell: Bash, Git.
  • Memory: Recall reads stored tool results by key.

Commands

  • Info: /help [question], /status, /rules, /knowledge, /compact.
  • Config: /config, /set <key> <value>, /model [model_name], /reason, /provider [name], /plan [on|off|question], /yolo.
  • Maintenance: /clean.
  • Exit: /exit, /quit.

/model groups configured available_models first, then any extra models automatically discovered from the provider. In selectors, use j/k or arrow keys to move, /keyword to filter choices, Enter to select, and Esc to step back or cancel. /model <model_name> sets a model directly. Changing model also opens a reasoning effort selector: choose off to disable reasoning, or choose an effort to enable reasoning and set it. Use /reason to change reasoning without changing model.

Configuration

Run nanocode --init-config to create ~/.nanocode/config.toml.

  • Provider config: [provider] active = "<name>" plus [provider.<name>] url, key, model, available_models, and model options. reasoning_payload controls whether effort is sent as reasoning, reasoning_effort, or not sent.
  • Path config: [paths] data_dir = "~/.nanocode".
  • Runtime config: [runtime].
  • Session data: debug prompts and tool-result logs are stored under ~/.nanocode/sessions/<session_id>/.
  • Tool-result logs from inactive sessions are auto-cleaned after runtime.auto_clean_recent (default 3d; use off to disable). /clean removes inactive session logs immediately.
  • Project data: user rules are stored under ~/.nanocode/projects/<project_key>/.

Status

  • Status bar: active model, reasoning, active yolo/plan modes, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
  • /status: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens, task, goal, and verification.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanocode_cli-0.3.28.tar.gz (78.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanocode_cli-0.3.28-py3-none-any.whl (76.6 kB view details)

Uploaded Python 3

File details

Details for the file nanocode_cli-0.3.28.tar.gz.

File metadata

  • Download URL: nanocode_cli-0.3.28.tar.gz
  • Upload date:
  • Size: 78.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nanocode_cli-0.3.28.tar.gz
Algorithm Hash digest
SHA256 19e13b3a2fd864ab3ddd07612ec12dbef8d5ae1d6a0e39278cf492fa6f8839c7
MD5 df94ac553b5f4da768692dea9ebd9809
BLAKE2b-256 9067ec8d962f9888b79420cb9092bd39de452f568c555fcf6eab46fe878a03a3

See more details on using hashes here.

File details

Details for the file nanocode_cli-0.3.28-py3-none-any.whl.

File metadata

  • Download URL: nanocode_cli-0.3.28-py3-none-any.whl
  • Upload date:
  • Size: 76.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nanocode_cli-0.3.28-py3-none-any.whl
Algorithm Hash digest
SHA256 107b1bfa6519bee90b0469dca8071a9890ce3e6b976f3b2c02dd032bcf85e1c2
MD5 db6b09a44bef8a9a4f01120482f061c8
BLAKE2b-256 d339b61a15c67376be53542fd60cd05c503ed31473ee03dd4d6e0480b0f85c59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page