xonecas.io
64875
Mc

mini-coder / commit 8e5789d

docs: add comprehensive manual file for mini-coder

xonecas2026-03-12 8e5789d13ca276100272d263a677b27d7597564c parent 4cb53bd

1 file changed

docs/mini-coder.1.md+158−0
@@ -0,0 +1,158 @@
1+# MINI-CODER(1)
2+
3+## NAME
4+**mini-coder** (executable: `mc`) - A small, fast CLI coding agent built for developers.
5+
6+## SYNOPSIS
7+`mc [options] [prompt]`
8+
9+## DESCRIPTION
10+**mini-coder** is a developer-focused CLI coding agent. It prioritizes developer flow with no slow startup, no clunky GUI, and no vendor lock-in. It uses a minimalist terminal UI restricted to 16 ANSI colors to inherit the user's terminal theme, and is built entirely on Bun.js for maximum performance.
11+
12+## OPTIONS
13+**-m, --model <id>**
14+: Specify the model to use (e.g., `zen/claude-sonnet-4-6`).
15+
16+**-c, --continue**
17+: Continue the most recent session.
18+
19+**-r, --resume <id>**
20+: Resume a specific session by its ID.
21+
22+**-l, --list**
23+: List recent sessions.
24+
25+**--cwd <path>**
26+: Set the working directory (defaults to current directory).
27+
28+**-h, --help**
29+: Display help information.
30+
31+**[prompt]**
32+: Optional one-shot prompt text before entering interactive mode.
33+
34+## INTERACTIVE COMMANDS
35+Inside the interactive session, the following slash commands are available:
36+
37+**/model**
38+: List all available models, indicating free models and context sizes.
39+
40+**/model <id>**
41+: Switch to a specific model.
42+
43+**/model effort <low|medium|high|xhigh|off>**
44+: Configure reasoning effort levels for models that support it.
45+
46+**/reasoning [on|off]**
47+: Toggle the display of the model's reasoning/thought process.
48+
49+**/context prune <off|balanced|aggressive>**
50+: Configure context window pruning strategies.
51+
52+**/context cap <off|bytes|kb>**
53+: Set a hard payload cap size for tool results to avoid blowing out context.
54+
55+**/cache <on|off>**
56+: Toggle prompt caching globally.
57+
58+**/cache openai <in_memory|24h>**
59+: Set OpenAI prompt cache retention policies.
60+
61+**/cache gemini <off|cachedContents/...>**
62+: Attach Google Gemini cached content.
63+
64+**/plan**
65+: Toggle read-only planning mode.
66+
67+**/ralph**
68+: Toggle autonomous execution looping.
69+
70+**/undo**
71+: Revert the last turn and restore files.
72+
73+**/new**
74+: Clear context and start a fresh session.
75+
76+**/mcp list**
77+: List configured MCP servers.
78+
79+**/mcp add <name> http <url>**
80+: Add an MCP server over HTTP.
81+
82+**/mcp add <name> stdio <cmd> [args...]**
83+: Add an MCP server over stdio.
84+
85+**/mcp remove <name>** (or **rm**)
86+: Remove an MCP server.
87+
88+**/agent [name]**
89+: Set or clear an active primary custom agent.
90+
91+**/help**
92+: Display command help.
93+
94+**/exit, /quit, /q**
95+: Leave the session.
96+
97+## INLINE FEATURES
98+**Shell Integration**
99+: Prefix user prompts with `!` to run shell commands inline directly into the context.
100+
101+**File & Agent Referencing**
102+: Prefix words with `@` to reference files, custom agents, or skills within prompts (supports tab completion).
103+
104+## BUILT-IN TOOLS
105+The agent has access to the following tools:
106+* **glob**: Discover files by glob pattern across the project.
107+* **grep**: Search file contents using regular expressions.
108+* **read**: Read file contents with line-range pagination support.
109+* **create**: Write a new file or completely overwrite an existing one.
110+* **replace**: Replace or delete targeted lines using hashline anchors.
111+* **insert**: Insert new lines before/after an anchor without replacing existing content.
112+* **shell**: Execute bash commands and capture output.
113+* **subagent**: Spawn a focused mini-agent with a prompt.
114+* **webSearch**: Search the internet (requires EXA key).
115+* **webContent**: Fetch full page content from a URL (requires EXA key).
116+
117+## ENVIRONMENT
118+**OPENCODE_API_KEY**
119+: OpenCode Zen API key (Recommended provider).
120+
121+**ANTHROPIC_API_KEY**
122+: Direct Anthropic API key.
123+
124+**OPENAI_API_KEY**
125+: Direct OpenAI API key.
126+
127+**GOOGLE_API_KEY** (or **GEMINI_API_KEY**)
128+: Direct Google Gemini API key.
129+
130+**OLLAMA_BASE_URL**
131+: Ollama local base URL (Defaults to `http://localhost:11434`).
132+
133+**EXA_API_KEY**
134+: Enables built-in `webSearch` and `webContent` tools.
135+
136+## FILES & DIRECTORIES
137+**~/.config/mini-coder/**
138+: Application data directory. Contains `sessions.db` (SQLite database for session history, tool snapshots, MCP server configs, and model metadata), `api.log`, and `errors.log`.
139+
140+**.agents/ or .claude/ (Local or Global in ~/)**
141+: Configuration directories for advanced features:
142+ * **commands/*.md**: Custom slash commands.
143+ * **agents/*.md**: Custom behavioral wrappers or subagents.
144+ * **skills/<name>/SKILL.md**: Isolated context/instruction snippets.
145+ * **hooks/post-<tool>**: Executable scripts triggered upon tool execution.
146+
147+**AGENTS.md / CLAUDE.md**
148+: Auto-loaded system context files for project-specific instructions.
149+
150+## CORE FEATURES & ARCHITECTURE
151+* **Multi-Provider LLM Routing**: Automatically discovers API keys to route to OpenCode (Zen), Anthropic, OpenAI, Google/Gemini, or local Ollama instances.
152+* **Session Memory**: Persists conversation history in a local SQLite database, allowing users to resume past sessions effortlessly.
153+* **Subagent Delegation**: Includes a tool to spawn parallel instances of itself to tackle independent subtasks simultaneously (up to 10 levels deep).
154+* **Autonomous Mode (Ralph)**: An autonomous looping mode that runs tasks in an isolated context loop (up to 20 iterations) until completion.
155+* **Plan Mode**: A read-only thinking mode utilizing read tools + MCP, safely analyzing code without making mutations or executing shell commands.
156+* **Model Context Protocol (MCP)**: Native support for connecting external tools via MCP servers over HTTP or stdio.
157+* **Prompt Caching**: Configurable caching behaviors for supported providers (OpenAI, Gemini).
158+* **Undo Functionality**: Roll back the last conversation turn, cleanly restoring previous file states and git history via snapshots.