Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

minacode

minacode editing code and running tools

A coding agent I use, maintain, and customize, shipped as a small, focused Python package.

中文

Safety

Use at your own risk. minacode can edit files and run shell commands in the environment where it starts. It does not provide sandbox isolation; use a container or VM when needed.

What it is

minacode does not introduce a new kind of coding agent. It combines familiar features — reading and editing files, running commands, follow-ups, sessions, diffs, MCP, and skills — into a tool I use personally.

It works on real repositories, including its own: I use minacode to build and maintain minacode. Everything ships in a small, focused Python package, so I can change the behavior directly whenever I want the workflow to work differently.

minacode is the former nanocode. It started as a single-file agent small enough to be called nano, but has since grown beyond a single file, so it now goes by minacode.

minacode resuming a saved session

Resuming a saved session with its conversation and tool history.

Highlights

  • Worker delegation: hand a bounded task to a second in-process session on its own provider with /worker; the Delegate tool keeps worker context across delegations until reset.
  • Forced reply language: /language or [runtime] language pins the reply language for the session.
  • Smarter retries: exponential backoff with jitter and provider Retry-After, shown as a live retrying phase with a countdown.
  • Prompt-cache aware: stable request prefixes let supported providers reuse work and can reach 90–99% cache hit rates; /status shows the reported result.
  • Code navigation: jump to definitions, callers, and implementations with a searchable code index.
  • Live follow-ups: type while the agent works; Enter queues a message for the next model step, while Ctrl-C discards a draft or interrupts the task once the input is empty.
  • Anchored edits: structured edits use line:hash anchors and reject stale file content.
  • Resumable sessions: conversation, tool calls, diffs, and working memory survive -c or --resume.
  • Built-in diff viewer: /diff shows the latest round and the net session result.
  • MCP and skills: connect Model Context Protocol servers and load Markdown instruction packs on demand.
  • Provider-side web search: opt in to a provider's own search tool (OpenAI, Qwen, Anthropic, Z.AI) and see each search and its sources in the transcript.
  • Provider compatibility: OpenAI-compatible APIs and Anthropic.

Install

Requires macOS or Linux, Python 3.11+, and uv.

uv tool install minacode
minacode --init-config

Add your provider to ~/.minacode/config.toml:

[provider]
active = "default"

[provider.default]
url = "https://api.deepseek.com"
key = "sk-..."
model = "deepseek-v4-flash"

Then run:

minacode

Upgrade with uv tool upgrade minacode.

Links

Download files

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

Source Distribution

minacode-0.25.1.tar.gz (290.7 kB view details)

Uploaded Source

Built Distribution

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

minacode-0.25.1-py3-none-any.whl (309.1 kB view details)

Uploaded Python 3

File details

Details for the file minacode-0.25.1.tar.gz.

File metadata

  • Download URL: minacode-0.25.1.tar.gz
  • Upload date:
  • Size: 290.7 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 minacode-0.25.1.tar.gz
Algorithm Hash digest
SHA256 0b0b15d6b9a6d7361a55923bb3073e80266a55b1657e1047fae7b30724e59fa9
MD5 66a5b4f1f283d61a913b9f4ecf21c190
BLAKE2b-256 2f5df90c7ee26fc22b98d4176be0596187f24c834d2c19cb8bdef7d6dd0722f4

See more details on using hashes here.

File details

Details for the file minacode-0.25.1-py3-none-any.whl.

File metadata

  • Download URL: minacode-0.25.1-py3-none-any.whl
  • Upload date:
  • Size: 309.1 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 minacode-0.25.1-py3-none-any.whl
Algorithm Hash digest
SHA256 098c24c8405b44420c4536ebbc8f3508ce70c309ca9e36308fc4557b9dbb16c9
MD5 7b7cc369700efe400e6aa6b239ab8604
BLAKE2b-256 8fc1f37571b4493002dbc4fd262b5f858fbd0f9a0765085af6bca16de186d092

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page