Command reference
Every command, argument, and flag the CLI accepts, with its exit behaviour.
Global
shortspan [command] [flags]| Flag | Effect |
|---|---|
| Override the API host for this invocation. |
| Help for any command. |
| Print the version. |
version, config, help, and completion run without authentication. Everything else requires a token, and upgrade runs even while signed out or version-blocked.
Authentication
| Command | Does |
|---|---|
| Authenticate through the browser device flow and store the token in the OS keyring. |
| Revoke the token on the server and remove it from the keyring. |
| Show the signed-in user and the host in use. |
Context
| Command | Does |
|---|---|
| Organizations you belong to. |
| Set the active organization. |
| Projects in the active organization. |
| Set the active project (stores the resolved id). |
| Show the current configuration. |
| Print one configuration value. |
| Set one configuration value. |
Secrets
| Command | Does |
|---|---|
| List secrets and metadata. Never prints values. |
| Print the plaintext. Requires |
| Create or update a secret. |
| Inject one secret into a process without displaying it. |
| List the available secret templates. |
secret set flags
| Flag | Effect |
|---|---|
| The template to use. See |
| Provide the value non-interactively. Lands in shell history. |
| Read the value from a file. |
| One field of a multi-field template. Repeatable. |
| Place the secret in a group. |
Groups
| Command | Does |
|---|---|
| List groups in the active project. |
| Create a group. |
| Show a group and its secret keys. |
| Rename or re-describe. |
| Delete the group, leaving its secrets ungrouped. |
run
| Command | Does |
|---|---|
| Inject every secret in a group into a process's environment. |
| Add extra non-secret variables. Repeatable. |
Infrastructure
| Command | Does |
|---|---|
| Open an interactive SSH session. |
| Run a command on one server or every server with a tag. |
| Check the server matches its runner policy, changing nothing. Exits non-zero if a check fails. |
| Open an interactive database session. |
| Print connection details and a DSN instead of launching a client. |
| Tunnel through an SSH bastion. |
| Run the database client on the server rather than tunnelling. |
| Spawn a subshell with AWS credentials injected. |
| Run one command with the credentials instead of a subshell. |
| Spawn a subshell with |
| List infrastructure profiles in the active project. |
| Show every resource a profile grants and how to reach it. |
Runbooks and access
| Command | Does |
|---|---|
| List runbooks in the active project. |
| Print the steps without running them. |
| Check every step can run on its target, without running any. |
| Execute a runbook, or request approval if it requires one. |
| Request temporary access to the active project. |
| List pending access requests. Admin only. |
| Approve a request. Admin only. |
| Deny a request. Admin only. |
--duration accepts 1, 2, 4, 8, 24, 48, or 72 hours and defaults to 8. --reason is required - an access request with no stated reason is not reviewable.
Tokens and maintenance
| Command | Does |
|---|---|
| List your API tokens and when each was last used. |
| Mint a token. Shown once, never again. |
| Revoke a token immediately. |
| Print the version, commit, and build date. |
| Install the current release, or report whether one exists. |
--abilities is repeatable. Omitted, a new token gets the standard interactive set - see Signing in.
Environment variables
| Variable | Effect |
|---|---|
| Use this token instead of the OS keyring. |
| Override the configured host. |
| Suppress the background update notice. |
Default host: https://shortspan.dev. Config file: ~/.config/shortspan/config.yaml.
Exit codes
| Code | Meaning |
|---|---|
| Success. |
| The CLI failed - not authenticated, not found, permission denied. |
*n* | A wrapped process's own exit code, passed through unchanged. |
Something here wrong or missing? Tell us.