Getting started
From zero to a working agent in your terminal in under two minutes.
Requirements#
- Node.js ≥ 22 and npm — check with
node --version. - macOS or Linux (primary targets). Any reasonably modern terminal emulator works; see the terminal compatibility notes.
- An Anthropic API key — KHAELOR V1 is Anthropic-only by design.
Install#
The one-liner
curl -fsSL https://www.khaelor.sh/install.sh | sh
The installer is a short, readable POSIX shell script. It:
- Verifies
nodeexists and is version 22 or newer (with a clear message if not). - Verifies
npmexists. - Runs
npm install -g https://www.khaelor.sh/khaelor.tgz. - Verifies the install by running
khaelor --version. - Prints next steps.
You can read it before running it — it is served as plain text at
https://www.khaelor.sh/install.sh. It never uses
sudo on its own; if a global install needs elevated permissions it tells you
exactly what to do instead.
Manual install with npm
If you prefer to run npm yourself:
npm install -g https://www.khaelor.sh/khaelor.tgz
If npm reports EACCES
A permission error on global install means your npm prefix is owned by root. The clean fix
is a user-owned prefix (never sudo npm install if you can avoid it):
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
export PATH="$HOME/.npm-global/bin:$PATH" # add to your shell profile too
npm install -g https://www.khaelor.sh/khaelor.tgz
Set up your Anthropic API key#
KHAELOR reads the key from the ANTHROPIC_API_KEY environment variable — and
only from the environment. Config files that contain an apiKey-style
field are rejected at load time, so a key can never end up committed to a repository.
export ANTHROPIC_API_KEY=sk-ant-...
To make it permanent, add that line to your shell profile
(~/.zshrc, ~/.bashrc, or ~/.profile).
KHAELOR never displays the key, never writes it to logs, and redacts it from every
debugging view. /config shows only set via environment ✓.
Your first session#
Change into a project directory and start KHAELOR:
cd ~/dev/my-project
khaelor
Startup is nearly instant — four lines of identity and an editable prompt:
KHAELOR
~/dev/my-project · main
claude-sonnet-4-5 · thinking adaptive
────────────────────────────────────────────────────
What do you want to build?
❯ _
If the key is missing you get one calm instruction instead of an error dump:
KHAELOR
~/dev/my-project · main
────────────────────────────────────────────────────
No Anthropic API key found.
Set ANTHROPIC_API_KEY or run /config to add one.
❯ _
Ask for something real
Type a request and press Enter:
❯ why does the login test fail intermittently?
▸ Search "login" · 12 matches in 4 files
▸ Read tests/auth/login.test.ts · 148 lines
▸ Run npm test -- login · exit 1 · 6.8s
The test races the session cookie: it asserts before the async
store write resolves. The fix is to await the flush in the fixture.
While the agent works, a single status line shows what is actually happening
(● Searching repository · 2.3s), tool calls settle into compact
one-liners, and you can keep typing — follow-up messages queue and inject safely.
The first permission prompt
The first time the agent wants to run a command that is not on the safe allowlist, an inline panel appears. Three keys, no typing:
╭─ KHAELOR requests permission ───────────────────╯
│ Run │
│ npm install │
│ │
│ Working directory │
│ ~/dev/my-project │
│ │
│ [ Enter ] Allow once │
│ [ A ] Always allow in this project │
│ [ Esc ] Deny │
╱───────────────────────────────────────────────────╯
Press A once for npm test and it never asks again in this project.
Full details: Permissions.
Wrap up
/cost— real token usage and dollars for this session./diff— everything KHAELOR changed (never your pre-existing diff)./quitor Ctrl+D — exit. The session is persisted automatically;/resumepicks it back up later.
CLI reference#
| Invocation | Meaning |
|---|---|
khaelor | Start the interactive TUI in the current directory. |
khaelor --model <id> | Start with a specific Anthropic model id or alias for this session. |
khaelor --print "prompt" | Non-interactive: run one agent turn, print the answer, exit. |
khaelor --debug | Write developer logs and performance histograms to ~/.khaelor/logs/. The TUI stays clean. |
khaelor --version | Print the installed version. |
Where to go next#
- The TUI — the composer, file mentions, shell mode, steering.
- Commands & keyboard — every slash command and key binding.
- Configuration — models, thinking mode, output budget.