Quickstart
1 — Install and sign in
Section titled “1 — Install and sign in”npm install -g @koda-rising/cli # Node.js 20 or laterkoda --version # confirm the version that installedkoda login # opens your browser — approve, and you are signed inOn a machine with no browser (SSH, a container, a remote editor), use koda login --device and type the code it
prints into a browser anywhere. Prefer the editor? Install Koda Rising from the VS Code Marketplace and run
Koda: Sign In — see the CLI guide for both.
2 — Fund the wallet
Section titled “2 — Fund the wallet”Usage is prepaid in your currency; top up on a local rail (card, USSD, OPay, PalmPay, M-Pesa, MoMo, …):
koda topup 5000 # ₦5,000 — returns a checkout link or USSD code; credited when the provider confirmskoda verify <reference> # optional: check it landed (the provider usually credits it before you ask)koda wallet # balance3 — Run your first task
Section titled “3 — Run your first task”The interactive agent works in the folder you run it from:
cd my-projectkoda # then: "add a null check to parseUser() in src/user.ts"It reads and searches on its own, asks before every edit and command, and shows what each turn cost. Or as one command that prints a preview and exits:
koda run "add a null check to parseUser()" --file src/user.ts # preview the editkoda run "add a null check to parseUser()" --file src/user.ts --apply # write itAdd a KODA.md at your repository root with your conventions (“use tabs”, “tests live beside the code”) and every
surface follows it.
4 — From code: an API key, the SDK, or raw HTTP
Section titled “4 — From code: an API key, the SDK, or raw HTTP”For CI and programs, create a scoped key (shown once):
koda keys create ci --scopes agent:run,wallet:readKeys authenticate as Authorization: Bearer <key> and carry scopes (agent:run, wallet:read, keys:manage,
metrics:read). Browser sessions use a sealed cookie instead.
// SDK (streaming)import { KodaClient } from '@koda-rising/sdk';const koda = new KodaClient(BASE_URL, TOKEN);for await (const ev of koda.agentRun('add a null check to parseUser()', [{ path: 'src/user.ts', content }])) { if (ev.error) throw new Error(ev.error); // a failed run says so — check it if (ev.edits) applyEdits(ev.edits); if (ev.costMinor != null) console.log(ev.summary, `cost=${ev.costMinor}`);}# Raw HTTP (SSE)curl -N "$KODA_GATEWAY/agent/run" -H "authorization: Bearer $KODA_TOKEN" \ -H 'content-type: application/json' -d '{"prompt":"add a null check"}'5 — (optional) Index your repo, then chat
Section titled “5 — (optional) Index your repo, then chat”koda repo index src/**/*.ts # the agent retrieves from it automatically (vector mode)koda chat "how does billing work in this codebase?"Chat threads stream token by token — see POST /chat/threads/:id/messages in the API reference.
Next: Concepts.