Getting started
Install Karya, add a Gemini key, and try the terminal UI. Karya is in active development: the TUI works today, and the agent loop, sandbox and undo arrive over the next milestones.
Install
Karya is a single Go binary and needs Go 1.25.4 or newer:
$ go install github.com/prateek041/karya/cmd/karya@latestPrebuilt release binaries for macOS and Linux are planned for launch.
Configure
Get a key from Google AI Studio and export it, or put it in a .env file in the directory you run Karya from. An exported variable wins over the file.
export GEMINI_API_KEY=…
Run
There are three ways to start Karya today:
$ karya -demo # scripted demo, no key needed $ karya -live # stream answers from Gemini $ karya # the TUI on the protocol, with the demo core
The demo below shows where the default mode is heading: the read and the sandboxed test run go ahead on their own, and the edit waits for you.
Keys
| enter | send; during a run, queue it (ctrl+x stops the run and sends now) |
| shift+enter | new line (alt+enter and ctrl+j also work) |
| shift+tab | cycle the mode: normal → accept edits → plan |
| ctrl+g | write the prompt in $VISUAL / $EDITOR |
| ↑ / ↓ | prompt history, kept in $XDG_STATE_HOME/karya/history |
| @ / ! | mention a file (attached for the model) / run a shell command |
| ctrl+r | threads, grouped by project |
| / | commands: /undo, /mode, /notify, /threads, /editor, /theme, /exit, … |
| ? | every key |
Modes and approvals planned · M2
Karya does not ask before every command. Shell commands run inside the OS sandbox, so they can run freely; edits show a diff. shift+tab cycles the mode.
| mode | read · list · search | write · edit | bash |
|---|---|---|---|
| plan | run | refused | run · read-only sandbox |
| default | run | ask, with diff | run · sandboxed |
| accept-edits | run | run | run · sandboxed |
| --no-sandbox | run | ask | ask every time |
Leaving the sandbox always asks
An unsandboxed run or a domain that is not on the network allowlist always asks, in every mode. You can answer once, for this session, or always (saved as a rule).
Denying a call
Deny with a reason and the call does not run. The reason goes back to the model as a structured result, so it can propose something else or stop. A denied edit leaves the file byte-identical.
Undo planned · M3
Before a turn's first side effect, Karya snapshots the working tree to a shadow git directory outside the project. This covers changes from every tool, bash included. Files the project ignores, and effects outside the root, are reported as not covered.
/undo restore the tree from before the last turn /rewind <n> go back n turns /redo re-apply what was undone
Resume a session planned · M1, M5
Every session is an append-only JSONL log stored outside the project. Logs are keyed to the repository's git remote rather than its local path, and contain no absolute paths or hostnames, so you can resume on any machine with a clone of the same repository. karya sync moves them end-to-end encrypted through a folder, bucket or git ref you own.
$ karya resume <session-id>On resume, Karya compares what it recorded with the live repository and gives the model a drift note. The note covers:
A session that stopped at a cost or step limit is resumable the same way.