Docs/API
The CLI
How do I talk to any model from a terminal?
Checked against the code on
The terminal client is a single file with no dependencies. It needs Node 18 or newer; node -v tells you what you have. It remembers your key and your model, so you choose once and then type.
Install
curl -fsSL https://heyaskr.ai/install.sh | shThe installer is deliberately readable and does two things: fetches one file into ~/.askr and puts a launcher on your PATH. Run the line for your machine, not both; Windows has no sh.
Sign in
askr loginPaste a key from https://heyaskr.ai/wallet#api. It is saved to ~/.askr/config.json, so this is once per machine. ASKR_KEY in the environment overrides it.
Talk
askr
> what is a solar eclipse?
A solar eclipse happens when the Moon passes between Earth and the Sun.
12 in · 118 out
> ▌askr on its own opens a conversation that remembers what was said until you leave. Answers render as you would want them: bold is bold, lists are lists, code is set apart. Below each answer is what it cost in tokens.
| Command | What it does |
|---|---|
| /models | List what you can call |
| /model <id> | Switch model without losing the thread; /model alone shows the one in use |
| /new | Start a fresh conversation |
| /balance | Credits remaining |
| /exit | Leave |
Ask one thing and leave
askr "what is a solar eclipse?"The quotes matter. Without them your shell reads ? and * as filename patterns and stops with no matches found before askr runs. Inside a conversation there is no shell in the way.
If something does not work
| You see | What happened |
|---|---|
command not found: askr | The installer added a line to your shell config that has not been read yet. Open a new terminal tab, or source ~/.zshrc. |
no matches found | Your shell ate the question. Quote it, or run askr and type it in. |
node: command not found | Node is not installed. Get it from nodejs.org, then run the install line again. |
| That key was rejected | The key was revoked, or only part of it was pasted. Make a new one and run askr login again. |
402, or not enough credits | Your balance ran out. Add credits and carry on. |
Pointing it elsewhere
ASKR_ORIGIN changes the origin the CLI talks to. It defaults to https://heyaskr.ai. Useful for staging and for nothing else.