kortecxdocs

kx CLI reference

Every kx command — run, replay, digest, serve, invoke, submit, projection, content, events, signatures, health.

kx is one FFI-free binary and the runtime's only entrypoint. This is the command reference.

kx --version
kx <command> [flags]

run

Execute a workflow, appending each step to the journal and committing content.

kx run --journal /tmp/kx.db --content /tmp/kx-content
  • --journal <path> — path to the append-only journal database.
  • --content <path> — path to the content store.
  • --crash-at <point> — inject a crash at a named point (e.g. post-commit-vtc) to test recovery.

Prints the run digest and the committed-step count.

replay

Re-derive state from the journal without re-running committed work.

kx replay --journal /tmp/kx.db --content /tmp/kx-content

Re-reads committed motes from the content store and rebuilds the projection. A successful replay yields the same digest as the original run.

digest

Print the content-addressed digest for a run or artifact — the fingerprint used to prove two states are identical.

serve

Start the embedded gateway.

kx serve
  • Exposes a gRPC gateway on 127.0.0.1:50151 and an event WebSocket on :50152.
  • Auth is deny-all by default — use --dev-allow-local for local development or --auth-token <token> to require a token.
  • In-binary TLS via rustls: --tls-cert <path> / --tls-key <path>.

invoke

Invoke a handle exposed by a running kx serve.

kx invoke <handle>

submit

Submit work to the runtime. kx submit --demo runs a built-in demonstration workflow.

projection

Inspect the current projection — the pure fold of the journal that represents live state.

content

Inspect the content store — list or read content-addressed motes by digest.

events

Stream or list the typed events recorded in the journal.

signatures

Inspect signatures over journal records / content.

health

Report runtime health.

Single binary

There is no separate daemon to install. kx serve embeds the gateway and event stream; everything else is a subcommand of the same binary.