klassiq
v2.0.1
Published
Klassiq — a terminal coding agent with build/plan/chat modes, autonomous file tools, and your own AI provider keys. Install it, then use it: a keyboard-first TUI like opencode.
Maintainers
Readme
Klassiq AI — terminal coding agent
A fast, zero-dependency coding agent for your terminal, with the look and feel
of modern agent CLIs. It talks directly to your AI provider
(OpenAI-compatible /v1/chat/completions), so the model can read, search and
edit files inside the folder you launch it in — always asking before it changes
anything.
No API keys are hardcoded. Your key lives only in ~/.klassiq/config.json.
Install
npm install -g klassiq
cd anywhere && klassiqOr from this repository: npm install -g . — and klassiq.cmd runs it in
place on Windows.
Requires Node.js 18+.
First run
klassiqYou land straight in a full-screen, keyboard-driven TUI (like opencode). If no provider is configured yet it shows a hint — it never forces a wizard on you. Configure once with:
klassiq connect # or press /connect inside the TUIThe wizard connects your provider (hidden API key entry), fetches your models,
and lets you pick a default mode. Everything is stored in
~/.klassiq/config.json.
The TUI
- Type a message and press Enter to chat; the agent explores and edits on its own.
@name— filter and pick a file to attach to the message (up/down + Enter).!command— run a shell command directly./— open the command palette; keep typing to filter, Enter to run.ctrl+xthen a key — quick actions: c compact · u undo · r redo · n new session · l sessions · m models · t themes · x export · q quit (matching the keys shown on screen).?— toggle help.- Sessions are saved automatically to
~/.klassiq/sessions/;klassiq -cresumes your last one,klassiq --session <id>opens a specific one.
Tool calls stream live. Nothing is ever applied silently:
- edit_file shows a colored diff and asks
Apply? [y/N] - bash shows the command and asks
Allow? [y/N] - every edit is snapshotted, so
/undoand/redorevert it file by file - plan mode blocks editing and commands entirely
Modes
Switch anytime with /mode (or /mode plan when you want analysis only).
| Mode | Tools | | ----- | ------------------------------------------------------------ | | build | read_file, list_files, grep_search, edit_file, bash | | plan | read_file, list_files, grep_search (read-only) | | chat | none (conversation only) |
Usage
- Pipe a question:
echo "what does README.md say?" | klassiq - One-shot:
klassiq "question" - Overrides:
klassiq --provider openrouter --model <id> --key <key> "..." - Env overrides:
KLASSIQ_KEY,KLASSIQ_MODEL,KLASSIQ_PROVIDER. - List models:
klassiq --models
Commands
/connect setup wizard (first-time setup)
/mode build|plan|chat switch agent mode
/key change API key (hidden)
/model <id> set the model directly
/models list models for this provider
/sessions open a saved session
/new start a new session
/undo /redo revert / re-apply the last edited file
/compact summarize the conversation and reset the context
/export write the conversation to a markdown file
/config show current config (key masked)
/clear reset conversation and attachments
/themes /details /thinking UI toggles
/command run a shell command directly (! also works)
/status read-only git status
/help show help
/quit exitSafety
- Edits are confined to the folder where you launched
klassiq. - Nothing is written and no command runs without your
yconfirmation. - Your files only ever go to the provider you configured, as tool results.
- Wipe settings anytime by deleting
~/.klassiq/config.json.
Providers
OpenAI, OpenRouter, TokenRouter, OpenCode, or any OpenAI-compatible host
(custom, including local servers like Ollama/LM Studio via their /v1 URLs).
A note on custom/local hosts: model listing needs a working /models endpoint;
if a provider is unreachable you can still type a model id manually during
setup.
