AI-powered coding assistant
built for developers
Work with large language models directly in your terminal. Build, debug, and ship with an execution loop that keeps you in control. Describe what you need, and MiniCode handles the tools.
Multi-language roadmap: Rust and Python versions are now available.
- Inspecting code and repositories
- Editing files with review-before-write approvals
- Running commands and tracking background tasks
- Saving, resuming, renaming, and forking sessions
- Keeping long conversations usable with usage-aware compacting
- Extending workflows through local Skills and MCP tools
Built with modern architectures
Meets you where you code
A minimalist design focusing on the core tool-calling execution loop, providing safety and high extensibility.
Core execution loop
MiniCode manages a full multi-step tool execution loop (model -> tool -> model) in a single turn, providing seamless context processing without leaving the terminal.
- Full-screen TUI with transcript scrolling
- Separation of progress and final answers
- Feedback injection upon rejection
You're in control
Safety shouldn't be an afterthought. MiniCode brings permission validation and code review straight into the primary execution pathway.
- Standard Unified Diff view before writing
- Path and command allowlist verification
- Interception of dangerous actions
Skills & MCP
Extend capabilities endlessly. MiniCode discovers local SKILL.md instructions and seamlessly mounts stdio Model Context Protocol (MCP) servers.
Built-in Toolchain
Local file system management, command execution, and MCP helpers are centralized through a standardized tool protocol, ready to be called by the model at any time.
Sessions that survive exits
Every turn is appended to a per-project JSONL session log. Resume with --resume, open the picker with /resume, rename the current thread, or fork a clean branch of work.
- Append-only session events with parent links
- Resume, rename, fork, compact, and expiry cleanup
- Transcript rebuild from the stored event stream
Long-context controls
Provider usage anchors the context badge and auto-compact trigger. Snip compact safely removes middle history; context collapse summarizes spans. Huge tool results move to local storage with a preview.
- Provider usage plus estimated tail accounting
- Snip compact + context collapse auto-compaction
- Large tool outputs saved outside the prompt context
Architecture
MiniCode is not a bloated platform. It's a precisely structured codebase centered around the main execution loop.
src/agent-loop.ts
The core multi-turn tool-calling loop that drives the entire asynchronous conversational logic.
src/permissions.ts
The security sentinel handling path allowlists, command reviews, and intercepting unauthorized writes.
src/mcp.ts
The external connector managing MCP client connections and wrapping remote tool functions for local execution.
src/background-tasks.ts
A minimal registry separating ephemeral foreground tools from persistent background shell tasks (like dev servers).
src/session.ts
Append-only project session storage with resume, rename, fork, compact boundaries, transcript rebuild, and expiry cleanup.
src/utils/token-estimator.ts
Provider-usage-first context accounting with local fallback and estimated tail messages after the latest usage boundary.
src/utils/tool-result-storage.ts
Large tool-output persistence that keeps a compact preview in context and stores the full output on disk.