Docs
中文 EN

Introduction & Quick Start

CONTENTS

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.

Architecture Alignment

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

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

  1. Choose credentials or offline mock: Use —provider mock without any API key to verify tool loops locally, or export a provider key / configure ~/.mizar/models.json.

  2. Launch interactive or headless mode: Run mizar to open the terminal workbench, or pass exec / -p for single-turn automation.

  3. Inspect edits and telemetry: Press Ctrl+T interactively to open the /trace 3-lane profiler, or pass —trace-out trace.json in headless mode to export TrajectoryExport.

mizar --provider mock --model mock-v1

Execution Modes

EntrypointUse CaseInteractionPersistence
mizar [OPTIONS]Daily coding, multi-turn refactors, reviewsFullscreen / Inline viewports, ! / !! local Bash, --approve promptsLazily persists per-cwd JSONL logs under ~/.mizar/sessions/ (--no-persist disables)
mizar exec [OPTIONS] [<prompt>]CI pipelines, eval harnesses, batch scriptsHeadless single-turn run; outputs text or live-flushed NDJSON (--json) to stdoutSupports --isolated, --timeout, --context-window, --trace-out, and explicit exit codes
Strict Route Errors When Unconfigured

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.

Next Steps

Workbench
Master Fullscreen vs Inline viewports, the side panel, !/!! local Bash, keybindings, and all 24 slash commands.
Tools & On-Demand Codemode
Explore 5-tier ToolExposure, MinimalCoding 4-tool default, on-demand QuickJS codemode, tool_search, MCP, and SKILL.md.
CLI & Env Vars
Full flag matrix for mizar, mizar exec, and mizar update, JSON schema, exit codes, and env vars.
Config & Compat Reference
Complete settings.json, mcp.json, models.json schemas, and all 16 CompatConfig switches.

Search Mizar Docs