Mirai CLI
A Claude Code-class terminal agent for Mirai v1: tools by default, streaming replies, permissions, parallel reads, and MCP — install @satuapps/mirai-cli@0.2.0.
Install
Install globally (Node 20+, package 0.2.0+):
npm install -g @satuapps/mirai-cliOr run once without installing:
npx @satuapps/mirai-cliOptional — build from a local checkout of this repo: cd cli && bash install.sh
Quick start
Save your API key (create one in chat settings after you sign in on the site). Then run mirai doctor to verify:
mirai loginOne-shot agent turn — tools run in the working directory:
mirai ask "Explain how auth works in this repo"Start the agent in cwd (slash: /help, /model, /compact, /doctor, /tools, /mcp, …):
mirai chatBuilt-in tools
The agent can call these tools during a turn. Write and shell actions ask for permission unless you pass --auto.
read_fileRead a file by path.write_fileCreate or overwrite a file.edit_fileReplace a string in a file and show a unified diff.list_dirList entries in a directory.globFind paths matching a glob pattern.searchSearch file contents (ripgrep when available).run_shellRun a shell command in a chosen working directory.fetch_urlFetch text from an HTTP(S) URL.
MCP
Add Model Context Protocol servers in ~/.config/mirai/mcp.json or .mirai/mcp.json. Tools appear as mcp_<server>_<tool>. Manage them with mirai mcp list|add|remove.
Example config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
}
}
}Model
Default model is mirai-v1-code. Override with --model, MIRAI_BASE_URL / config for the API origin, or mirai models to list what your key can reach.
mirai --model mirai-v1-code ask "…"Need the HTTP chat completions contract instead? Read the API docs.