@satuapps/mirai-cli
v0.3.29
Published
Mirai agentic coding CLI with Ink UI, slash suggestions, and subagent sessions
Readme
@satuapps/mirai-cli
Agentic coding CLI for Mirai. Claude Code and Copilot class agent UX in your terminal. Default model is mirai-1 (Mirai 1). Use mirai-2 for Mirai 2; the legacy id mirai-v1-code still works as an alias on the API.
Requirements
- Node.js 20+
Install
npm install -g @satuapps/mirai-cliOr run once without installing:
npx @satuapps/mirai-cliOptional — build from a local checkout:
cd cli && bash install.shLogin
mirai loginPaste an API key (generated at satuapps.com → chat settings). Check setup anytime:
mirai doctorAuth resolution order:
MIRAI_API_KEYenvironment variable~/.config/mirai/config.json(apiKey, optionalbaseUrl,model)
| Setting | Default |
|---------|---------|
| Base URL | https://satuapps.com |
| Model | mirai-1 |
Out of credits or Mirai 2 locked (HTTP 402)? Subscribe or add balance at https://satuapps.com/langganan. The CLI prints this URL and suggests mirai doctor.
What you get (v0.2)
- Gradient MIRAI splash — block wordmark, version, model/API/scope info, and a tips box on start
- Live statusbar — model · edit mode · cwd · git branch above every prompt
- Always-on agent mode — tools enabled by default;
miraistarts an agent in cwd - Rich tool display —
⏺ read_file pathblocks, colored unified diffs, truncated shell output - Streaming text — assistant tokens render as Mirai’s simulated SSE arrives
- Permission UX — y / n / always (project) / global for write & shell
- Parallel tool calls — independent reads run concurrently
- Project context — auto-loads
MIRAI.md/AGENTS.md/ truncatedREADME.md+git status -sb - Session quality — resume, per-turn cost,
/compactfor long histories mirai doctor: API key (masked), base URL,GET /v1/models, optional balance probe, plus Mirai Agent install hints (uv, pipx, or pip)
Mirai Agent (Python personal agent): https://satuapps.com/agent
Install guide: https://satuapps.com/downloads
Usage
# Start agent REPL in the current project (like `claude`)
mirai
# One-shot
mirai -p "Refactor the auth module"
mirai ask "What does src/index.ts do?"
# Workflows
mirai -p "Review the open PR and flag risks"
mirai -p "Investigate why tests fail and fix it"
mirai -p "Refactor auth to match MIRAI.md"
# Pipe stdin
cat error.log | mirai -p "Explain this failure"
mirai models
mirai doctor
mirai initFlags
| Flag | Meaning |
|------|---------|
| -m, --model <id> | Model override |
| --base-url <url> | API base override |
| --auto / --yolo | Auto-approve write/shell tools |
| --read-only | Block write and shell tools |
| -p, --prompt <text> | Non-interactive one-shot |
REPL slash commands
| Command | Notes |
|---------|--------|
| /help | Workflows + commands |
| /model [name] | Also /model: x and /model=x |
| /clear | New session |
| /compact | Summarize old turns |
| /cost | Session tokens & estimate |
| /doctor | Health check |
| /topup | Open credit page |
| /tools /mcp /login /init /resume /exit | |
Sessions: ~/.local/share/mirai/sessions/.
Tools
| Tool | Permission | Description |
|------|------------|-------------|
| read_file | read | Read a file |
| write_file | write | Create/overwrite a file |
| edit_file | write | Exact string replace + unified diff |
| list_dir | read | List directory entries |
| glob | read | Find files by glob |
| search | read | Content search (rg or Node fallback) |
| run_shell | shell | Run a shell command |
| fetch_url | read | HTTP GET text |
Note: The Mirai API replaces client system prompts. Project context is prepended to the first user message.
MCP
~/.config/mirai/mcp.json.mirai/mcp.json
mirai mcp list
mirai mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /tmp
mirai mcp add remote https://example.com/mcp # HTTP/SSE server
mirai mcp remove filesystemStdio servers use command/args/env; remote servers use url (+ optional headers). Streamable HTTP is tried first, with legacy SSE as fallback.
Connected tools are namespaced as mcp_<server>_<tool>.
Parity tracker
Competitive UX parity vs Claude Code and Copilot CLI (mandatory copy list, P0→P2) lives outside the package as the durable plan:
~/.cursor/plans/mirai-cli-parity-claude-copilot.plan.md
Develop
npm install
npm test
npm run buildParity tracking for Claude Code and Copilot CLI UX lives in the workspace plan mirai-cli-parity-claude-copilot.plan.md (Cursor plans). Mirai CLI 0.3.11 completes the P0 to P2 verification pass: effort routes through Mirai API, stale API blocked copy removed, typecheck clean.
License
Proprietary — Satu Apps / Mirai.
