logika is a single static binary with no runtime dependency on Python, Node or anything else. You run two commands yourself, once per repository; your coding agent runs the rest, guided by the skills logika init installs. Each step of Logika is a part of it: query reads what the logging platform stores, Logika Monitor wakes your agent and claim and resolve are its fixing loop, check holds the code to its logging conventions, and replay proves the rules a reflection round writes.
Install
curl -fsSL https://logika.host/install.sh | sh
brew install logika-labs/tap/logika
uvx logika-cli
npx logika-cli
logika update updates it the way it was installed.
Set a repository up
logika login # sign in through the console; installs Logika Monitor and registers this repository
logika init # logika.json, the AGENTS.md section, hooks and skills for your agent
logika login opens the console, where you sign in with Google or GitHub and pick or create a project (unless logika.json already names one). It writes your token as LOGIKA_TOKEN to .env, installs Logika Monitor (below) if it isn't installed and registers the repository with it. On a terminal it asks once whether Logika Monitor may share usage statistics with us; nothing is shared unless you say yes, and without a terminal nothing is asked or shared until you turn on "Share usage statistics" in its menu. It works in any repository; a teammate who clones yours runs it too and signs in to the same project. On a machine without a browser (CI, a server), use a token printed by logika token where you have one. To rotate your token, run logika login again; to invalidate it, run logika logout, which revokes it and removes it from .env.
logika init needs that token. It writes logika.json (the project, an empty ledger, components and config), a section in AGENTS.md, hooks and skills for each agent harness it finds (Claude Code, Codex, Cursor) and .gitignore lines for .env and .logika.jsonl, and prints what it found and added. It also installs nock, with which Logika works best: its round writes the ledger's rules with you from real captures (nock reflect logika). nock needs Python 3.12 or newer and uv; without them init says what to install, and Logika is set up all the same. Run again where logika.json exists, it sets nock up if it's missing and changes nothing else.
Then ask your coding agent to instrument this repository with Logika. Its logika-instrument skill maps the components and asks you which to instrument (when nobody can answer, it instruments them all); for those, it chooses a logging strategy, writes it down as the component's conventions in logika.json, marks it instrumented, sets it up (the logika-otel enhancer and its initialisation), and instruments until logika check finds nothing left and the component's tests run clean under logika test. What only you can settle it asks you, and writes your answer into the ledger itself; it tells you when it's ready to sync; logika sync is yours to run, or your release pipeline's.
Everyday
Your agent follows AGENTS.md: as it writes code, it logs each state transition (the entity, its identity, its values before and after, the cause), following the conventions logika.json sets for each component. Then it checks:
logika check # validates logika.json, the mechanical rules and this change's conventions
logika test "<command>" # runs a command with local capture, then judges it against logika.json on disk
logika replay '<json>' # judges that capture (or stored traces) again as if events had failed, run late or never come
logika map [<path>] # per function and event, the risks each event is evidence for and what guards them
logika docs [<term>] # the reference that ships with the CLI
logika sync # sends the ledger, components and config
checknever edits code, and its mechanical layer is deterministic: it validateslogika.json(ledger, components, config), applies the mechanical rules (undeclared span or attribute, dynamic span name, attribute type,add_eventon a declared span, swallowed exception,piiwithout a key; span names and attributes are held to the ledger only once it declares an event, so existing OpenTelemetry code passes as it is), holds this change to each component's conventions, as warnings that never block (a changed function at a transition site that opens no event, an event whose name misses the component's pattern, that lacks its identity param, or has abeforeparam without itsafter), lists files outside every component and the items this session claimed and hasn't resolved, and regenerates bindings when the ledger or their templates changed. At most once a day it names an instrumented component that changed enough to instrument again (LOGIKA_NUDGE=offturns that off). At the end of a session the stop hook runscheck --review: when the change touched source in a component marked instrumented, by at least 3 lines of code, Logika's reviewer (your own agent,claude -punlessLOGIKA_AGENTsays otherwise, headless and read-only) judges whether its state transitions are logged and tells your agent exactly how to log what's missing, or nothing; it changes nothing itself, and reviews the same diff once. Exit 1 only on an invalidlogika.jsonor a blocking rule; warnings never block.LOGIKA_REVIEW=offturns it off;logika check --reviewruns it by hand.testruns a command (your test suite, or the app itself) with a local receiver, then has the server judge the capture: issues, declared events never seen, undeclared spans. Exit 1 on an issue.replayjudges the last capture, or the stored traces a query selects, again with events changed (a param set, a span failed, delayed, duplicated or dropped), so the agent sees a validation, timeout or rule fire without breaking the code.docsprints the reference, one short article per term (logika docs instrument.python,logika docs rules), and the skills and prompts.syncis safe any time: a new ledger version only means code built with it will be judged. It's yours to run, or CI's on release with a token fromlogika token. No skill, hook or prompt runs it on its own.
"This change" is the current branch's commits since it left the default branch, plus the working tree. What the reviewer, check and the hooks did is kept in .logika.jsonl at the repository root (gitignored).
Fixing
When production breaks, Logika emails the environment's subscribers. Wake my agent (in the email, the console, or Logika Monitor's menu), or an auto environment, has your monitor launch your agent with the logika-fix skill. You can do the same in your own session by asking your agent to fix what Logika found.
logika claim # take the project's open issues, with their evidence; exit 44 when none
logika claim qi_… # or the items named (an insight, feedback or account item you asked for)
logika resolve '<json>' # close every claimed item: fixed, dismissed or left open
The agent finds the cause, reproduces it with a test run under logika test, fixes and commits, then resolves:
{"root_cause": "The timeout retry carries no idempotency key.",
"items": [{"id": "qi_…", "outcome": "fixed",
"delivery": {"kind": "pr", "ref": "https://github.com/acme/app/pull/482"}},
{"id": "qi_…", "outcome": "dismissed", "reason": "a load test, not customers"}]}
resolve closes the items at once and the resolution goes to the console and, in the thread that announced them, to the subscribers. A fixed or dismissed issue that recurs on a newer app version comes back as a regression.
Asking questions
With the logika-investigate skill, your agent answers questions from production data:
logika query # everything pending: open items, logika.json against the server, coverage
logika query item qi_… # one item with its evidence
logika query journey <span-id>
logika query sql "SELECT _name, count(*) FROM events GROUP BY 1"
logika query series '{"event": "checkout", "show": ["p95", "error_rate"], "bucket": "day"}'
The analytics readers are query series, breakdown, actives, retention, funnel and milestone, each taking JSON as its API route does. If your project encrypts with a PII key, set LOGIKA_PII_KEY beside the token: values are then decrypted on your machine.
Reflection
The rules about what must hold, and the analytics, are written with you rather than while coding: in a round of nock's nock reflect logika, which logika init installs. Its agent reads the code and what it really emits (logika query sql, logika test), proposes rules (validate, paths, timeouts, rules, invariants) and then analytics (funnels, milestones, views), asks you what only you know, and proves each rule with logika replay before writing it into logika.json; logika check must pass, and logika sync is yours to run.
Telling us
When Logika lacks something you need, or something in it is broken or confusing, tell us: logika report "<text>" (or the text on stdin) sends it to the people who build Logika, and we read every one. It sends the text as you give it, the CLI's version and your OS, and, if you're signed in, who you are and the project, so we can answer; without a token it goes anonymously. Nothing from your repository goes unless your text includes it. It prints exactly what was sent and a reference.
Your coding agent knows this channel too: when it hits a gap in Logika, it tells you and offers to send a report, and sends one only when you say so.
Everything else
logika api <subcommand> [JSON] reaches every API route the commands above don't cover: environments, SDK keys, members, emails, your membership, ledgers, starting the agent. logika api --help lists them. The console does the same for people.
Every command takes no argument or one obvious one, and the only flags are --help, --json (the full answer, for scripts) and --version, and one that belongs to one command: check --review. A JSON input is given inline, as a path to a .json file, or as - for stdin. Exit codes: 0 ok, 1 refused (by the server, or by the checks), 40 bad input, 42 an environment problem (a missing or refused token, an unreachable server, an outdated CLI), so an agent never "fixes" correct code because the environment was wrong, and 44 nothing found.
The skills
logika init installs three skills for your agent, and AGENTS.md points to them by name:
| Skill | For |
|---|---|
logika-instrument | adopting Logika, or catching up: map, you pick, a strategy as conventions, set up, instrument until logika check and logika test are clean, ready to sync |
logika-fix | something is wrong: claim, reproduce, fix, commit, resolve |
logika-investigate | answering questions from production data |
Logika Monitor
The one background program that starts your agent: logika login installs it, starts it at login, and registers the repository. It polls the server; when there is work (new issues in an auto environment, or Wake my agent pressed in the email, the console or its own menu), it launches the agent the environment's settings name (Claude Code by default, Codex, or a command of your own) in the repository, with Logika's prompt and the environment's delivery (a pull request, a deploy, or your own instructions), which points it at the logika-fix skill, and tells the server while the agent runs; a run works one environment, one agent at a time works the issues, and each Why? is a session of its own beside it. No agent is stopped for time: past the environment's time limit (none by default) its hooks ask it to round up, which works with Claude Code and Codex; any other agent command is just run. Only your own monitor takes your wake; past your monthly spending limit in the project (set in the console) it starts nothing until the month turns or you raise it. It is managed from its own menu: per project, Wake my agent, pause, resume, open its log or the project, or remove; share usage statistics; start at login; update when a new release is out; quit. The agent runs with your own agent configuration and permissions, so what it should do unattended (edit, commit, open a pull request, deploy) must be allowed there.