krave-cli
v2.1.1
Published
AI coding assistant CLI
Readme
Krave CLI
A terminal-native AI coding assistant.
Engineered for software professionals who work in the shell. Krave connects you to proprietary AI models purpose-built for software engineering — delivering real-time code generation, debugging, file management, and system automation without leaving your terminal.
Overview
Krave is not another web-based chat interface. It is a fully native terminal application that integrates AI-assisted development into your existing workflow. By operating directly in the shell, Krave provides:
- Real system access — executes bash commands, reads and writes files, runs git operations and build tools on your actual machine
- Autonomous subagents — spawns independent AI workers for parallel task execution
- Persistent context — maintains full session history with automatic save and resume
- Zero overhead — ships as a single pre-built file with no runtime dependencies
Features
Dual-Model Architecture
Krave provides two proprietary AI models, selectable mid-session:
| Model | Profile | Optimal Use | |-------|---------|-------------| | Krave 4.1 | Fast reasoning, low latency | Iterative development, quick edits, file operations, debugging cycles | | Krave 4.2 | Deep analytical capability | Complex refactoring, architectural decisions, multi-file changes, code review |
Switch between models at any time with /model — conversation context is preserved across switches.
Tool System
The AI can invoke five distinct tools in response to your requests:
| Tool | Function |
|------|----------|
| bash | Executes shell commands directly on your machine with a 30-second timeout |
| writefile | Creates or modifies files with inline diff display |
| spawn | Delegates tasks to subagents that work independently and return structured results |
| webSearch | Queries the web for real-time information — documentation, packages, current events |
| webFetch | Retrieves full-page content from a specified URL |
Session Management
- Conversations are saved automatically to the local
chats/directory - Resume any previous session with
/load - Export session data with
/export - Track token consumption and API usage with
/tokensand/stats
Installation
npm install -g krave-cliRequirements
- Node.js >= 18.0.0
- A terminal emulator with Unicode and ANSI color support
Platform Support
| Platform | Status | |----------|--------| | Linux | Full support | | macOS | Full support | | Windows (WSL) | Full support | | Windows (CMD / PowerShell) | Supported | | Termux (Android) | Supported |
Usage
Starting Krave
kraveThe terminal UI initializes with session information and awaits your input.
Command Reference
| Command | Description |
|---------|-------------|
| /help | Display the command reference |
| /new | Start a new session (current session auto-saves) |
| /load [n] | List saved sessions or load one by index |
| /save | Persist the current session manually |
| /model | Switch between Krave 4.1 and Krave 4.2 |
| /context | Display current session configuration |
| /stats | Show session statistics (message count, duration, token usage) |
| /history | Review all messages in the current session |
| /tokens | Display detailed token consumption |
| /export | Export the current session as JSON |
| /clear | Clear chat history without saving |
| /version | Show version and model information |
| /exit or /quit | Save the current session and terminate |
Session Example
┌── KRAVE v2.0.1 ──────────────────┐
│ Krave AI · by Asta · Krave 4.2 │
│ chats: 3 · 14 msgs left · 0 msgs │
│ 5/8/2026, 10:30:00 AM │
└───────────────────────────────────┘
/help for commands
├ you refactor the authentication middleware to use async/await
├ krave yeah, let me look at the current implementation first
├ bash cat src/middleware/auth.js
│ ╰─ [file contents]
│
├ krave swapping the callback chain to async/await. here's the refactor
├ write src/middleware/auth.js
│ ╰─ [diff displayed]
│Architecture
Krave operates on a tool-calling loop:
- The user submits a request at the prompt
- The AI model generates a response, optionally invoking one or more tools
- Tools execute in real-time on the local machine (bash, file I/O, web search)
- Results are returned to the model for further processing
- Steps 2–4 repeat until the task is complete or the step limit is reached
- Sessions are persisted to disk for future resumption
All communication between the CLI and the AI infrastructure occurs over HTTPS. No third-party APIs are involved — Krave uses proprietary hosted models.
Troubleshooting
krave: command not found
Ensure the global npm binary directory is in your PATH:
npm config get prefixAdd the following to your shell configuration (~/.bashrc, ~/.zshrc, or equivalent):
export PATH="$(npm config get prefix)/bin:$PATH"Reload your shell or run source ~/.zshrc.
Terminal Display Issues
Krave uses box-drawing characters (┌──│└┘) and ANSI color codes. Verify that your terminal emulator supports:
- Unicode (UTF-8) rendering
- 8-bit / 24-bit ANSI color
- Terminal width of at least 60 columns
Most modern terminals — including GNOME Terminal, iTerm2, Windows Terminal, and Termux — meet these requirements.
License
MIT — Built by Asta
