Docs
Install
Linux x86-64 and macOS 15 or newer (Apple silicon and Intel).
tar xzf klawed-<version>-linux-x86_64.tar.gz
install -m 0755 klawed /usr/local/bin/klawedNothing else to install. The Linux binary carries its own libraries - libcurl, OpenSSL, SQLite, ncurses and cJSON are linked into it - and a certificate bundle to fall back on, so it needs nothing from the machine except a kernel. HTTPS is still verified against the system's own trust store wherever there is one: that is the store its owner maintains, and the one that knows about a proxy in the middle of the connection. The macOS build uses the system's libraries and keychain instead, and it is unsigned, so Gatekeeper asks once on first launch.
Providers
An API key and a model name are the whole setup. klawed ships no default model - a model named in a release is an old model by the next one, so you name yours: --model for one run, OPENAI_MODEL for the session, or the picker on first run.
export OPENAI_API_KEY="sk-..."
klawed --model gpt-5.4 "hello"Or sign in to a plan you already pay for - no key involved:
KLAWED_PROVIDER_TYPE=openai_sub | ChatGPT Plus or Pro |
|---|---|
KLAWED_PROVIDER_TYPE=anthropic_sub | Claude.ai |
KLAWED_PROVIDER_TYPE=kimi_coding_plan | Kimi Coding Plan |
KLAWED_PROVIDER_TYPE=zai_coding | Z.AI GLM (ZAI_API_KEY_CODING_PLAN) |
Anything else goes in ~/.klawed/config.json (or .klawed/config.json for one project), or through /setup in the TUI:
{ "providers": {
"deepseek": { "provider_type": "openai",
"model": "deepseek-chat",
"api_base": "https://api.deepseek.com",
"api_key_env": "DEEPSEEK_API_KEY" } } }KLAWED_LLM_PROVIDER=deepseek klawedRunning it
klawed # the TUI
klawed "refactor the auth module" # one-shot, then exit
klawed --web-server 8080 # browser client-r, --resume [ID] | Resume a session (partial id works) |
|---|---|
-l, --list-sessions [N] | List sessions |
-p, --provider NAME | Use a named provider from the config |
-m, --model NAME | Use this model for this run |
-d, --dump-conversation [ID] | Print a session (-dj JSON, -dm Markdown) |
--auto-compact | Compact the context automatically |
Tools
Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite, Subagent, CheckSubagentProgress, MemoryStore, MemoryRecall, MemorySearch, UploadImage, ViewImage, Sleep. Dynamic tools add more.
Commands
/help | The command list |
|---|---|
/setup | Guided provider setup |
/provider | List, add, edit, delete or switch providers |
/config <setting> <value> | Change a setting |
/settings | Settings menu |
/compact | Compact the context now |
/autocompact | Toggle automatic compaction |
/clear | Clear the conversation |
/dump [file] | Write the conversation to a file |
/themes | Browse colour themes |
/voice | Dictate a prompt |
/goal | A standing goal that survives across turns |
/add-dir <path> | Add a working directory |
/vim | Open vim here |
/exit | Quit |
Keys
i | Type a message (insert mode) |
|---|---|
Esc | Back to normal mode |
: | Command mode |
/ ? | Search the conversation |
v, y | Select lines, yank them |
Ctrl+F | Find a file |
Ctrl+R | Search command history |
j k, g G | Scroll, top, bottom |
Files
~/.klawed/config.json | Your settings, shared across projects |
|---|---|
.klawed/config.json | Settings for this project |
.klawed/ | Sessions, history, memory, logs, token counts |
KLAWED_DATA_DIR | Move that directory somewhere else |
Web client
klawed ships a browser client, and you host it. One command serves the page and the API from the same binary - nothing is hosted for you, and it is free and ungated: no account, no licence, no service of ours in the middle.
klawed --web-server 8080 # then open http://127.0.0.1:8080A thread is a conversation in a folder you pick in the UI, and it runs as a klawed process of its own in that folder: the same working directory, config and tools as the terminal, and it keeps working after you close the tab. The Settings pane edits ~/.klawed/config.json, the same file the TUI writes, so providers are set up once.
It binds to localhost until you pass --web-bind. To reach it from another machine, bind explicitly and close the API with one of two credentials - a bearer token, or a password file that serves a login screen:
# token auth: ?token=... on the page, Authorization: Bearer on the API
KLAWED_WEB_TOKEN="<a-long-random-token>" \
klawed --web-server 8080 --web-bind 0.0.0.0
# or a login screen instead of a token
printf '%s' '<long-random-password>' > ~/.klawed/web-password
klawed --web-server 8080 --web-bind 0.0.0.0Either credential alone is enough; with neither set the API is open, which is only safe because the default bind is loopback. Treat it as "run arbitrary commands in these folders as your user": keep it on loopback or a VPN, and put TLS in front before exposing it to a network.
KLAWED_WEB_PORT | Port (or --web-server PORT; default 8080) |
|---|---|
KLAWED_WEB_BIND | Bind address (default 127.0.0.1) |
KLAWED_WEB_TOKEN | Require a bearer token on /api/* |
KLAWED_WEB_PASSWORD_FILE | Login password file (default ~/.klawed/web-password) |
KLAWED_WEB_DB_PATH | State file: threads, recent folders, logins |
The phone and tablet client is the same page, laid out for a small touch screen.
Bugs
There is no tracker. Mail it and a person reads it. Start with the environment report - it says which terminal, trust store, network and provider klawed found, and prints no secrets:
klawed --doctorThen the three things that make a report actionable:
- What you did
- What happened
- What you expected instead
Something broken? Mail a bug report.