
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
AI coding assistant CLI with smart model routing — built for developers who live in the terminal.
npm install -g klaatai
klaatai
Klaat Code is a terminal-native AI coding assistant — similar to Claude Code or OpenCode — but with smart model routing that automatically picks the right AI model for each request, saving cost without sacrificing quality.
It runs entirely in your terminal with a full TUI (no Electron, no browser required), supports MCP servers, vim keybindings, skills, hooks, and everything else you'd expect from a professional AI coding tool.
npm (requires Node ≥ 18 or Bun ≥ 1)
npm install -g klaatai
macOS permission error? If you see
EACCES: permission denied, either prefix withsudo:sudo npm install -g klaataiOr fix npm's global prefix once so you never need
sudoagain:mkdir -p ~/.npm-global npm config set prefix ~/.npm-global echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc source ~/.zshrc npm install -g klaatai
macOS (Apple Silicon) — standalone binary, no runtime needed
curl -fsSL https://github.com/klaatai/klaatai-cli/releases/latest/download/klaatai-macos-arm64 \
-o /usr/local/bin/klaatai && chmod +x /usr/local/bin/klaatai
macOS (Intel)
curl -fsSL https://github.com/klaatai/klaatai-cli/releases/latest/download/klaatai-macos-x64 \
-o /usr/local/bin/klaatai && chmod +x /usr/local/bin/klaatai
Linux (x64)
curl -fsSL https://github.com/klaatai/klaatai-cli/releases/latest/download/klaatai-linux-x64 \
-o /usr/local/bin/klaatai && chmod +x /usr/local/bin/klaatai
# Open current directory
klaatai
# Open a specific project
klaatai ~/projects/my-app
klaatai /path/to/project
# Headless / CI mode
klaatai run "Fix all TypeScript errors"
klaatai run "Write tests for auth.ts" < auth.ts
# Authenticate
klaatai login
klaatai whoami
Klaat Code automatically routes each request to the most cost-effective model that can handle it. You get heavy model quality at nano model prices for simple tasks. The sidebar shows real-time tier distribution and estimated savings.
/model heavy # force a specific tier
/model # restore smart routing
/why # explain the last routing decision
/vimmode on)| Tool | Description |
|---|---|
read_file | Read files with line numbers, offset/limit |
write_file | Write files, creates parent dirs automatically |
edit_file | Surgical string replacement |
glob | File pattern matching |
grep | Regex search across files |
run_command | Execute shell commands |
web_fetch | Fetch and read web pages |
web_search | Search the web |
todo_write/read | Persistent task management |
delegate_task | Sub-agent delegation for complex tasks |
Full stdio MCP client — connect any MCP server in seconds.
# Configure in .klaatai/mcp.json
/mcp # manage servers in TUI
7 built-in presets: filesystem, GitHub, Postgres, Puppeteer, Brave Search, Fetch, and more.
/diff # show git diff
/review # AI code review of current changes
/commit # AI-generated commit message + confirm
/undo # undo last AI file changes
/checkpoint # snapshot project state
/rollback # restore a checkpoint
Save prompts as .md files and invoke them by name.
/skill list # list all skills
/skill fix-types # invoke a skill
/skill new fix-types # create a new skill in $EDITOR
Skills live in .klaatai/skills/ (project) or ~/.klaatai/skills/ (global).
Run shell commands before/after tool calls and messages.
// .klaatai/hooks.json
{
"after_message": ["afplay /System/Library/Sounds/Glass.aiff"],
"before_tool": ["echo \"$KLAATAI_TOOL_NAME\" >> ~/.klaatai/tool.log"],
"after_tool": ["notify-send \"$KLAATAI_TOOL_NAME done\""]
}
Available events: before_message · after_message · before_tool · after_tool
| Command | Description |
|---|---|
/help | Show all commands |
/model <tier> | Force routing tier: nano / fast / code / reason / heavy |
/why | Explain last routing decision |
/diff [file] | Show git diff |
/review [ref] | AI code review |
/commit | AI-generated git commit message |
/test [args] | Run test suite (auto-detects Bun/Vitest/Jest/pytest/Go/Cargo) |
/skill <name> | Invoke a saved prompt skill |
/hooks | List configured lifecycle hooks |
/init | Detect tech stack and generate project rules |
/compact | Summarise context to free up the context window |
/checkpoint [label] | Snapshot project state |
/rollback [id] | Restore a checkpoint |
/undo | Revert last AI file changes |
/share | Export session to markdown |
/theme <name> | Switch theme |
/vimmode on|off | Toggle vim keybindings |
/mcp | Manage MCP servers |
/sessions | List saved sessions |
/resume <id> | Resume a previous session |
/doctor | Diagnose auth, API, MCP, and project health |
/clear | Clear chat |
/cost | Show session cost |
| Shortcut | Action |
|---|---|
ctrl+p | Command palette |
ctrl+y | Copy last AI response to clipboard |
ctrl+d | Quit |
ctrl+c | Cancel streaming / quit |
ctrl+x ctrl+e | Open $EDITOR to compose message |
esc | Cancel streaming |
@ | Insert file reference (fuzzy picker) |
!cmd | Run shell command and inject output |
| Mouse drag | Select and auto-copy to clipboard |
/vimmode on)| Key | Action |
|---|---|
esc | NORMAL mode |
i / a / A / I | INSERT mode |
h / l | Move cursor |
j / k | Scroll chat |
w / b / e | Word motion |
0 / $ | Line start / end |
dd | Clear input |
D | Kill to end of line |
gg / G | Scroll to top / bottom |
ctrl+u / ctrl+d | Half-page scroll |
Config is stored in ~/.klaatai/config.json.
{
"baseUrl": "https://api.klaatai.com",
"routingDisplay": "minimal",
"theme": "dark",
"vimMode": false
}
| Key | Values | Description |
|---|---|---|
routingDisplay | off / minimal / full | Chat header detail level |
theme | dark / light / dracula / nord / ayu / catppuccin / gruvbox | UI theme |
vimMode | true / false | Vim keybindings |
Create .klaatai/rules.md in your project root — it's injected as a system message every session. Use /init to auto-generate one based on your tech stack.
Fine-grained tool permissions in ~/.klaatai/permissions.json:
{
"allow": ["read_file:*", "glob:*"],
"deny": ["run_command:rm -rf*"],
"trusted_tools": ["read_file", "glob", "grep"]
}
# Single prompt, streams to stdout
klaatai run "Summarise CHANGELOG.md"
# Pipe input
echo "Explain this function" | klaatai run -
# With options
klaatai run "Fix type errors" --model fast --system "You are a TypeScript expert"
# In CI — no TUI, just output
klaatai run "Check for security issues in auth.ts" < auth.ts
klaatai serve --port 8080
Exposes a REST API at http://localhost:8080 for IDE extensions and integrations:
GET /v1/health — health checkGET /v1/info — session infoPOST /v1/chat — chat with SSE streaming~/.klaatai/
credentials.json # API key + auth
config.json # user preferences
permissions.json # tool permission rules
mcp.json # global MCP servers
hooks.json # global lifecycle hooks
sessions/ # saved session transcripts
skills/ # global prompt skills (.md files)
plugins/ # custom tool plugins (.js files)
todos.json # persistent todo list
.klaatai/ # project-level (in your repo)
rules.md # project rules (injected as system message)
mcp.json # project MCP servers
hooks.json # project lifecycle hooks
skills/ # project prompt skills
MIT © KlaatAI
FAQs
KlaatAI — AI coding assistant CLI with smart model routing
The npm package klaatai receives a total of 18 weekly downloads. As such, klaatai popularity was classified as not popular.
We found that klaatai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.