Klaat Code CLI
A terminal coding agent that picks a model for each request on its own and shows spend in real time
- 353 ★ on the repository
- Last commit
Broad access
Why this level
- The agent writes and deletes files and runs shell commands, asking permission by default
- Every message and code fragment passes through the external Klaatu service
- Login tokens are stored in ~/.klaatai/credentials.json and remote MCP tokens in mcp-oauth.json
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/klaat-codeDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent writes and deletes files and runs shell commands, asking permission by default
- Every message and code fragment passes through the external Klaatu service
- Login tokens are stored in ~/.klaatai/credentials.json and remote MCP tokens in mcp-oauth.json
This is third-party code. Review the repository files before installing.
What it does
Klaat Code is a terminal coding agent in the same class as Claude Code or opencode. It reads a project, edits files, runs commands and asks permission before a risky step. It installs from npm, Homebrew or a script, and then needs a KlaatAI account sign-in through the browser: no model keys are required. Routing is the main difference. Each message goes to a service called Klaatu, which assigns it to a cost tier from nano to heavy and escalates to a stronger model when the task proves harder. The /tier command pins a tier and /why explains the last choice. Your own model plugs in through any OpenAI-compatible address with /model add. The second feature is a code graph. The agent queries an index for symbols and call chains to estimate what breaks on a change, so it reads fewer whole files. After an edit the CLI runs the project's linter or type checker and returns the errors to the model straight away. The client has a plan mode limited to read-only tools, sub-agents and a headless run for CI. An MCP client with OAuth, hooks and JavaScript plugins extend it. For spend control there is a spike warning and the maxSessionCost session cap.
Who it is for. For developers who want a terminal coding agent with automatic model choice and a hard spend cap, including in CI.
Good fit when
- You want small edits sent to a cheap model and hard debugging to a stronger one without switching models by hand
- An agent in CI should stop when the budget runs out: klaatcode run --max-cost 0.50 exits with code 3
- You want the agent to run the linter or type checker after every edit and fix what it finds
- You want a plan mode where the model sees only read tools and gets write access after you approve
- You want to add your own model at an OpenAI-compatible address next to the router
Not a fit when
- Code must not leave your machine: the client has no local mode
- You need sign-in without an account: login happens in the browser against a KlaatAI account, and the plan sets the quota
- You need one fixed model with stable behaviour: the router picks the tier unless you pin it
- You need LSP go-to-definition and rename: they are on the author's roadmap, not in the release
Example request
Find every call to parseConfig and tell me what breaks if it starts returning a PromiseLimitations
- The client source is open under Apache-2.0, while the router, price estimation and code index run on KlaatAI servers. The agent will not start without access to klaatai.com.
- The quota depends on the plan. The strongest tier, titan, is for Pro and above with a daily cap, and semantic code search is also a Pro feature.
- Every request carries the version, platform, install channel and a random install ID. KLAATAI_TELEMETRY=0 or DO_NOT_TRACK=1 turns off the ID, and the version and platform are still sent.
- The author compiled the cost comparison with other agents. You can recheck the numbers with bun run bench.
- The name and logos are trademarks and are not covered by the license.
How to disable. Run klaatcode logout to clear the tokens in ~/.klaatai/credentials.json, then npm uninstall -g klaatcode, or brew uninstall klaatcode for Homebrew. Settings, permissions and saved sessions sit in ~/.klaatai and are deleted by hand. Project rules stay in .klaatai inside the repository.
FAQ
How do I install Klaat Code and sign in?
Run npm install -g klaatcode or brew install KlaatAI/klaatcode/klaatcode, then klaatcode login. It opens a browser, you sign in to your KlaatAI account and the token is stored in ~/.klaatai/credentials.json. After that klaatcode opens the current folder, and klaatcode ~/projects/my-app opens a specific project.
How does Klaat Code differ from Claude Code?
Klaat Code picks a model automatically for each message, while Claude Code holds one model for the session. It also adds a code graph with change impact analysis, spend monitoring and a hard session cap.
How do I pin a model instead of automatic choice?
/tier opens the tier picker, /tier code locks one and /tier smart restores automatic routing. For your own model run `/model add gpt4o https://api.openai.com gpt-4o env:OPENAI_API_KEY` and then /model gpt4o.
How do I run the agent in GitHub Actions?
Add KLAATAI_API_KEY to the secrets and call `klaatcode run --model code "Fix all ESLint errors and commit"`. Headless mode accepts stdin input and the --max-cost flag: when the limit is hit the process exits with code 3.
How does Klaat Code guard against loops?
The server notices repeats of the same call with the same arguments, the CLI refuses them and stops after three strikes. A separate warning fires when spend runs at three times the session average.
Discussion
No questions or reviews yet.
Related
CLI toolsA Python terminal coding agent in the manner of Claude Code: reads the repository, edits files, runs commands, with memory, sub-agents and MCP
MiniCode is a compact TypeScript terminal coding agent like Claude Code: tool loop, TUI, skills, MCP and sub-agents, built for study and tinkering
Charm's terminal coding agent: any model, switching models mid-session, LSP, MCP and Agent Skills
A Rust SDK for coding agents and the ready-made abstract CLI: REPL, 34 tools, MCP, graph memory, Anthropic and OpenAI, JSON output for CI
Work modes for AI coding agents: a light solo mode for daily tasks and /man with a plan, checks and review for big changes
An MCP server that gives Claude Desktop and other clients file tools, a shell and sub-agents in the style of Claude Code
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| Klaat Code (this entry) | yes | 353 | |
| OpenCode | no | 223,136 | an open terminal agent where you pick the model, without server-side routing |
| Crush | no | 28,874 | a Charm terminal agent with the provider chosen in settings |
| Aider | no | 49,824 | pair-programs in a git repository and does not build a code graph |
README in short
The project presents the client as the open part of the KlaatAI platform and compares it with other agents on 33 tasks. A separate section lists what data the client reports about itself.