minioc is a minimal local AI coding agent in Go. It now separates provider routing from model catalog metadata, so OpenAI-compatible and Anthropic backends can evolve without changing the agent loop.
- CLI entrypoint in
cmd/minioc/main.go - Bubble Tea TUI as the default interface plus plain streaming CLI mode
- Session loop with
max_stepsininternal/agent/loop.go - Provider registry and adapters in
internal/llm/provider/ - Model catalog with strict
provider/modelreferences ininternal/llm/models/catalog.go - Tool registry plus
read_file,glob,grep,bash,edit, andwrite_file - Repo-bound path checks and confirmation prompts for write/edit/bash tools
- Streaming assistant output plus concise tool activity in the CLI
- Line-based edit diffs and write previews in confirmation prompts and tool results
- Parallel-safe tool calls can execute concurrently in one model step
- Default resource files under
assets/ - JSON session persistence under
.minioc/sessions/
minioc stores default static resources under assets/.
assets/minioc.json: default configuration template
Runtime data is written under .minioc/ (auto-created):
.minioc/minioc.json: runtime configuration.minioc/sessions/: session data
Example configuration:
{
"model": "openai/gpt-5-mini",
"max_steps": 1000,
"auto_approve": false,
"providers": {
"openai": {
"type": "openai-compatible",
"base_url": "https://api.openai.com/v1",
"api_key": "{env:OPENAI_API_KEY}"
},
"anthropic": {
"type": "anthropic",
"base_url": "https://api.anthropic.com",
"api_key": "{env:ANTHROPIC_API_KEY}"
}
},
"models": {
"openai/gpt-5-mini": {
"provider": "openai",
"id": "gpt-5-mini",
"supports_tools": true
},
"anthropic/claude-sonnet-4": {
"provider": "anthropic",
"id": "claude-sonnet-4-20250514",
"supports_tools": true,
"max_output_tokens": 8192
}
}
}If a provider uses an env-based API key source, export the variable first:
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_hereYou can also set api_key directly to a string in .minioc/minioc.json when you do not want env resolution.
Launch the TUI (default mode):
go run ./cmd/miniocRun against the current repository with an initial prompt:
go run ./cmd/minioc -- "summarize this repository"Continue a previous session:
go run ./cmd/minioc --continue sess_xxxxx "now add tests"Use plain streaming CLI mode (no TUI):
go run ./cmd/minioc --no-tui -- "summarize this repository"Useful flags:
-Cto change the working directory--continueto resume a previous session id--no-tuito force plain streaming CLI mode
- Session persistence is JSON-based, not SQLite yet
- Side-effecting tools still execute serially; only parallel-safe calls are batched
- Conversation context is sent from local session history on each step
bashuses a conservative blocklist, not a full command parser- Config runtime path is
.minioc/minioc.json, initialized fromassets/minioc.jsonif missing - Auth supports API key sources today; interactive
auth loginis not implemented yet
- Replace JSON session storage with SQLite
- Add tests for path safety, tool behavior, and loop control
- Broaden safe parallel scheduling beyond read-only tools (see
backlog/finer-tool-scheduling.md) - Support richer streamed progress metadata for long-running tool steps
Lower-priority feature planning lives under backlog/.