Introduction & Quick Start
Mizar is a Rust terminal AI coding agent built on the 34-crate Cordis microkernel (29 runtime/plugin + 5 pure core crates, mizar binary). It pairs a streaming inference loop (stream → tools → append-only JSONL session persistence) with strict KV-cache prefix stability, offering an interactive dual-viewport TUI workbench, a deterministic headless exec runner, and a long-lived stdio JSON-RPC 2.0 mizar bridge mode.
This handbook matches the 34-crate Cordis architecture (v0.2.9): MinimalCoding 4-tool default (read/bash/edit/write), on-demand QuickJS codemode, <available_skills> <location> skill pointers, a lean static English system prompt, startup-static AGENTS.md loading, hot-cache-aware tail pruning & Compaction B-5 guards, tolerant single-session JSONL + SHA-256 blobs, --trace-out structured trajectory export, and the mizar bridge (JSON-RPC 2.0 v1.0) host bridge.
Installation
Mizar builds on pinned Rust 1.98.0 (Edition 2024). Install the prebuilt single binary, build from source, or self-update cleanly:
curl -fsSL https://raw.githubusercontent.com/Mieluoxxx/Mizar/main/scripts/install.sh | sh
mizar --version git clone https://github.com/Mieluoxxx/Mizar.git
cd Mizar
cargo install --locked --path crates/mizar-tui mizar update --check # Check latest release only
mizar update # Upgrade to latest stable release
mizar update -v 0.2.9 -f # Force-install a specific tag
mizar install-tools # Install/verify managed rg & fd In air-gapped environments, set MIZAR_OFFLINE=1 or MIZAR_SKIP_VERSION_CHECK=1 to skip startup version checks, or point MIZAR_RELEASE_BASE_URL at an internal mirror.
Three-Minute Quick Start
Choose credentials or offline mock: Use
—provider mockwithout any API key to verify tool loops locally, or export a provider key / configure~/.mizar/models.json.Launch interactive or headless mode: Run
mizarto open the terminal workbench, or passexec/-pfor single-turn automation.Inspect edits and telemetry: Press
Ctrl+Tinteractively to open the/trace3-lane profiler, or pass—trace-out trace.jsonin headless mode to exportTrajectoryExport.
mizar --provider mock --model mock-v1 export DEEPSEEK_API_KEY="sk-..."
mizar -C /path/to/repo export PROTOCOL=responses
export BASE_URL="https://api.example.com/v1"
export API_KEY="sk-..."
export MODEL="gpt-5"
mizar exec "Explain workspace layout in Cargo.toml" Execution Modes
| Entrypoint | Use Case | Interaction | Persistence |
|---|---|---|---|
mizar [OPTIONS] | Daily coding, multi-turn refactors, reviews | Fullscreen / Inline viewports, ! / !! local Bash, --approve prompts | Lazily persists per-cwd JSONL logs under ~/.mizar/sessions/ (--no-persist disables) |
mizar exec [OPTIONS] [<prompt>] | CI pipelines, eval harnesses, batch scripts | Headless single-turn run; outputs text or live-flushed NDJSON (--json) to stdout | Supports --isolated, --timeout, --context-window, --trace-out, and explicit exit codes |
If no credentials exist in environment variables or ~/.mizar/models.json and you do not pass —provider mock, Mizar fails immediately with NoRouteConfigured instead of issuing unauthenticated network requests.