DocsSe connecterInstaller Kastel
Référence

La ligne de commande, dans l’ordre du help.

L’inventaire complet de la commande kastel, généré depuis le moteur lui-même. Aucune ligne n’est écrite à la main, donc aucune ne peut mentir sur une commande qui n’existe plus.

Une page générée

Les résumés de cette page sont ceux que kastel --help imprime, publiés tels quels, en anglais. Vous lisez ici exactement ce que votre terminal vous répondra.

01

Où elle tourne

La commande kastel travaille dans le répertoire courant : elle y lit votre configuration, vos règles de gouvernance et votre contenu. Lancez-la depuis le dossier de votre déploiement, celui que kastel init a créé.

kastel --help et kastel <commande> --help impriment la liste complète des options. Cette page est l’inventaire, dans le même ordre.

02

Les commandes

Les commandes directes d’abord, puis les groupes. L’ordre est celui du help, pas un classement thématique : c’est le moteur qui le fixe, et il est délibéré.

Commands

20
kastel checkPrint budget status and a light resolvable check of agents and skills.
kastel initTARGET--root--client--departments--language--template--image--embeddings--behind-proxy--forceCreate a ready-to-use client deployment (Brain skeleton + config + governance).
kastel askQUESTION--task--consumer--person--k--show-chunksAsk the Brain a question and get a cited answer (read-only consultation).
kastel export--outputArchive the deployment data dirs into a portable, verifiable tarball.
kastel backup--output--verifyWrite the provable continuity backup of this deployment.
kastel restoreTARBALL--dry-runRestore a kastel export tarball into THIS fresh deployment.
kastel importFOLDER--deptImport a folder of text documents into the Brain (governed ingest each).
kastel import-mcpCOMMAND--args--deptImport resources from an MCP server into the Brain (governed ingest each).
kastel distill--limitDistill conversational threads into normalized, searchable notes (R1).
kastel graph-distill--limitPropose LLM-deduced typed relations through the moderation queue.
kastel serve--no-browser --no-no-browserOpen the editable company map in the browser (sovereign local server).
kastel mcp--consumer--transport--host--port--tls-cert--tls-keyExpose the structured context to external AI runtimes over MCP (read-only).
kastel upgrade--no-reindexMigrate this deployment's Brain structure to the latest version (G-7).
kastel reindex--incrementalRebuild the retrieval index from the Brain markdown (full, idempotent).
kastel describe--dry-runReplace fallback page descriptions with one LLM-redacted sentence each.
kastel emit-usagePush unsent sealed usage events to the configured cloud console (one cycle).
kastel connect--runtime--all--token--consumer--agent--departments--allow--deny--expires-days--app-url--lang--write-skillsEmit the connection snippet + the CLAUDE.md/AGENTS.md instruction block.
kastel lint--strictLint the Brain: unresolved wikilinks (with their source page), stale compiled indexes, orphan pages, missing descriptions.
kastel suggest-departments--modelDetect and store the departments to suggest activating (needs a provider).
kastel doctor--remediate--yesInspect Brain hygiene and (optionally) run the governed remediation plan.

Command groups

30

kastel ingestGoverned ingest channel: build the Brain from a file or an email export.

kastel ingest fileSOURCE--deptConstruct context from a single source file into the Brain (governed channel).
kastel ingest emailPATH--mailbox-owner--limitOne-shot import of an email export (mbox) into the Brain (M-1 / D39).
kastel ingest failures--source--all--limitList what the last syncs and drops could NOT read (and why).
kastel ingest resolveSOURCERESOURCE_IDClose one failure row by hand (source-deleted item, accepted gap).

kastel tokenPer-consumer scoped MCP tokens: issue, list, revoke (HTTP transport auth).

kastel token issueCONSUMER_NAME--agent--departments--allow--deny--expires-days--quiet -qIssue a scoped token. The plaintext is shown ONCE and never stored.
kastel token issue-humanEMAIL--expires-daysIssue a person-scoped token for a human (M-6, spec section 9).
kastel token issue-adminLABEL--scope--expires-days--quiet -qIssue an ADMIN token for an admin surface (spec-token-control-api 3.2, spec-score-api).
kastel token listList tokens: id, consumer, shape, created, expires, revoked, last used, sessions.
kastel token revokeID_OR_CONSUMERRevoke 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 linkEMAILSLUGLink a login email to an employee slug (governance/identities.yaml).
kastel identity unlinkEMAILRemove a login email link (the offboarding/DPO lever).
kastel identity listList 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--departmentGrant the editor role (refused for a slug absent from governance/aor.yaml).
kastel editor revokeSLUGRevoke the editor role (effective on the next request; the role is read live).
kastel editor listList editor grants and the approval-required departments.
kastel editor require-approvalDEPARTMENT--offToggle the per-department approval requirement (regulated mode, default empty).

kastel siemSIEM webhook: stream the sealed audit chain to your SOC (opt-in).

kastel siem pushDeliver undelivered sealed audit events to the configured SIEM (one cycle).

kastel dbDatabase operations: apply migrations, import the legacy SQLite store.

kastel db upgradeApply pending migrations (alembic upgrade head) to KASTEL_DB_URL.
kastel db import-sqlite--path--forceOne-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.

kastel credentials putSCOPECONNECTORPRINCIPAL--attrEncrypt and store a secret (value read from stdin, never from argv).
kastel credentials getSCOPECONNECTORPRINCIPAL--revealShow a credential's metadata; --reveal prints the decrypted value.
kastel credentials rotateSCOPECONNECTORPRINCIPALReplace a secret's value (read from stdin); bumps rotated_at.
kastel credentials rmSCOPECONNECTORPRINCIPALHard-delete a credential (offboarding, RGPD). No-op if absent.
kastel credentials lsSCOPE--connectorList stored credentials' NON-SECRET metadata (never values).
kastel credentials rekeyRe-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--limitList jobs newest-first; surfaces dead_letter loudly (invariant 4).
kastel jobs run--once--max-jobs--loop--interval--sync-interval-minutesWork the queue: one-shot drain (default/cron) or durable worker (--loop).
kastel jobs retryJOB_IDRe-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 showPrint the current governance model in plain language (never raw YAML).
kastel aor previewOPARGSShow the plain-language BEFORE/AFTER of an operation, without applying it.
kastel aor dry-runOPARGS--limit--allReport which pages an operation would hide or expose, for every principal.
kastel aor applyOPARGS--actorValidate and govern-write an operation (owner-attributed, audited, reversible).
kastel aor revertCOMMIT--actorGoverned 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--statusList moderation items: id, age, source, routed_to, rules, pages.
kastel moderation showITEM_IDShow the full effect of an item: the diff or the payload, rules, provenance.
kastel moderation approveITEM_ID--note--decided-byApprove an item: apply its effect all-or-nothing (git merge for a brain_diff).
kastel moderation rejectITEM_ID--note--decided-byReject 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--sinceDistil uncompiled agent traces into lesson candidates through the Guard.
kastel lessons prune--beforePrune 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-runGenerate the week's impact-ranked questions and the value report.
kastel digest send--week--forceNotify each recipient with pending questions: a count-only pointer.
kastel digest prefs--for--set-channel--email--slack-webhook-urlShow or set one person's notification preferences (INV-27).
kastel digest answerQUESTION_IDANSWER_TEXT--asRecord a person's answer to a generated question as a governed write.

kastel pagePage lifecycle operations (operator-only): archive a page.

kastel page archiveREL_PATHArchive 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 listList the mailbox slugs that have raw copies (erasable with --mailbox).
kastel erase pendingList source deletions flagged for admin review (retained, not yet erased).
kastel erase approve--connector--path--requesterApprove pending flags: erase the flagged raw copies via the sealed admin lever.
kastel erase dismiss--connector--pathDismiss 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 questionsThe per-deployment question set the score is measured on (spec 3.2).
kastel score questions addQUESTION--expected--departmentAdd one active question to the deployment's question set.
kastel score questions list--statusList the question set (id, status, scope, expected pages, text).
kastel score questions importFILEImport a question-set file (the G-10 path: a golden set becomes the demo set).
kastel score questions confirmQUESTION_ID--question--expectedOwner 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--jsonCompile memory/evals/ -> question set, then compute the Context Score.
kastel eval matrix--k--jsonSweep the owned evals across the declared inference models (Kastel Enterprise).
kastel eval sentinel--k--force--jsonRun the model-liquidity regression sentinel (Kastel Enterprise).
kastel eval listList the owned eval set (id/scope/sensitivity/expected), from the markdown.
kastel eval lintStructurally 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--emailsOrder-of-magnitude API cost of onboarding a corpus, BEFORE spending money.
kastel cost show--monthShow this month's ledger usage grouped by consumer (read-only actuals).

kastel auditThe sealed local audit chain: replay a request trace.

kastel audit replayTRACE_IDReplay one request as its five audit points (read-only, local).

kastel providersThe configured inference/embedding providers and their declared posture.

kastel providers postureShow the declared data-handling posture of the configured providers.

kastel cockpitAI-system cockpit: document and export how your AI system works (portable).

kastel cockpit showPrint 'how your AI system works' (skills, agents, runtime, organization).
kastel cockpit export--outputExport the portable AI-system bundle (ai-system.md + manifest.yaml).

kastel onboardOnboarding interview: build the company's structured Brain.

kastel onboard startStart (or resume) the scoping interview and report Temps A readiness.
kastel onboard prefillDerive known facts from the imported documents (so they are not asked again).
kastel onboard askPrint the next interview question (None when the phase is covered).
kastel onboard answerTEXTAnswer the current question (the one kastel onboard ask shows).
kastel onboard mapPropose the org map (a draft to review before confirming).
kastel onboard confirm--by--editsValidate the proposed map: write the General wiki + governance/aor.yaml.
kastel onboard deptNAMEDeepen one department (Temps C): its processes, tools, and wiki.
kastel onboard statusShow 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.

kastel template package--out--from--vertical--name--author--versionExtract a template DRAFT from a deployment: structure only, content purged.
kastel template review--template--approveList review units, or mark one reviewed (tier-2, INV-3).
kastel template finalise--template--againstFinalise a template - refused unless every unit is reviewed AND the anti-leak scan against the RECORDED source is clean (INV-3 + INV-4).
kastel template scan--template--againstBLOCKING anti-leak scan (INV-4): fail on any source element in the package.

kastel entityEntity fiche maintenance (list types, merge duplicates).

kastel entity typesList this deployment's entity types: name, origin, pages.
kastel entity mergeSRC_SLUGDST_SLUG--type--src-type--dst-type--applyMerge a duplicate entity fiche into the canonical one.
kastel entity numbered-foldsList past auto-merges the ENG-145 numbering guard now refuses.

kastel packsContext packs: the task recipes under memory/packs/.

kastel packs listList every pack with its validity status (INVALID packs show the reason).
kastel packs checkSLUGValidate one or every pack; exit non-zero on any invalid pack (CI-friendly).

kastel feedbackRead the human feedback left on Brain answers (up/down + comments).

kastel feedback list--rating--days--limit--jsonList the answers people rated, newest first (badly-rated ones by default).

kastel read-auditWho read what: aggregated access counters and per-person consultation.

kastel read-audit entities--entity--consumer--days--jsonAggregated read/write day-buckets: open accumulator + sealed events.
kastel read-audit personSLUG--days--jsonOne person's local consultation record: page opens + answer citations.

kastel claimsAttributed claims: who asserts what, with what confidence.

kastel claims extract--limit--quote--enqueueExtract attributed claims from the shared Brain pages (BYOK, cached).
kastel claims list--holder--kind--page--min-weight--limit--consumerList extracted claims (deployer surface, AOR-filtered).
kastel claims searchTEXT--kind--limit--consumerSearch claim text (deployer surface, AOR-filtered).
kastel claims review--limitList promotion candidates: durable, well-attributed claims.
kastel claims promoteCLAIM_ID--to--byPropose ONE claim as a governed page edit (moderation feed decides).

kastel contradictionsContradiction probe: run history, open count, manual runs.

kastel contradictions report--limit--jsonRun history: headline rate + CI, cache hit rate, items, cost.
kastel contradictions scan--jsonRun the deterministic scan now (zero-LLM, free, no provider needed).
kastel contradictions run--enqueue--quoteRun the probe now (BYOK judge; respects the monthly budget cap).

kastel automationsThe six BYOK automatisms: what runs by itself, and switch it.

kastel automations list--jsonWhat runs by itself on this deployment, and when a change would land.
kastel automations onAUTOMATION_IDSwitch one automatism ON. It spends the deployment's BYOK from then on.
kastel automations offAUTOMATION_IDSwitch one automatism OFF.
03

Les connecteurs

Le groupe des connecteurs suit un gabarit unique, ce qui évite de répéter la même liste pour chacun. Les exceptions ci-dessous sont mesurées, pas déclarées.

kastel connectorContinuous connectors (M365): connect a mailbox, run a sync, garbage-collect, or clean.

33 connecteurs. 31 d’entre eux prennent les mêmes clean, connect, gc, offboard, sync.

asanaboxcal_comcalendlyclickup_docsconfluencecrispdocusigndropboxdropbox_signfirefliesfolkfrontgdrivegmailgonggrainguruhubspotjiram365mailchimpmondaynotionpandadocquickbookssageteamstrelloxerozoho_crm

Exceptions

  • obsidian sans : offboard
  • slack en plus : opt-in-privateopt-out-private
04

Le lanceur

Le lanceur npm installe et pilote un Kastel auto-hébergé sur votre machine. Il a sa propre poignée de commandes, et il passe tout le reste au moteur : kastel <commande moteur> exécute dans le conteneur exactement les commandes de la table ci-dessus.

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 commandes, générées depuis la ligne de commande du moteur, rafraîchie le 2026-08-23 (moteur d1e57f93ef0e).

Une question sur l’intégration ?

Écrivez-nous : la question posée par email trouve une réponse le jour même. Notre réseau d’intégrateurs partenaires peut aussi vous accompagner.

Nous contacterVoir le programme intégrateurs