Skip to content
AnchrasDocumentation
Browse documentation

Developer tools / User guide

CLI reference

Authenticate, select profiles, and automate Anchras services using table, JSON, and YAML output.

On this page

The anchras CLI calls the same service APIs used by the dashboard. Start with CLI installation, then use the command table in each service guide to find the relevant surface.

Server and identity

Use ANCHRAS_SERVER for a shell session or save a named profile. The hosted API base is https://platform.anchras.com/api; a directly exposed self-hosted web API typically has no /api prefix.

bash
export ANCHRAS_SERVER=https://platform.anchras.com/api
anchras login
anchras whoami
anchras instances list -o json

Run anchras whoami after switching profiles or credentials. API keys can grant actions while restricting specific resources; see Identity and access.

Structured output

Supported commands accept -o json or -o yaml. Use structured fields and resource IDs in automation instead of parsing human-readable tables. Observe pagination and filters when collecting full inventories.

Asynchronous operations

Creation, reconciliation, backup, and session operations can return before the underlying provider action completes. Poll the resource or run status until it reaches the expected terminal state. Inspect recorded errors before retrying operations that allocate resources.

Command reference by service

Every service guide includes the available documented command families and a link to the full API schema. Command availability follows the installed CLI release; update the CLI if the current server exposes a newer operation.

Credentials

Saved configuration is held in ~/.anchras/config.yaml. Protect it and use separate keys for automation. Do not include credentials in logs, generated documentation, or bug reports. Run anchras logout to forget saved login tokens.

CLI commands

Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.

CommandPurpose
loginInteractive email/password login or API-key profile storage. --api-key validates the key with GetCurrentUser. OIDC device-flow login is not implemented; use the supported browser SSO flow. Flags include --email, --api-key, and --server.
logoutForget the saved tokens (idempotent).
versionPrint client build metadata and the public server version when reachable. Supports --server and -o/--output.
whoamiPrint the active user, org, and server URL.
configure setCreate or update a profile in ~/.anchras/config.yaml. Flags: --profile, --server, --org, --email, --auth-source, --project (the profile's default project for the compute, storage, networking and AI resource commands; - clears it).
configure listList configured profiles. Supports -o/--output.
configure use <profile>Switch the active profile.
configure delete <profile>Delete a profile entry.