CLI reference
The alquimia CLI is the primary way to manage agentspaces, agent specs, tools, models, topics, files, secrets, and OCI artifacts from the terminal.
Global options
Section titled “Global options”All commands respect these environment variables and options:
| Variable | Default | Description |
|---|---|---|
ALQUIMIA_REGISTRY_DIR | — | Root directory for local TinyDB registries |
ALQUIMIA_OCI_SUBPROCESS_TIMEOUT | 120 | Ceiling (seconds) on any single oras/cosign invocation |
--namespace / -n | default | Agentspace to operate on |
--fields / -f | all | Comma-separated field list for list commands |
--debug | false | Enable verbose logging |
Top-level commands
Section titled “Top-level commands”| Command | Description |
|---|---|
alquimia registry ... | Manage agentspaces and their contents |
alquimia explore ... | List repositories and tags in a remote OCI registry |
alquimia local ... | Run local chat sessions and inspect history |
alquimia code ... | Alquimia Code TUI (when available) |
alquimia registry
Section titled “alquimia registry”Repository lifecycle
Section titled “Repository lifecycle”| Command | Description |
|---|---|
alquimia registry create | Create a new agentspace |
alquimia registry update | Update agentspace metadata |
alquimia registry list | List local agentspaces |
alquimia registry inspect | Show agentspace metadata |
alquimia registry destroy | Delete an agentspace and all contents |
alquimia registry publish | Push an agentspace to OCI |
alquimia registry promote | Copy an already-published OCI artifact to another target |
alquimia registry unpublish | Remove an OCI manifest |
alquimia registry pull | Pull an agentspace from OCI and overwrite local dist.json |
alquimia registry fetch [--target <repo_id>] [--tag <tag>] [--no-cache] | Pull from OCI; without --tag overwrites dist.json, with --tag caches a versioned snapshot |
alquimia registry versions | List cached versioned snapshots |
alquimia registry flush-version <tag> | Remove a cached versioned snapshot and purge tag-scoped blob IDs |
alquimia registry index ensure | Create the namespace index anchor |
alquimia registry index status | Show index health and unhealed publish errors |
alquimia registry index reindex | Re-attach index entries for locally known publishes |
alquimia registry index prune | Detach index entries whose artifact is gone |
alquimia registry index migrate | Move an artifact into the deployment-owned namespace path |
alquimia registry set-identity | Default actor and assisting parties for Boltzmann brains (Gaussia) |
alquimia registry set-authenticity | Default pull authenticity policy for Boltzmann brains (Gaussia) |
registry create
Section titled “registry create”alquimia registry create \ --name production \ --tag latest \ --user-id alice \ --description "Production support agents"registry create accepts --name, --tag, --user-id, --description, --source-repo-id, and --egress-allowlist (comma-separated allowed hosts).
registry update
Section titled “registry update”alquimia registry update --namespace production \ --tag v1.2.0 \ --description "Production support agents"registry update changes only the fields you pass. Missing options leave the existing value unchanged. It accepts --tag, --user-id, --description, --visibility, --status, --source-repo-id, and --egress-allowlist. Use --clear-description, --clear-source-repo-id, or --clear-egress-allowlist to remove those values. The agentspace name is not editable because it forms the published OCI path.
registry publish
Section titled “registry publish”# Publish the whole agentspace to its canonical deployment pathalquimia registry publish --namespace production --tag v1.2.0
# Publish to an alternate target repositoryalquimia registry publish --namespace production --target oci.example.com/agents/production
# Publish only a subset of agents and the resources they reachalquimia registry publish --namespace production \ --include-agents onboarder,closer \ --exclude-agents deprecated-bot
# Also push secret metadata (not values) as a private layeralquimia registry publish --namespace production --include-secretsPublish supports:
| Flag | Description |
|---|---|
--tag | OCI tag to publish under (defaults to the agentspace’s current tag). |
--target | Override the target OCI repository. Must include a repository name. |
--include-agents | Comma-separated assistant_ids to include. Only those agents and the tools, topics, files, models, Boltzmann brains, parameters, and secrets reachable from them are published. |
--exclude-agents | Comma-separated assistant_ids to exclude (applied after --include-agents). |
--include-secrets | Also push secret metadata (not values) as a private layer |
--force | Take over a tag published by a different author |
When --include-agents or --exclude-agents is used, the publish is filtered to the selected agents and their transitive resources. The unused-secret guard is skipped during subset publishes so that intentionally omitted agents do not trigger false positives.
registry promote
Section titled “registry promote”Copy an already-published artifact to another target without re-pushing from the local workspace. This avoids the bug fixed in 0.7.0 where external publish targets could overwrite the local version pointer or hydrate from the wrong registry.
# Copy the production tag to a staging OCI repositoryalquimia registry promote \ --namespace production \ --tag v1.2.0 \ --target ghcr.io/acme/agents/staging
# Promote to an external registry, authorizing through the registry ACLalquimia registry promote \ --namespace production \ --tag v1.2.0 \ --target oci.external.com/acme/agents/production \ --registry-auth external-registryregistry promote accepts the same --target, --tag, and --force flags as publish. The source digest is read from the namespace index, so the artifact must already have been published.
registry unpublish
Section titled “registry unpublish”alquimia registry unpublish --namespace production --tag v1.2.0 accepts --target to remove a manifest from a specific repository. It also deletes the associated cosign .sig and .att tags so republishes do not leave orphan signature material behind.
# Remove a published manifest from the canonical pathalquimia registry unpublish --namespace production --tag v1.2.0
# Remove from an alternate target repositoryalquimia registry unpublish --namespace production --tag v1.2.0 \ --target oci.example.com/agents/productionregistry index
Section titled “registry index”alquimia registry index ensurealquimia registry index statusalquimia registry index reindex --namespace production --dry-runalquimia registry index prune --dry-runalquimia registry index migrate -n productionregistry index reindex prints a summary of repositories visited, namespace-filter mismatches, and Boltzmann-brain namespace mismatches. Agentspace load failures are logged and cause the command to exit non-zero.
Agents
Section titled “Agents”| Command | Description |
|---|---|
alquimia registry agents add <path> | Import an agent from JSON |
alquimia registry agents list | List agents |
alquimia registry agents inspect <assistant_id> | Show full spec |
alquimia registry agents add support-bot.json --namespace defaultalquimia registry agents inspect support-bot --namespace defaultSecrets
Section titled “Secrets”| Command | Description |
|---|---|
alquimia registry secrets add <key> | Register a secret definition |
alquimia registry secrets put <key> <value> | Store a value in the resolver |
alquimia registry secrets get <key> | Show the resolved value |
alquimia registry secrets list | List secret definitions |
alquimia registry secrets requirements <assistant_id> | List every secret an agent needs, including secrets reached through refs, with resolution status |
alquimia registry secrets add RESPONSE_PROVIDER_API_KEY \ --scope shared --required
alquimia registry secrets put RESPONSE_PROVIDER_API_KEY sk-xxx
# Store a per-user value for a user-scoped secretalquimia registry secrets add RESPONSE_PROVIDER_API_KEY \ --scope shared --user-scopedalquimia registry secrets put RESPONSE_PROVIDER_API_KEY sk-alice-xxx \ --user-id alice
alquimia registry secrets get RESPONSE_PROVIDER_API_KEY --user-id aliceSecret environment keys use the agentspace name and assistant ID to avoid collisions:
| Scope | Env key | Per-user env key |
|---|---|---|
global | KEY | AGENTSPACE_NAME__USER__USER_ID__KEY |
shared | AGENTSPACE_NAME__KEY | AGENTSPACE_NAME__USER__USER_ID__KEY |
local | AGENTSPACE_NAME__ASSISTANT_ID__KEY | AGENTSPACE_NAME__ASSISTANT_ID__USER__USER_ID__KEY |
AGENTSPACE_NAME is normalized for environment variables: uppercased, - and . become _, and a leading digit is prefixed with _. Segments are joined with __ so boundaries cannot collide.
Use --user-scoped when adding a secret to opt into per-user values. For a user-scoped secret, supplying a user_id reads only the per-user value and fails closed if none is set; there is no fallback to the scope default. For a non-user-scoped secret, any user_id is ignored and the scope default is always used. global secrets do not support per-user overrides.
Inspect secret requirements for an agent
Section titled “Inspect secret requirements for an agent”alquimia registry secrets requirements <assistant_id> lists every secret the agent references, including secrets reached only through model_ref, shield_ref, audio_ref, and tool_ref. Each key is reported with its resolution status so missing secrets can be caught before runtime.
alquimia registry secrets requirements support-bot --namespace defaultThe command mirrors the POST /registry/secret/requirements/{assistant_id} endpoint.
Parameters
Section titled “Parameters”| Command | Description |
|---|---|
alquimia registry parameters add <key> | Register a parameter |
alquimia registry parameters list | List parameters |
alquimia registry parameters add SUPPORT_TIER \ --default L1 --assistant-id support-bot \ --description "Support escalation tier"| Command | Description |
|---|---|
alquimia registry tools add <registered_tool_id> | Register a tool connection |
alquimia registry tools list | List tool registrations |
alquimia registry tools inspect <registered_tool_id> | Show registration |
alquimia registry tools set-operation <tool_id> <name> | Classify one operation |
alquimia registry tools add filesystem-tools \ --provider-id mcp \ --connection-config '{"url": {"$secretRef": "MCP_PROVIDER_URL"}}'
alquimia registry tools set-operation filesystem-tools "delete_*" \ --match glob \ --severity destructive \ --tier-grants operator \ --approval-requiredA ToolRegistration JSON file includes registered_tool_id, provider_id (mcp, llama-stack, a2a, or client), connection_config, and operations. Optional fields include name, description, tags, and a shields map for content shields on tool outputs. For provider_id: "client", pass --tool-schemas with a JSON array of tool definitions instead of a connection config.
Shields
Section titled “Shields”| Command | Description |
|---|---|
alquimia registry shields add <registered_shield_id> | Register a reusable shield connector |
alquimia registry shields set <registered_shield_id> | Update a shield registration |
alquimia registry shields list | List shield registrations |
alquimia registry shields inspect <registered_shield_id> | Show a shield registration |
alquimia registry shields delete <registered_shield_id> | Remove a shield registration |
alquimia registry shields add toxicity-classifier \ --connector '{"provider_id":"huggingface/text-classification","url":"https://your-hf-endpoint.com","label_map":{"LABEL_0":"safe","LABEL_1":"toxic"}}' \ --namespace default
alquimia registry shields set toxicity-classifier \ --description "Shared toxicity endpoint" \ --tags safety,production \ --namespace default
alquimia registry shields inspect toxicity-classifier --namespace defaultregistry shields set changes only the options you pass; omitting --connector keeps the existing connector. Use --clear-description or --clear-tags to remove those fields.
A ShieldRegistration contains registered_shield_id, connector, and optional name, description, and tags. Reference a registered shield from an agent spec with shield_ref inside a shield-config wrapper.
Models
Section titled “Models”| Command | Description |
|---|---|
alquimia registry models add <path> | Register a reusable model from JSON |
alquimia registry models list | List model registrations |
alquimia registry models add gpt-4o-mini.json --namespace defaultA model registration JSON file includes registered_model_id, provider_id, params, and optionally name, vendor, description, tags, and attribution_id:
{ "registered_model_id": "gpt-4o-mini", "provider_id": "openai-compatible", "name": "GPT-4o mini", "vendor": "openai", "params": { "model": "gpt-4o-mini", "temperature": 0.0, "api_key": { "$secretRef": "RESPONSE_PROVIDER_API_KEY" } }, "attribution_id": "openai/gpt-4o-mini"}attribution_id is how provenance names the model when it proposes knowledge (for example, in ingest). It defaults to <provider_id>/<params.model> when that is a usable identifier.
Topics and files
Section titled “Topics and files”| Command | Description |
|---|---|
alquimia registry topics add <topic_id> | Register a knowledge topic |
alquimia registry topics list | List topics |
alquimia registry topics inspect <topic_id> | Show topic registration |
alquimia registry topics set-policy <topic_id> | Update access policy |
alquimia registry topics add-file <topic_id> | Upload and index a file |
alquimia registry topics remove-file <topic_id> <file_id> | Remove a file |
alquimia registry topics rebuild <topic_id> | Re-index all files |
alquimia registry files list | List file registrations |
alquimia registry files inspect <file_id> | Show file metadata |
alquimia registry files read <file_id> | Download bytes |
alquimia registry files set-policy <file_id> | Set or clear a file-level access policy |
alquimia registry topics add product-docs \ --severity read-only \ --tier-grants reader,editor,operator \ --retrieval hybrid
alquimia registry topics add-file product-docs release-notes.pdf \ --hydrateRegistering a topic creates its vector collection up front by default (ensure_collection=True). Use --retrieval hybrid when adding a topic to enable dense + sparse retrieval; alquimia registry topics rebuild can switch an existing topic between dense and hybrid. alquimia registry topics add-file reports the chunk count and tells you when the uploaded blob was deduplicated, and it accepts --severity, --tier-grants, and --approval-required to set a layered FileAccessPolicy. alquimia registry topics rebuild shows each file’s name next to its registered_file_id.
alquimia explore
Section titled “alquimia explore”| Command | Description |
|---|---|
alquimia explore repos | List repositories in a remote OCI registry |
alquimia explore tags <repo_id> | List tags for a repository |
alquimia registry explore catalog [--kind agentspace|boltzmann-brain] | List published artifacts from the namespace index |
alquimia registry explore entry <repo>:<tag> | Show a single index entry |
alquimia explore repos --registry ghcr.io/acmealquimia explore tags ghcr.io/acme/agents/productionalquimia registry explore catalog --registry ghcr.io/acme --kind agentspacealquimia registry explore entry ghcr.io/acme/agents/production:v1.2.0Index discovery uses a byte-stable anchor. explore catalog filters by --kind before applying the cursor, tag fallback is limited to namespaces that have not been indexed, explore tags paginates over manifests instead of fetching every manifest at once, and detaching an index entry removes orphan cosign .sig and .att tags from the anchor repository.
alquimia local
Section titled “alquimia local”Run one-off or interactive chat sessions with agents from the local registry. Available only when the local-chat extra is installed. chat and exec accept a versioned reference so you can run a specific OCI tag without changing the workspace dist.json.
| Command | Description |
|---|---|
alquimia local chat <agentspace>/<assistant>[:<tag>] | Start an interactive session |
alquimia local exec <agentspace>/<assistant>[:<tag>] <query> | Single-turn inference |
alquimia local run <assistant_id> <query> | Single-turn inference against the local workspace |
alquimia local sessions | List local sessions |
# Chat against the local workspacealquimia local chat default/support-bot --mcp-servers mcp.json
# Run a specific OCI-tagged version without mutating dist.jsonalquimia local exec production/support-bot:v1.2.0 "What is the refund policy?"alquimia local exec production/support-bot:v1.2.0 "What is the refund policy?" --no-cachealquimia local chat production/support-bot:v1.2.0 --no-cacheCommon patterns
Section titled “Common patterns”Promote an agentspace from staging to production
Section titled “Promote an agentspace from staging to production”alquimia registry publish --namespace staging --tag v1.0.0alquimia registry fetch --namespace production \ --target ghcr.io/acme/agents/staging --tag v1.0.0alquimia registry topics rebuild product-docs --namespace productionRun a versioned agentspace without changing the workspace
Section titled “Run a versioned agentspace without changing the workspace”# Pull an OCI tag into a cached versioned snapshotalquimia registry fetch --namespace myspace --tag v1.2.0
# Force a fresh pull from OCIalquimia registry fetch --namespace myspace --tag v1.2.0 --no-cache
# List cached snapshotsalquimia registry versions --namespace myspace
# Run an agent from a snapshotalquimia local exec myspace/support-bot:v1.2.0 "What is the refund policy?"
# Remove a cached snapshotalquimia registry flush-version --namespace myspace v1.2.0flush-version purges the tag-scoped blob IDs recorded during the pull, so version blobs are cleaned up even when no <tag>.json cache exists on disk.
Classify every operation on an MCP server
Section titled “Classify every operation on an MCP server”alquimia registry tools inspect filesystem-tools --for-tool "delete_file"alquimia registry tools set-operation filesystem-tools "delete_*" \ --match glob --severity destructive --tier-grants operatorRegister a model and use it in an agent
Section titled “Register a model and use it in an agent”cat > gpt-4o-mini.json <<'EOF'{ "registered_model_id": "gpt-4o-mini", "provider_id": "openai", "name": "GPT-4o mini", "vendor": "openai", "attribution_id": "openai/gpt-4o-mini", "params": {"model": "gpt-4o-mini", "temperature": 0.0}}EOF
alquimia registry models add gpt-4o-mini.json --namespace default# Then reference `model_ref: gpt-4o-mini` in the agent specHelp from the terminal
Section titled “Help from the terminal”Every command and subcommand supports --help:
alquimia --helpalquimia registry tools set-operation --helpalquimia registry topics add-file --help