本页尚未翻译,以下为英文原文。
Install and first run
Reika is one CLI that talks to a model over the standard chat-completions API. The model can run on your laptop, on another machine, or at a hosted provider — it never has to run where Reika runs (see Platforms).
Requirements
- Node.js 22 or newer — Node sets the operating-system floor: macOS 11+, Linux with glibc 2.28+, or Windows 10 through WSL. See Platforms for the details and for what differs per platform.
- A model behind a
/v1/chat/completionsendpoint: a local server (llama.cpp, MLX, vLLM) or a hosted API. llama.cpp is the local engine Reika is developed and measured against — other engines implement different amounts of that surface, so a bug seen on one may not reproduce on another. - A modern terminal (iTerm2, Ghostty, Kitty, …) for correct TUI rendering.
Install
Any of these installs the same published package:
npm i -g @alexwkleung/reika # npm ships with Node
pnpm add -g @alexwkleung/reika # what Reika's own checkout uses
brew install alexwkleung/tap/reika # macOS and Linux; pulls in Node if neededThe npm package is scoped, but the command it installs is reika. The Homebrew formula wraps the npm package, so the version is the same either way. It lives in a tap rather than in Homebrew's core list, which is why the name carries alexwkleung/tap/.
pnpm needs installing first (npm i -g pnpm, or the standalone installer at pnpm.io/installation), and its global bin directory has to be on your PATH — pnpm setup puts it there and prints the line to add to your shell config (on macOS that is ~/Library/pnpm/bin). npm's global bin is on PATH already, so npm is the shorter route if you do not otherwise use pnpm.
Reika is pre-1.0, so commands, settings and behavior can still change between releases.
Pick a model
Local
Any OpenAI-compatible server works. With llama.cpp:
llama-server -m <model.gguf> -c 24576 --jinja <other-launch-args>-c is the context window you are giving the model, and --jinja enables the model's own chat template, which is what makes tool calling reliable. Sizing this is the model server's question, not Reika's; Models lists what Reika has been run against.
For a thinking model, also check whether its template keeps earlier reasoning. Some (LFM2.5 and Qwen3.6 among them) drop every <think> block that comes before the newest user message, and Reika sends its per-round notes as one. Once a long turn starts shedding context, the model then sees none of its own earlier reasoning and tends to re-derive work it already did. Reika asks for the template's preserve_thinking switch on every request to a local or private address, so a server on this machine or your network needs nothing extra. For a server Reika reaches at a public address, turn it on at the server:
llama-server -m <model.gguf> -c 24576 --jinja --chat-template-kwargs '{"preserve_thinking":true}'Hosted
Any provider with an OpenAI-compatible endpoint works — a provider's own API, or a router such as OpenRouter:
export REIKA_BASE_URL=https://api.example.com/v1 # the provider's endpoint
export REIKA_API_KEY=<your key>
export REIKA_MODEL=<model id> # as the provider names itFor a hosted endpoint the context window and output limit come from the models.dev catalog when the provider is listed there; set REIKA_CONTEXT_WINDOW when it is not. Your code goes to that provider, since it is the one running the model.
Point Reika at it
export REIKA_MODEL=model # or put it in ~/.config/reika/.env
cd your-project && reikaREIKA_BASE_URLdefaults tohttp://localhost:9931/v1, llama-server's default since llama.cpp v0.7.0; an older llama-server (or its Docker image) listens on 8080, and a hosted API sets its own (above).- The context window is read from the server when it reports one, and for hosted endpoints from the models.dev catalog; set
REIKA_CONTEXT_WINDOWwhen neither has it, and a startup line says so. REIKA_MODELis required, and takes a comma-separated list for models served by one endpoint —/model <name>switches between them.- Reika sends no sampling parameters of its own, so your server's flags are what apply.
Then, in the session: / lists the slash commands, Shift+Tab cycles modes, and /help shows everything. Modes and commands covers each mode; Configuration is the full key list.
From a checkout
For running a version you are changing, or before the first npm release:
git clone https://github.com/alexwkleung/reika.git && cd reika
pnpm install # npm users: npm i -g pnpm first
pnpm run install:global # builds and installs the `reika` binary
pnpm run uninstall:global # removes it againThe install is a copy of the checkout as it stood when you ran it, so switching branches or rebuilding afterwards does not change the installed reika; run pnpm run reinstall:global to pick up new changes.
To run it without installing anything, cp .env.example .env, edit it, and use pnpm run dev. Contributing has the rest of the contributor setup.