Skip to content

kici-admin: secrets, tokens & context

Terminal window
kici-admin secret scopes <orgId>
kici-admin secret list <orgId> <scope>
kici-admin secret set [orgId] [scope] [key] [--value <v> | --prompt | --from-stdin | --from-file <p> | --from-env <var>] [--no-trim] [--confirm-fingerprint <sha256>] [--dry-run] [--database-url <url>]
kici-admin secret set --org <orgId> --context <name> --key <k> [value-source flags as above]
kici-admin secret delete <orgId> <scope> <key> [--yes]
kici-admin secret scope create <orgId> <scope> [--json]
kici-admin secret scope rename <orgId> <oldScope> <newScope> [--json]
kici-admin secret scope delete <orgId> <scope> [--yes] [--json]
  • <orgId> is an org id this orchestrator holds. kici-admin org list prints them.
  • Secret values are write-only — there is no command to read a secret value.
  • A <scope> may be qualified with the backend that owns it (pg:production, openbao-prod:aws/creds). The qualifier selects the backend and is not part of the stored name; an unqualified scope targets the PG backend. A head that names no registered backend stays part of the path.
  • scopes aggregates every registered backend and prints each scope in qualified form. A backend that is unreachable at that moment is skipped with a warning.
  • set accepts either the positional <orgId> <scope> <key> form or the context-scope sugar form (--org + --context + --key). The two forms are mutually exclusive.
  • Value sources (mutually exclusive; first matching wins): --prompt (interactive no-echo, default on TTY), --from-stdin (read piped stdin until EOF; default when stdin is a pipe), --from-file <path> (file body, trailing newline trimmed unless --no-trim), --from-env <var> (named env var), --value <plaintext> (visible in shell history — discouraged).
  • --confirm-fingerprint <sha256hex> refuses the write unless SHA-256(value) matches the supplied 64-hex string. Pair with a value source for unattended automation.
  • --dry-run parses + validates the value, prints fingerprint + length, and skips the write.
  • --database-url (on set) switches to direct-DB mode and writes the caller-supplied encrypted_value verbatim into scoped_secrets — for a test setup that seeds secrets before the orchestrator is up.
  • delete asks for confirmation unless --yes is passed.
  • scope create, scope rename and scope delete act on a whole scope. They are the operator path for the dashboard’s scope writes (secrets.scope.* in the dashboard-write policy). Only the PG backend supports them; a scope in another backend gets an error that names the backend.
    • scope create makes an empty scope. An existing scope stays unchanged.
    • scope rename keeps the scope in its backend. It re-encrypts every secret under the new name, and the bindings to the old name move with it. It refuses a move to another backend and a rename onto a scope that already exists.
    • scope delete removes the scope, every secret in it, and the bindings to it. It asks for confirmation unless --yes is passed.
    • Each verb writes a row to the secret audit log: createScope, renameScope or deleteScope. Query them with kici-admin audit --action <action>.
  • After a successful set, the command checks whether a context has the same name as the scope. When that context is a fixed or glob context with no binding, it prints a warning on stderr. Jobs that list that context in contexts: get none of its secrets until a scope is bound to it. The secret still reaches any other context bound to its scope. A <context>:<key> git credential or registry reference to that context resolves nothing either. The warning names the kici-admin context bind command. The exit code stays 0.

For full details on encryption, backends, and key rotation, see Secrets management.

secret — scoped secret management (purge)

Section titled “secret — scoped secret management (purge)”
Terminal window
kici-admin secret purge --confirm # All orgs (nuclear — use rotate-key first)
kici-admin secret purge --confirm --org <orgId> # One org
kici-admin secret purge --confirm --database-url $URL --yes # Offline mode

purge bulk-deletes scoped_secrets rows. Recovery path for “the encryption key is lost and I can’t decrypt”. Prefer kici-admin rotate-key first — it re-encrypts rather than discards. purge is the path when the old key is gone or the ciphertext is corrupt.

Terminal window
kici-admin variable list <orgId> <context> [--values]
kici-admin variable get <orgId> <context> <key>
kici-admin variable set <orgId> <context> <key> [--value <v> | --prompt | --from-stdin | --from-file <p> | --from-env <var>] [--no-trim] [--locked] [--confirm-fingerprint <sha256>] [--dry-run]
kici-admin variable delete <orgId> <context> <key> [--yes]

Manages org-level context variables (plaintext-at-rest in the orchestrator DB). Variables are the non-secret sibling of scoped secrets — both write to the same per-context trust cone, gated by the variables.set / variables.delete switches in the dashboard-write policy. This CLI is the always-available authority path when the dashboard is disabled for either switch.

  • list prints keys + [locked] flag only; pass --values to include the inline values.
  • get prints a single variable’s value (exits non-zero if the key is missing).
  • set accepts the same value-source flag set as secret set (--prompt, --from-stdin, --from-file, --from-env, --value, --no-trim, --confirm-fingerprint, --dry-run). Add --locked to mark the variable as locked so source-level overrides cannot replace it.
  • delete asks for confirmation unless --yes is passed.
Terminal window
kici-admin backend add <name> --type <pg|vault> [options]
kici-admin backend remove <name> [--yes]
kici-admin backend list
kici-admin backend test [name] [--type <pg|vault> options]
kici-admin backend sync [name]
kici-admin backend purge-stale [--database-url <url>] [--json]

Manages external secret backends (PostgreSQL or Vault/OpenBao) for multi-source secret resolution.

  • add <name> registers a new backend. --type is required (pg or vault).
  • remove <name> deregisters a backend and makes its scopes unavailable. Prompts for confirmation unless --yes is passed.
  • list shows all registered backends with health status, scope count, last sync time, and sync interval.
  • test [name] tests connectivity of a named backend. Alternatively, pass --type with inline config options to test without registering.
  • sync [name] triggers scope discovery. Omit the name to sync all backends.
  • purge-stale (direct-DB only) deletes backends whose encrypted config can no longer be decrypted (e.g. after losing KICI_SECRET_KEY). Break-glass bootstrap verb that must run before the orchestrator starts, because BackendRegistry.loadAllStores() would otherwise crash on the stale row. Accepts --database-url (or KICI_DATABASE_URL) and --json for { deleted } output.

Vault options (--vault-url, --auth-method, --role-id, --secret-id, --secret-id-file, --token, --namespace, --mount-path, --base-path), the PostgreSQL option (--connection-string), and the options common to both (--scope-filter, --sync-interval) are listed with their defaults under backend add and backend test in the reference below. Prefer --secret-id-file over --secret-id so the AppRole secret never enters shell history.

Terminal window
kici-admin audit [--context <name>] [--routing-key <key>] [--action <action>] [--from <date>] [--to <date>] [--limit <n>] [--offset <n>] [--include-archived]

Queries the secrets operation audit log. All date filters use ISO 8601 format. Default limit is 100. --include-archived also reads rows moved to cold storage; the cold-storage scan needs --routing-key.

kici-admin api-key create and kici-admin api-key add-routing-key are deprecated and have no effect: no KiCI server serves the route they call. Both exit with an error that points at kici-admin token create. They are removed in v1.0.0 (see Deprecations). To give a developer access, mint a per-person token as described in Tokens for developers.

Terminal window
kici-admin token create <label> --role <role> [--routing-key <key>] [--expires <value>] [--subject <id>]
kici-admin token list
kici-admin token revoke <id>
  • create returns the plaintext token once. Save it immediately.
  • --role is required: owner, admin, or auditor.
  • --routing-key optionally scopes the token to a specific routing key.
  • --expires optionally sets an expiry: a duration from now (30d, 12h, 45m) or an ISO-8601 datetime. Omit it for a non-expiring token; token list shows never in the Expires column and marks a past expiry with [expired].
  • --subject optionally records who the token is for.

--subject takes the OIDC subject or the email address of the person the token is issued to:

Terminal window
kici-admin token create alice-ops --role admin --subject alice@example.com

The orchestrator stores the value and shows it in token list. It cannot verify it, and it never reads it when it authorizes a request — the token’s role and --routing-key scope decide that. --subject is advisory metadata. The orchestrator returns it to the token’s holder (kici connect prints it), and the dashboard’s RBAC drift report joins it against your organization’s membership. The report answers: whose token is this, is that person still a member, and does the token’s orchestrator role exceed their dashboard permissions.

A token created without --subject is listed as unlinked and reported as unlinked in the drift report. That is a finding, not an error: nobody can say whose token it is. Re-issue it with a subject and revoke the old one.

See Two-layer RBAC for how to read the report.

A developer who runs kici run remote or kici types straight against this orchestrator, with no KiCI Platform account, uses an orchestrator admin token. Issue one token per person, so each run and each access-log row names who started it:

Terminal window
kici-admin token create alice-dev --role admin --subject alice@example.com --expires 30d

The developer saves it with kici connect <orchestrator-url> (or sets KICI_ORCHESTRATOR_TOKEN). An auditor token can follow test runs but cannot start or cancel one. The test-run routes refuse a token created with --routing-key, because the orchestrator chooses the routing key for a test run. When the person leaves, revoke the token:

Terminal window
kici-admin token list
kici-admin token revoke <id>

Routing-key-scoped tokens cannot manage secrets

Section titled “Routing-key-scoped tokens cannot manage secrets”

A token created with --routing-key <key> is restricted to that one routing key, and every admin secret route refuses it with 403. This is deliberate: routing keys and secret scopes are different namespaces. A routing key is <provider>:<id> and identifies an inbound source; a secret scope is a path in a backend namespace, where : is reserved to qualify the backend. There is no per-routing-key slice of the secret store to grant, so there is nothing a scoped token could safely be allowed to write.

Use an unscoped admin token to manage secrets. Source-owned credentials are a separate mechanism: they live under the reserved __source__/<sourceId> scope and are managed through the source commands, not by scoping a token.

Terminal window
kici-admin rotate-key

Re-encrypts all PostgreSQL-stored secrets with the current master key. When KICI_SECRET_KEY_OLD is configured alongside KICI_SECRET_KEY, this performs a true key rotation. Without the old key, it re-encrypts at an incremented key version.

See Secrets management > Key rotation for the full procedure.

context — context management (dual-mode)

Section titled “context — context management (dual-mode)”
Terminal window
kici-admin context create --org <id> --name <name> [--type fixed|glob|template] [--glob-pattern <pattern>] [--enabled true|false] [--branch-restrictions <json>] [--repo-patterns <json>] [--required-reviewers <csv>] [--wait-timer <seconds>] [--hold-expiry <seconds>] [--minimum-trust trusted] [--database-url <url>] [--json]
kici-admin context bind --org <id> --env <name> --scope <pattern> [--host <pattern>] [--database-url <url>] [--json]
kici-admin context set-policy --org <id> --env <name> [--branch-restrictions <json>] [--repo-patterns <json>] [--required-reviewers <csv>] [--wait-timer <seconds>] [--hold-expiry <seconds>] [--minimum-trust trusted|null] [--enabled true|false] [--allow-local-execution true|false] [--database-url <url>] [--json]
kici-admin context list --org <id> [--database-url <url>] [--json]
kici-admin context show --org <id> --name <name> [--database-url <url>] [--json]
kici-admin context delete --org <id> --name <name> [--database-url <url>] [--json]
kici-admin context create-template --org <id> --template <name> [--type template] [--branch-restrictions <json>] [--required-reviewers <csv>] [--wait-timer <seconds>] [--hold-expiry <seconds>] [--minimum-trust trusted] [--variables <json>] [--database-url <url>] [--json]
kici-admin context purge [--org <id>] [--database-url <url>] [--json]
kici-admin context source-override list --org <id> --env <name> [--routing-key <key>] [--json]
kici-admin context source-override set --org <id> --env <name> --routing-key <key> --key <key> --value <value> [--json]
kici-admin context source-override delete --org <id> --env <name> --routing-key <key> --key <key> [--json]

Seeds and mutates context rows (plus their variables and scope bindings). Defaults to the orchestrator admin API; pass --database-url (or set KICI_DATABASE_URL) to run the SQL directly — for a test setup that seeds contexts before the orchestrator is up.

  • create upserts a context (idempotent by org + name). On a new context, an omitted policy flag leaves that rule unset. On an existing context, an omitted policy flag leaves the stored value unchanged in both modes, and an explicit empty value ('[]', an empty CSV, or --minimum-trust null) clears it. --glob-pattern is required when --type glob and sets the match pattern that resolves run scopes to this context; passing it with any other --type is an error. --repo-patterns limits the context to repositories whose owner/repo matches one of the globs (see Repository patterns).
  • create prints a warning on stderr when the context it created or updated is a fixed or glob context with no binding, because such a context delivers no secrets to the jobs that list it in contexts:. A <context>:<key> reference to such a context resolves nothing either. The warning names the kici-admin context bind command. The exit code stays 0.
  • bind upserts a context_bindings row mapping a scope pattern to a context. --host <pattern> scopes the binding to a subset of hosts (default ** = all hosts) — see Per-host secret scoping for the host dimension, the templating syntax, and precedence.
  • set-policy updates only the provided policy fields on an existing context. Pass --minimum-trust null to clear the tier gate, --repo-patterns '[]' to clear the repository patterns, and --hold-expiry '' (an empty value) to clear the hold expiry. Omitting a flag leaves that field untouched, which is why clearing needs an explicit empty / null value rather than omission. --allow-local-execution true|false sets whether test runs may resolve the context (see The allowLocalExecution context flag).
  • list / show read back the current state; show also returns variables and bindings.
  • delete removes a context and cascades its bindings, variables, and overrides. Reports deleted=true on success and exits non-zero if no matching context exists. Pending held runs block the deletion with a clear error (HTTP mode returns 409) — approve or reject them first; resolved held-run history survives the deletion with its context reference cleared.
  • create-template creates/updates a template context and seeds its variables in one call (--variables '{"K":"V"}'). Like create, it leaves the policy fields you omit unchanged.
  • purge (direct-DB only) bulk-deletes every context for an org (cascading bindings, variables, and overrides) and removes the org’s held runs for a clean slate. Omit --org to clear all orgs. Destructive break-glass / test-reset verb with no orchestrator HTTP wire; requires --database-url (or KICI_DATABASE_URL). Reports { contextsDeleted, heldRunsDeleted } with --json.
  • source-override manages per-source overrides: the value one source (routing key) sees for a context variable key. A locked context variable keeps its own value. These verbs are the operator path for the dashboard’s contexts.source_overrides.* writes in the dashboard-write policy. They call the orchestrator admin API only; --database-url does not apply.
    • source-override list prints every source’s overrides in the context. --routing-key narrows the list to one source.
    • source-override set creates or replaces one override.
    • source-override delete removes one override, so the source resolves the key from the context variables.
    • A context that does not exist in the org is refused with HTTP 404 and a non-zero exit.

See Contexts for the broader feature walkthrough.

Deprecated: use kici-admin token create (removed in v1.0.0)

Synopsis: kici-admin api-key

Deprecated: use kici-admin token create (removed in v1.0.0)

Synopsis: kici-admin api-key add-routing-key <id> <pattern>

Arguments

ArgumentRequiredVariadicDescription
idyesno
patternyesno

Deprecated: use kici-admin token create (removed in v1.0.0)

Synopsis: kici-admin api-key create [options]

Options

OptionDefaultDescription
--label <label>unnamedIgnored
--routing-keys <keys>Ignored

Query the secrets audit log

Synopsis: kici-admin audit [options]

Options

OptionDefaultDescription
--context <name>Filter by context name
--routing-key <rk>Filter by routing key (required for cold-store scan)
--action <action>Filter by action type
--from <date>From date (ISO 8601)
--to <date>To date (ISO 8601)
--limit <n>100Max entries to return
--offset <n>Offset for pagination
--include-archivedfalseInclude rows from cold storage

Manage secret backends

Synopsis: kici-admin backend

Register a new secret backend

Synopsis: kici-admin backend add <name> [options]

Arguments

ArgumentRequiredVariadicDescription
nameyesno

Options

OptionDefaultDescription
--type <type>Backend type: pg or vault
--vault-url <url>Vault/OpenBao URL (env: KICI_BACKEND_VAULT_URL)
--auth-method <method>approleVault auth method: approle or token
--role-id <id>Vault AppRole role ID (env: KICI_BACKEND_ROLE_ID)
--secret-id <id>Vault AppRole secret ID (env: KICI_BACKEND_SECRET_ID)
--secret-id-file <path>Read Vault secret ID from file (avoids shell history)
--token <token>Vault token (env: KICI_BACKEND_TOKEN)
--namespace <ns>Vault namespace
--mount-path <path>secretVault mount path
--base-path <path>Vault base path for secrets
--connection-string <url>PG connection string (env: KICI_BACKEND_PG_URL)
--scope-filter <pattern>**Scope filter glob pattern
--sync-interval <ms>300000Sync interval in milliseconds

List all registered secret backends

Synopsis: kici-admin backend list

Delete backends with encrypted config that can no longer be decrypted (direct-DB, pre-orchestrator)

Synopsis: kici-admin backend purge-stale [options]

Options

OptionDefaultDescription
--database-url <url>Orchestrator DB URL (or KICI_DATABASE_URL / DATABASE_URL)
--jsonEmit JSON output

Remove a registered secret backend

Synopsis: kici-admin backend remove <name> [options]

Arguments

ArgumentRequiredVariadicDescription
nameyesno

Options

OptionDefaultDescription
--yesSkip confirmation prompt

Trigger scope discovery sync (all backends if name omitted)

Synopsis: kici-admin backend sync [name]

Arguments

ArgumentRequiredVariadicDescription
namenono

Test backend connectivity (by name or inline config)

Synopsis: kici-admin backend test [name] [options]

Arguments

ArgumentRequiredVariadicDescription
namenono

Options

OptionDefaultDescription
--type <type>Backend type: pg or vault
--vault-url <url>Vault/OpenBao URL (env: KICI_BACKEND_VAULT_URL)
--auth-method <method>approleVault auth method: approle or token
--role-id <id>Vault AppRole role ID (env: KICI_BACKEND_ROLE_ID)
--secret-id <id>Vault AppRole secret ID (env: KICI_BACKEND_SECRET_ID)
--secret-id-file <path>Read Vault secret ID from file
--token <token>Vault token (env: KICI_BACKEND_TOKEN)
--namespace <ns>Vault namespace
--mount-path <path>secretVault mount path
--base-path <path>Vault base path
--connection-string <url>PG connection string (env: KICI_BACKEND_PG_URL)

Context management (dual-mode)

Synopsis: kici-admin context

Upsert a context_bindings row (scope_pattern → context)

Synopsis: kici-admin context bind [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--env <name>Context name
--scope <pattern>Scope pattern (e.g. “staging” or “aws/prod/**“)
--host <pattern>**Host selector (exact/glob/regex over agentId/host/labels); ”**” = all hosts
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Upsert a context (idempotent by org+name)

Synopsis: kici-admin context create [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--name <name>Context name
--type <t>fixedContext type (fixed|glob|template)
--glob-pattern <pattern>Glob pattern matched against declared context names (required with —type glob)
--enabled <bool>Enabled flag (true|false); a new context is enabled, an existing one keeps its flag
--branch-restrictions <json>JSON array of allowed branches (e.g. ’[“main”]‘)
--repo-patterns <json>JSON array of owner/repo globs the context is limited to (e.g. ’[“acme/*”]’; ’[]’ clears)
--required-reviewers <csv>CSV of required reviewer user IDs (or empty to clear)
--wait-timer <seconds>Wait timer before release (seconds)
--hold-expiry <seconds>Hold expiry TTL (seconds)
--minimum-trust <level>Minimum trust (trusted)
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Create or update a context template + its seed variables

Synopsis: kici-admin context create-template [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--template <name>Template name
--type <t>templateContext type
--branch-restrictions <json>JSON array of allowed branches
--required-reviewers <csv>CSV of required reviewer user IDs
--wait-timer <seconds>Wait timer (seconds)
--hold-expiry <seconds>Hold expiry TTL (seconds)
--minimum-trust <level>Minimum trust (trusted)
--variables <json>JSON object of env variables to seed (e.g. ’{“K”:“V”}‘)
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Delete a context (cascades bindings, variables, overrides; held-run history survives; pending held runs block with a clear error, resolved holds do not)

Synopsis: kici-admin context delete [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--name <name>Context name
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

List contexts for an org

Synopsis: kici-admin context list [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Delete all contexts (and held runs) for an org — direct-DB break-glass / warm-start reset

Synopsis: kici-admin context purge [options]

Options

OptionDefaultDescription
--database-url <url>Use direct DB access (or KICI_DATABASE_URL)
--org <id>Restrict purge to a single org (omit to purge all orgs; kici-admin org list prints the org ids)
--jsonEmit JSON output

Update policy fields on a context (only provided fields change)

Synopsis: kici-admin context set-policy [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--env <name>Context name
--branch-restrictions <json>JSON array of allowed branches
--repo-patterns <json>JSON array of owner/repo globs the context is limited to (e.g. ’[“acme/*”]’; ’[]’ clears)
--required-reviewers <csv>CSV of required reviewer user IDs (empty to clear)
--wait-timer <seconds>Wait timer before release (seconds)
--hold-expiry <seconds>Hold expiry TTL in seconds (empty to clear)
--minimum-trust <level>Minimum trust (trusted, or “null” to clear)
--enabled <bool>Enabled flag (true|false)
--allow-local-execution <bool>Allow CLI/test runs to resolve this env (true|false)
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Show a single context with variables + bindings

Synopsis: kici-admin context show [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--name <name>Context name
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--jsonEmit JSON output

Per-source variable overrides in a context (HTTP only)

Synopsis: kici-admin context source-override

Delete one source override, so the source resolves the key from the context variables

Synopsis: kici-admin context source-override delete [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--env <name>Context name
--routing-key <key>Routing key of the source the override applies to
--key <key>Variable key
--jsonEmit JSON output

List the source overrides in a context, for every source unless —routing-key

Synopsis: kici-admin context source-override list [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--env <name>Context name
--routing-key <key>Only list the overrides for this source routing key
--jsonEmit JSON output

Set the value one source sees for a context variable key. A locked context variable keeps its own value.

Synopsis: kici-admin context source-override set [options]

Options

OptionDefaultDescription
--org <id>Org id (kici-admin org list prints the org ids)
--env <name>Context name
--routing-key <key>Routing key of the source the override applies to
--key <key>Variable key
--value <value>Override value
--jsonEmit JSON output

Rotate the master encryption key (re-encrypts every master-key-wrapped store: scoped_secrets, config_versions, secret_backends, orchestrator_signing_keys, dashboard_encryption_keys, run_ephemeral_keys, run_secret_outputs and the sealed secrets of queued and waiting jobs)

Synopsis: kici-admin rotate-key

Manage scoped secrets

Synopsis: kici-admin secret

Delete a secret

Synopsis: kici-admin secret delete <orgId> <scope> <key> [options]

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)
scopeyesno
keyyesno

Options

OptionDefaultDescription
--yesSkip confirmation prompt

List secret key names in a scope (values are never shown)

Synopsis: kici-admin secret list <orgId> <scope>

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)
scopeyesno

Bulk-delete scoped_secrets. Irreversible — pair with rotate-key for recovery.

Synopsis: kici-admin secret purge [options]

Options

OptionDefaultDescription
--database-url <url>Use direct DB access instead of HTTP (offline mode)
--confirmExplicit confirmation flag
--org <orgId>Restrict to a single org (defaults to ALL orgs; kici-admin org list prints the org ids)
--yesSkip interactive confirmation prompt (for scripted use)

Create, rename or delete a secret scope

Synopsis: kici-admin secret scope

Create an empty secret scope. A : qualifier selects the backend; an unqualified scope targets the PG backend. An existing scope stays unchanged.

Synopsis: kici-admin secret scope create <orgId> <scope> [options]

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)
scopeyesno

Options

OptionDefaultDescription
--jsonEmit JSON output

Delete a secret scope and every secret in it

Synopsis: kici-admin secret scope delete <orgId> <scope> [options]

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)
scopeyesno

Options

OptionDefaultDescription
--yesSkip confirmation prompt
--jsonEmit JSON output

Rename a secret scope inside its backend. Refuses a move between backends and a rename onto a scope that already exists.

Synopsis: kici-admin secret scope rename <orgId> <oldScope> <newScope> [options]

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)
oldScopeyesno
newScopeyesno

Options

OptionDefaultDescription
--jsonEmit JSON output

List secret scopes for an organization, from every registered backend, qualified as :

Synopsis: kici-admin secret scopes <orgId>

Arguments

ArgumentRequiredVariadicDescription
orgIdyesnoOrg id (kici-admin org list prints the org ids)

Set a secret value. Positional form: “set ”. Sugar form (context scope): “set —org —context —key ”. Value comes from one of: —prompt (default on TTY), —from-stdin (default on pipe), —from-file , —from-env , —value

(discouraged). Synopsis: kici-admin secret set [orgId] [scope] [key] [options] Arguments Argument Required Variadic Description orgId no no Org id (kici-admin org list prints the org ids) scope no no key no no Options Option Default Description --value &#x3C;value> Secret value via argv (visible in shell history; prefer —prompt) --org &#x3C;orgId> Org id (use with —context + —key; mutually exclusive with positional form; kici-admin org list prints the org ids) --context &#x3C;name> Context scope — sugar for positional &#x3C;scope>. Requires —org and —key. --key &#x3C;key> Secret key name (use with —org + —context) --prompt Interactive no-echo prompt (requires TTY) --from-stdin Read value from piped stdin until EOF --from-file &#x3C;path> Read value from a file (trailing newline trimmed) --from-env &#x3C;var> Read value from a named environment variable --no-trim When reading —from-file, keep the trailing newline (default: trim once) --confirm-fingerprint &#x3C;sha256hex> Refuse the write unless SHA-256(value) matches this 64-hex string --dry-run Parse + validate the value, print fingerprint + length, do not write --database-url &#x3C;url> Direct-DB mode: write encrypted_value verbatim to scoped_secrets (offline; skips HTTP + encryption) kici-admin tokenSection titled “kici-admin token” Manage admin API tokens Synopsis: kici-admin token kici-admin token createSection titled “kici-admin token create” Create a new admin API token Synopsis: kici-admin token create &#x3C;label> [options] Arguments Argument Required Variadic Description label yes no Options Option Default Description --role &#x3C;role> Token role (owner, admin, auditor) --routing-key &#x3C;key> Restrict the token to a single source routing key (e.g. “github:42”). The token can only act on requests targeting that routing key, and is refused (403) on every secret route — the secret store has no per-routing-key slice, so secrets need an unscoped token. Without this, the token has full orchestrator access. --expires &#x3C;value> Optional expiry: a duration from now (“30d”, “12h”, “45m”) or an ISO-8601 datetime. Omit for a non-expiring token. --subject &#x3C;id> Record the intended holder of this token — an OIDC subject or an email address. Advisory metadata: the orchestrator cannot verify it and never reads it when authorizing a request. It is what lets the dashboard RBAC drift report say whose token this is; a token created without it is reported as unlinked. kici-admin token listSection titled “kici-admin token list” List all admin API tokens Synopsis: kici-admin token list kici-admin token revokeSection titled “kici-admin token revoke” Revoke an admin API token Synopsis: kici-admin token revoke &#x3C;id> Arguments Argument Required Variadic Description id yes no kici-admin variableSection titled “kici-admin variable” Manage context variables Synopsis: kici-admin variable kici-admin variable deleteSection titled “kici-admin variable delete” Delete a context variable Synopsis: kici-admin variable delete &#x3C;orgId> &#x3C;context> &#x3C;key> [options] Arguments Argument Required Variadic Description orgId yes no Org id (kici-admin org list prints the org ids) context yes no key yes no Options Option Default Description --yes Skip confirmation prompt kici-admin variable getSection titled “kici-admin variable get” Print the value of a single variable Synopsis: kici-admin variable get &#x3C;orgId> &#x3C;context> &#x3C;key> Arguments Argument Required Variadic Description orgId yes no Org id (kici-admin org list prints the org ids) context yes no key yes no kici-admin variable listSection titled “kici-admin variable list” List org-level variables in a context Synopsis: kici-admin variable list &#x3C;orgId> &#x3C;context> [options] Arguments Argument Required Variadic Description orgId yes no Org id (kici-admin org list prints the org ids) context yes no Options Option Default Description --values Print variable values inline (default: keys + locked flag only) kici-admin variable setSection titled “kici-admin variable set” Set a context variable. Value comes from one of: —prompt (default on TTY), —from-stdin (default on pipe), —from-file &#x3C;path>, —from-env &#x3C;VAR>, —value &#x3C;plaintext> (discouraged). Synopsis: kici-admin variable set &#x3C;orgId> &#x3C;context> &#x3C;key> [options] Arguments Argument Required Variadic Description orgId yes no Org id (kici-admin org list prints the org ids) context yes no key yes no Options Option Default Description --value &#x3C;value> Variable value via argv (visible in shell history) --prompt Interactive no-echo prompt (requires TTY) --from-stdin Read value from piped stdin until EOF --from-file &#x3C;path> Read value from a file (trailing newline trimmed) --from-env &#x3C;var> Read value from a named environment variable --no-trim When reading —from-file, keep the trailing newline (default: trim once) --locked Mark the variable as locked (source overrides cannot replace it) --confirm-fingerprint &#x3C;sha256hex> Refuse the write unless SHA-256(value) matches this 64-hex string --dry-run Parse + validate the value, print fingerprint + length, do not write &#x3C;!-- END GENERATED: kici-admin-secrets-tokens-context --></plaintext> </div> <footer class="sl-flex astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"> </div> <div class="pagination-links print:hidden astro-u2l5gyhi" dir="ltr"> <a href="/operator/orchestrator/kici-admin/sources/" rel="prev" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg> <span class="astro-u2l5gyhi"> Previous <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">kici-admin: sources</span> </span> </a> <a href="/operator/orchestrator/kici-admin/agents-peers-hosts/" rel="next" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg> <span class="astro-u2l5gyhi"> Next <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">kici-admin: agents, peers &amp; hosts</span> </span> </a> </div> </footer> <footer class="kici-site-footer astro-sz7xmlte"> <span class="astro-sz7xmlte">© 2026 KiCI · operated by <a href="https://www.linkedin.com/in/albertomarchetti/" target="_blank" rel="noopener noreferrer" class="astro-sz7xmlte">Alberto Marchetti</a></span> <span class="kici-site-footer-links astro-sz7xmlte"> <a href="https://kici.dev" class="astro-sz7xmlte">kici.dev</a> <a href="https://kici.dev/terms" class="astro-sz7xmlte">Terms</a> <a href="https://kici.dev/privacy" class="astro-sz7xmlte">Privacy</a> <a href="https://kici.dev/acceptable-use" class="astro-sz7xmlte">Acceptable use</a> <a href="https://kici.dev/cookies" class="astro-sz7xmlte">Cookies</a> <a href="https://github.com/kici-dev/kici-public" class="astro-sz7xmlte">GitHub</a> <a href="https://www.npmjs.com/package/kici" class="astro-sz7xmlte">npm</a> </span> </footer> </div> </div> </main> </div> </div> </div> </div> </body></html>