The full inventory of the kastel command, generated from the engine itself. No line is written by hand, so no line can lie about a command that no longer exists.
A generated page
The summaries on this page are the ones kastel --help prints, published as they stand. You are reading exactly what your terminal will answer.
01
Where it runs
The kastel command works in the current directory: it reads your configuration, your governance rules and your content from there. Run it from your deployment folder, the one kastel init created.
kastel --help and kastel <command> --help print the full option list. This page is the inventory, in the same order.
02
The commands
Direct commands first, then the groups. The order is the help's, not a thematic ranking: the engine fixes it, and does so deliberately.
Commands
20
kastel check
Print budget status and a light resolvable check of agents and skills.
Issue an ADMIN token for an admin surface (spec-token-control-api 3.2, spec-score-api).
kastel token list
List tokens: id, consumer, shape, created, expires, revoked, last used, sessions.
kastel token revokeID_OR_CONSUMER
Revoke a token: effective on its very next request (no verdict cache).
kastel identityHuman identity mapping: link a login email to an employee slug (free tier).
kastel identity linkEMAILSLUG
Link a login email to an employee slug (governance/identities.yaml).
kastel identity unlinkEMAIL
Remove a login email link (the offboarding/DPO lever).
kastel identity list
List the login email -> employee slug mapping (governance/identities.yaml).
kastel editorThe Brain editor role: grant, revoke, list, and the per-department approval requirement (governance/editors.yaml, edit_approvals.yaml).
kastel editor grantSLUG--department
Grant the editor role (refused for a slug absent from governance/aor.yaml).
kastel editor revokeSLUG
Revoke the editor role (effective on the next request; the role is read live).
kastel editor list
List editor grants and the approval-required departments.
kastel editor require-approvalDEPARTMENT--off
Toggle the per-department approval requirement (regulated mode, default empty).
kastel siemSIEM webhook: stream the sealed audit chain to your SOC (opt-in).
kastel siem push
Deliver undelivered sealed audit events to the configured SIEM (one cycle).
kastel dbDatabase operations: apply migrations, import the legacy SQLite store.
kastel db upgrade
Apply pending migrations (alembic upgrade head) to KASTEL_DB_URL.
kastel db import-sqlite--path--force
One-shot import of the legacy SQLite store (usage -> ledger, audit -> audit).
kastel credentialsPersisted runtime secrets, encrypted at rest in Postgres (ADR-009). At-rest protection only: whoever controls the process and the KEK can decrypt.
Show a credential's metadata; --reveal prints the decrypted value.
kastel credentials rotateSCOPECONNECTORPRINCIPAL
Replace a secret's value (read from stdin); bumps rotated_at.
kastel credentials rmSCOPECONNECTORPRINCIPAL
Hard-delete a credential (offboarding, RGPD). No-op if absent.
kastel credentials lsSCOPE--connector
List stored credentials' NON-SECRET metadata (never values).
kastel credentials rekey
Re-encrypt every stored secret under a new KEK (KASTEL_CREDENTIALS_KEK_NEW).
kastel jobsThe durable-sync job queue: work it (run), inspect it (ls), retry a failed or dead-lettered job (retry). Postgres-backed, no broker (ADR-011).
kastel jobs ls--status--limit
List jobs newest-first; surfaces dead_letter loudly (invariant 4).
kastel jobs run--once--max-jobs--loop--interval--sync-interval-minutes
Work the queue: one-shot drain (default/cron) or durable worker (--loop).
kastel jobs retryJOB_ID
Re-queue a failed or dead-lettered job for an immediate attempt.
kastel aorEdit the AOR (who decides/validates what) and agent memory access, validated (B3).
kastel aor show
Print the current governance model in plain language (never raw YAML).
kastel aor previewOPARGS
Show the plain-language BEFORE/AFTER of an operation, without applying it.
kastel aor dry-runOPARGS--limit--all
Report which pages an operation would hide or expose, for every principal.
kastel aor applyOPARGS--actor
Validate and govern-write an operation (owner-attributed, audited, reversible).
kastel aor revertCOMMIT--actor
Governed undo of a prior AOR edit commit (attributed, audited, re-validated).
kastel moderationThe human moderation feed: review the Guard's flagged writes (list/show/approve/reject).
kastel moderation list--status
List moderation items: id, age, source, routed_to, rules, pages.
kastel moderation showITEM_ID
Show the full effect of an item: the diff or the payload, rules, provenance.
Approve an item: apply its effect all-or-nothing (git merge for a brain_diff).
kastel moderation rejectITEM_ID--note--decided-by
Reject an item: discard the effect, restore the challenged page to active.
kastel lessonsThe agent-memory loop: compile execution traces into governed lesson candidates (compile), prune old compiled traces (prune).
kastel lessons compile--agent--since
Distil uncompiled agent traces into lesson candidates through the Guard.
kastel lessons prune--before
Prune old COMPILED traces (operator-only, logged, never automatic).
kastel digestThe weekly freshness digest: generate every question the lint + staleness scan raises (generate), notify each recipient with a count-only pointer to the platform (send), and manage per-person notification preferences (prefs). Keeps the Brain alive.
kastel digest generate--week--dry-run
Generate the week's impact-ranked questions and the value report.
kastel digest send--week--force
Notify each recipient with pending questions: a count-only pointer.
Show or set one person's notification preferences (INV-27).
kastel digest answerQUESTION_IDANSWER_TEXT--as
Record a person's answer to a generated question as a governed write.
kastel pagePage lifecycle operations (operator-only): archive a page.
kastel page archiveREL_PATH
Archive a page (active -> archived). Operator action, never automatic.
kastel eraseRight to erasure (RGPD): erase a stored raw copy (--raw) or a whole mailbox slug (--mailbox), flagging (never deleting) governed facts that cite it. erase list shows erasable mailbox slugs.
kastel erase list
List the mailbox slugs that have raw copies (erasable with --mailbox).
kastel erase pending
List source deletions flagged for admin review (retained, not yet erased).
kastel erase approve--connector--path--requester
Approve pending flags: erase the flagged raw copies via the sealed admin lever.
kastel erase dismiss--connector--path
Dismiss pending flags: KEEP the flagged content, just clear the flag (no erasure).
kastel scoreThe Context Score: context recall@k + structure + optional answer fidelity, always with breakdown and N. Manage the question set with kastel score questions.
kastel score questions
The per-deployment question set the score is measured on (spec 3.2).
Owner confirm/edit of a prefill candidate: pending -> active (spec 3.2).
kastel evalThe owned eval set (memory/evals/): run the Context Score over your git-owned evals, list them, or lint them. run is free core.
kastel eval run--k--snapshot--json
Compile memory/evals/ -> question set, then compute the Context Score.
kastel eval matrix--k--json
Sweep the owned evals across the declared inference models (Kastel Enterprise).
kastel eval sentinel--k--force--json
Run the model-liquidity regression sentinel (Kastel Enterprise).
kastel eval list
List the owned eval set (id/scope/sensitivity/expected), from the markdown.
kastel eval lint
Structurally validate the owned eval set (spec 3.3). Non-zero on problems.
kastel costProvider cost visibility (informative): estimate an onboarding, show ledger actuals.
kastel cost estimate--corpus--emails
Order-of-magnitude API cost of onboarding a corpus, BEFORE spending money.
kastel cost show--month
Show this month's ledger usage grouped by consumer (read-only actuals).
kastel auditThe sealed local audit chain: replay a request trace.
kastel audit replayTRACE_ID
Replay one request as its five audit points (read-only, local).
kastel providersThe configured inference/embedding providers and their declared posture.
kastel providers posture
Show the declared data-handling posture of the configured providers.
kastel cockpitAI-system cockpit: document and export how your AI system works (portable).
kastel cockpit show
Print 'how your AI system works' (skills, agents, runtime, organization).
kastel cockpit export--output
Export the portable AI-system bundle (ai-system.md + manifest.yaml).
kastel onboardOnboarding interview: build the company's structured Brain.
kastel onboard start
Start (or resume) the scoping interview and report Temps A readiness.
kastel onboard prefill
Derive known facts from the imported documents (so they are not asked again).
kastel onboard ask
Print the next interview question (None when the phase is covered).
kastel onboard answerTEXT
Answer the current question (the one kastel onboard ask shows).
kastel onboard map
Propose the org map (a draft to review before confirming).
kastel onboard confirm--by--edits
Validate the proposed map: write the General wiki + governance/aor.yaml.
kastel onboard deptNAME
Deepen one department (Temps C): its processes, tools, and wiki.
kastel onboard status
Show completeness, time-to-context, and what to do next.
kastel templateBrain-templates: package a vertical's STRUCTURE from a deployment (package), review it element-by-element (review/finalise), and scan it against the source corpus (scan). The template travels, client data never.
The npm launcher installs and drives a self-hosted Kastel on your machine. It has its own handful of commands, and passes everything else through to the engine: kastel <engine command> runs exactly the commands in the table above, inside the container.
usage
npx @kastel.ai/cli - install and run your own Kastel (free, self-hosted, no account)
Install, the first time:
npx @kastel.ai/cli [TARGET_DIR] [options]
install (or resume/start) a deployment
Then install the command itself, once - it is named 'kastel':
npm install -g @kastel.ai/cli
Everyday, from inside a deployment directory:
kastel status deployment state and endpoints
kastel start | stop start / stop the running stack
kastel upgrade move to the current public release (explicit,
never automatic)
kastel uninstall [--purge-data] [--force]
preview by default; --force applies
kastel doctor [--server --domain <fqdn>] [--json]
check this machine, write nothing
kastel <engine command...>
run any engine command in the container
(check, import, onboard, token, export, ...)
Install options:
--server server shape: public TLS via Caddy (requires --domain)
--domain <fqdn> the domain your Kastel will answer on (server shape)
--lang en|fr language of the deployment (default en)
--client <name> company name (default: the directory name)
--departments a,b departments to activate at scaffold time
--local-embeddings fully local retrieval embeddings (ollama; server shape)
--port <n> MCP port on 127.0.0.1 (default 8787, auto-remapped if taken)
--no-connect do not wire the AI clients on this machine
-h, --help this help
Exit codes: 0 ok, 1 unexpected, 2 usage, 3 precondition, 4 image pull,
5 scaffold, 6 startup/health, 7 AI-client wiring (the install itself succeeded).
The engine image is proprietary (Kastel Engine EULA) and runs on YOUR machine;
this installer is Apache-2.0. No account, no telemetry, no calls home - ever.
280 commands, generated from the engine command line, refreshed on 2026-08-23 (engine d1e57f93ef0e).
A question about integrating?
Write to us: a question asked by email gets an answer the same day. Our network of partner integrators can also help.