Use Claude in the terminal
You can talk to Claude from any terminal with your own Anthropic API key. No browser tab, no monthly plan: you pay Anthropic only for what you use, and you see the cost of every answer.
This guide uses kunji, a free open-source terminal app that works with Claude and every other major AI provider.
1. Install kunji
Section titled “1. Install kunji”pip install kunjiOn Windows, use python -m pip install kunji, or download the .exe (no Python needed).
See Install kunji for every option.
2. Get an Anthropic API key
Section titled “2. Get an Anthropic API key”- Open console.anthropic.com/settings/keys and sign in.
- Add a little credit under Billing. The API is billed separately from a Claude.ai subscription.
- Create a key and copy it.
3. Add the key to kunji
Section titled “3. Add the key to kunji”kunji keys add anthropicPaste the key when asked. kunji checks it, then saves it in your operating system’s keychain (Windows Credential Manager, macOS Keychain or Secret Service on Linux), never in a plain text file. Pick a default Claude model from the list it shows.
4. Chat with Claude
Section titled “4. Chat with Claude”kunji chat› explain recursion in one line A function that solves a problem by calling itself on a smaller piece of it, until it reaches a case simple enough to answer directly. claude-sonnet-4-5 · 19 in · 33 out · $0.0006 · 0.7sThe grey line under each answer shows the model, tokens and what that answer cost.
Type / to see chat commands, and press Ctrl+D to leave.
Prefer menus? Run kunji on its own for an arrow-key menu.
One-off questions and pipes
Section titled “One-off questions and pipes”kunji ask "what does chmod 755 mean?"npm test 2>&1 | kunji ask "why is this failing?"kunji ask -f app.py "find the bug in this file"Use -m to pick a model for one command, for example -m anthropic:claude-sonnet-4-5.
Switch between Claude and other models
Section titled “Switch between Claude and other models”Inside a chat, /model switches model and keeps the conversation:
› /model openai:gpt-4o-mini✓ Switched to openai:gpt-4o-mini conversation keptUseful for a second opinion, or to move cheap follow-up questions to a cheaper model. See Switch and pick models.
Keep spending under control
Section titled “Keep spending under control”kunji budget set anthropic 2 # daily limit, in your display currencykunji warns at 80% and stops at 100%. See Costs and budgets.
Is my data private?
Section titled “Is my data private?”kunji talks to Anthropic directly from your computer. There is no kunji server in between, so your key, prompts and answers never pass through anyone else. Details: Privacy and security.