Skip to main content

tritonctl command index

tritonctl is the tenant command line client for Triton Cloud. It calls the customer surface of tritond and never targets the operator /v1/system/* endpoints, which belong to tritonadm. tritonctl api refuses any path under /v1/system or /internal.

Tenant and project​

Your tenant comes from the credential you authenticate with. Some listings need the tenant as a tenant= selector beside the project. For those, tritonctl reads the tenant from /v1/me and keeps it in tenant.json beside the profile's config file. A command that fails with 403 or 404 drops that entry, so the next command reads /v1/me again.

The global --project flag narrows a request to one project inside the tenant. Without the flag, tritonctl uses TRITONCTL_PROJECT, then the project stored by tritonctl configure --project.

These commands need a project and fail without one, among others:

  • instance list (and ls), instance create (and create)
  • vpc list, vpc create
  • floating-ip list, floating-ip create
  • external-ip list, external-ip create
  • meta with --scope project and no --id
  • project show and project quota with no project argument
  • subnet list, nat-gateway list, route-table list, route list, and firewall-rule list without their parent flag, which walk every VPC in the project

The error names the action. For instance list:

listing instances needs a project; pass --project, or set one with `tritonctl configure --project`

Command index​

tritonctl has 42 top-level commands. Every list subcommand except session list also answers to ls, and every delete subcommand answers to rm.

CommandAliasSubcommandsPurpose
activityNoneNoneWhat happened in your tenant, newest first.
apiNoneNoneSend one request to the control plane with your session.
api-keyNonecreate, delete, listManage your API keys, for scripts and CI.
completionNoneNonePrint a shell completion script for bash, elvish, fish, powershell, or zsh.
configureNoneNoneWrite settings, and log in only when credentials are given. See Sign-in.
createNoneNoneShortcut for tritonctl instance create.
deletermNoneShortcut for tritonctl instance delete.
diskNonelist, resize, showManage disks. See tritonctl instance.
envNoneNonePrint shell exports for the current session.
external-ipNonecreate, list, release, show, usageManage external IPs.
filesystemfsattach, attachments, create, delete, detach, list, profiles, resize, show, usageShared NFS filesystems.
firewall-rulefwrulecreate, delete, list, show, updateManage firewall rules. See tritonctl networking.
floating-ipipattach, create, delete, detach, list, showManage floating IPs. See tritonctl networking.
imageimglist, showBrowse images.
instanceinstcreate, delete, disks, list, logs, nics, reboot, show, start, stop, tagsManage instances. See tritonctl instance.
llms-full.txtNoneNonePrint the agent guide and every flag of every command.
llms.txtNoneNonePrint a guide for coding agents and an index of every command. See tritonctl llms.txt.
load-balancerlbcreate, delete, list, show, updateManage load balancers.
loginNoneNoneRe-authenticate against the configured endpoint. See Sign-in.
logoutNoneNoneDelete the config file of the profile in use, including its stored credentials.
lsNoneNoneShortcut for tritonctl instance list.
metaNoneget, list, realized, set, unsetProject and instance metadata.
nat-gatewayNonecreate, delete, list, showManage NAT gateways. See tritonctl networking.
port-forwardNoneNoneForward a local port to a port on an instance.
profileNonecreate, delete, list, show, useManage profiles, one config per cluster or project. See Profiles.
projectNonecreate, delete, list, quota, showThe projects of your tenant, and their quotas.
rebootNoneNoneShortcut for tritonctl instance reboot.
routeNonecreate, delete, list, showManage routes. See tritonctl networking.
route-tableNonecreate, delete, list, showManage route tables. See tritonctl networking.
sandboxNonecapability, claude, create, delete, exec, exec-attach, fork, fs, git, keepalive, list, network, pause, port-forward, ports, pr, rdp, resize, resume, show, snapshot, ssh-config, start, stop, template, update, urlAgent sandboxes: microVMs that run programs for you. See tritonctl sandbox.
sessionNonekill, listInspect and end live tunnel sessions.
sshNoneNoneSSH to an instance through the platform relay. Arguments after -- pass to OpenSSH.
ssh-configNoneNonePrint an ssh_config block that reaches instances as NAME.triton.
ssh-keykeycreate, delete, list, showManage SSH keys.
startNoneNoneShortcut for tritonctl instance start.
stopNoneNoneShortcut for tritonctl instance stop.
storageNoneaccess-keys, buckets, usersObject storage: buckets, storage users, and access keys. See tritonctl storage.
subnetNonecreate, delete, list, show, updateManage subnets. See tritonctl networking.
teamNoneinvitations, invite, list, remove, revoke, rolesWho is in your tenant, and invitations.
tunnelNoneNoneCopy stdin and stdout to a port on an instance. ssh runs this as its ProxyCommand.
vpcNonecreate, delete, list, show, updateManage VPCs. See tritonctl networking.
whoamiNoneNoneShow the current identity and effective scope. See Identity output.

Global flags​

All of these are declared global, so they are accepted before or after a subcommand.

FlagValueBehavior
--endpointURLCluster endpoint. Falls back to TRITONCTL_ENDPOINT, then the config file.
--api-keyToken stringAPI-key bearer to send. Falls back to TRITONCTL_API_KEY.
--projectName, UUID, or UUID prefixProject to work in. Falls back to TRITONCTL_PROJECT, then the stored project.
-p, --profileProfile nameProfile to use for this command. Falls back to TRITONCTL_PROFILE, then the profile set by profile use.
--timeoutSecondsGive up on a request after this many seconds. Default 60. 0 waits forever. Does not apply to tritonctl api.
-v, --verboseFlagOn error, print the full cause chain.
-j, --jsonFlagEmit JSON instead of a table. Same as --format json.
--formattable, json, yamlOutput format. Default table.
-o, --outputComma-separated columnsColumns to show. A dotted path such as sysinfo.hostname reads a field of the raw record. Table only.
-l, --longFlagShow the resource's wider column set. Ignored with -o.
-s, --sortComma-separated columnsSort by these columns. A leading - reverses that column. Applies to tables and JSON.
-H, --no-headersFlagOmit the table header row.
--limitNumberStop after this many rows.
-h, --helpFlagPrint help.
-V, --versionFlagPrint the version.

Output formats​

The table is the default whether stdout is a terminal, a pipe, or a file. Pass -j or --format to get a machine format.

FormatRendering
tableColumn layout with a header row, unless -H is set. A show prints the record as key value lines.
jsonPretty-printed JSON of the raw records.
yamlYAML of the raw records.

JSON is the stable interface for scripts.

tritonctl refuses flag combinations instead of ignoring a flag:

  • -j with --format set to anything other than json.
  • -o or -H with -j or --format json|yaml.
  • -s, -l, -H, or --limit on a show, which prints one record. -o keeps its meaning on a show and selects which lines print.

The STATE column of tritonctl instance list prints the bare state name, for example running. A failed instance prints failed (<REASON>).

Resource references​

Most arguments that name a resource, and --project, accept a name, a full UUID, or a UUID prefix. session kill takes a full UUID only, and a sandbox template reference treats a UUID prefix as a name. tritonctl resolves them in this order:

  1. A full UUID is fetched directly.
  2. Otherwise, an exact name match wins. A name can look like hex, so a name match beats a prefix match.
  3. Otherwise, a UUID prefix of at least four hex characters matches. Hyphens are allowed in the prefix.

Images and packages also match name@version. Some resources match a second field as well: a floating IP or external IP its address, an SSH key its fingerprint, and a NIC its MAC address.

When nothing matches, the command fails with no <NOUN> with name or id "<REF>", followed by the scope searched. When more than one resource matches, the command fails and lists the candidates.

Confirmation​

These commands confirm before they act: every delete, external-ip release, filesystem detach, meta unset, sandbox network replace, team remove, team revoke, and api with the DELETE method. Each carries three flags:

FlagBehavior
-n, --dry-runPrint what would change and stop.
-y, --yesAnswer yes to the confirmation. The summary still prints.
--keep-goingKeep executing after a step fails.

The command prints the plan to stderr, under the line This will make the following changes:. It writes the same plan to plan.json in a per-run directory. That directory is under /var/tritonctl/ when that directory exists and is writable, and otherwise under triton/tritonctl/runs/ in the user state directory, or the local data directory where there is no state directory. It then asks on the terminal:

Would you like to continue? [y/N]

y or yes proceeds. Any other answer prints Aborting. and exits 0. An empty plan prints Nothing to do.. With -j or --format, the plan is the document printed on stdout.

With no terminal to ask on, the command fails unless you pass -y:

Would you like to continue? needs a terminal to answer on; pass -y to confirm

Setting TRITON_CLI_NO_TTY makes tritonctl treat the session as having no terminal. api refuses -n, -y, and --keep-going with any method other than DELETE.

Profiles​

A profile is one config file. tritonctl picks the profile in this order:

  1. The -p or --profile flag.
  2. The TRITONCTL_PROFILE environment variable.
  3. The name stored by tritonctl profile use.
  4. default.

A profile name is 1 to 64 characters of letters, digits, -, and _.

ProfileConfig file
default<CONFIG_DIR>/config.json
Any other name<CONFIG_DIR>/profiles/<NAME>/config.json

<CONFIG_DIR> is TRITONCTL_CONFIG_DIR when set. Otherwise it is the platform user configuration directory joined with triton/tritonctl, which the source documents as ~/.config/triton/tritonctl/. profile use writes the chosen name to <CONFIG_DIR>/profile. profile use default removes that file.

profile create <NAME> --endpoint <URL> also accepts --sso-issuer and the global --project. Log in to the new profile with tritonctl -p <NAME> login.

Configuration file​

Each config file is JSON with these fields:

FieldContent
endpointCluster endpoint.
tokensPresent when logged in. Holds provider, access_token, refresh_token, access_expires_at, refresh_expires_at, and, for an SSO session, scope.
projectProject UUID used when --project is absent.
project_nameThe project's name when it was stored, for display.
sso_issuerSign-in service for login --sso.

tokens.provider records which service minted the pair, and therefore where it refreshes. kind is tritond for a password login. It is identityd for an SSO login, with the issuer and the OAuth client_id.

On Unix the file is created with mode 0600 and moved into place with an atomic rename, so the token bytes never sit on disk world-readable.

Environment variables​

VariableEffect
TRITONCTL_ENDPOINTEndpoint used when --endpoint is absent.
TRITONCTL_API_KEYAPI-key bearer used when --api-key is absent.
TRITONCTL_ACCESS_TOKENBearer used when no API key is set. Never refreshed.
TRITONCTL_PROJECTProject used when --project is absent.
TRITONCTL_PROFILEProfile used when --profile is absent.
TRITONCTL_CONFIG_DIRReplaces the default config directory.
TRITONCTL_SSO_ISSUERSign-in service for login --sso when --issuer is absent.
TRITONCTL_NO_BROWSERWhen set, login --sso does not open a local browser.
TRITON_DC_ANCHORSPath to a PEM file of extra CA certificates to trust. See TLS trust.
TRITON_CLI_NO_TTYWhen set, confirmation prompts treat the session as having no terminal.
RUST_LOGtracing filter for diagnostics on stderr. Defaults to warn.

tritonctl env emits TRITONCTL_ENDPOINT and, when a bearer is resolved, TRITONCTL_ACCESS_TOKEN as shell exports, followed by a comment line:

# eval "$(tritonctl env)" to load these into the current shell

Endpoint resolution​

tritonctl resolves the endpoint in this order, highest priority first:

  1. The --endpoint flag.
  2. The TRITONCTL_ENDPOINT environment variable.
  3. The endpoint field in the profile's config file.

With none of the three, the command fails with:

no endpoint configured: pass --endpoint, set TRITONCTL_ENDPOINT, or run `tritonctl configure`

Credential resolution​

tritonctl resolves the bearer credential in this order, highest priority first:

  1. The --api-key flag.
  2. The TRITONCTL_API_KEY environment variable.
  3. The TRITONCTL_ACCESS_TOKEN environment variable. This value is sent as-is and is never refreshed.
  4. The token pair in the profile's config file.

The first three short-circuit the stored-token path entirely. When none is present, tritonctl sends no Authorization header. A resolved bearer is attached as Authorization: Bearer on every request.

TLS trust​

The HTTPS client builds its trust store from the first source that yields certificates:

  1. The system trust store, which honors SSL_CERT_FILE and SSL_CERT_DIR.
  2. /opt/local/etc/openssl/certs and other platform certificate paths.
  3. The bundled Mozilla roots.

On top of that store, it adds the certificates in the PEM file named by TRITON_DC_ANCHORS. This lets tritonctl verify a control plane certified under a staging or private CA.

Token refresh​

When the credential comes from the config file, tritonctl inspects access_expires_at before each command. Inside 60 seconds of expiry it refreshes the pair, writes the new pair back to the config file, and uses the new access token for the command. Outside that window it uses the stored access token unchanged.

ProviderRefresh targetError when the refresh token has expired
tritondPOST to /v1/auth/refresh on the endpointrefresh token has expired; run `tritonctl login` to re-authenticate
identitydThe issuer's token endpointsession has expired; run `tritonctl login --sso` to re-authenticate

An identityd refresh holds a lock on the config across processes and re-reads the config inside it. It makes up to three attempts on a transport error, a 429, or a 5xx. An OAuth error from the issuer is returned at once.

Sign-in​

tritonctl configure runs in one of three ways:

  • With only settings flags (--endpoint, --sso-issuer, --project), it writes them without prompting and keeps any stored session. When the endpoint changes and a session exists, it prints a note that the session will now be sent to the new endpoint.
  • With --username or --password-stdin, it runs a password login against /v1/auth/login. Without --endpoint or TRITONCTL_ENDPOINT, it prompts for the endpoint, with http://localhost:8080 as the default. It prompts for a missing username or password.
  • With --sso, it writes the endpoint and sign-in service, then runs the same browser sign-in as login --sso.

A bare tritonctl configure on a terminal asks whether to sign in through the browser or with a username and password. Off a terminal it runs the password login.

tritonctl login re-authenticates the profile in use. Without --sso it POSTs a username and password to /v1/auth/login. --password-stdin reads the password from stdin. Without that flag, login prompts for it.

tritonctl login --sso runs the OAuth device-authorization flow. It prints a verification URL and a code, opens a local browser when stdout is a terminal, and waits for approval. The URL works from any machine. The sign-in service comes from --issuer, then TRITONCTL_SSO_ISSUER, then sso_issuer in the config. It must be an https:// URL of the form https://<SIGN_IN_HOST>/realms/<REALM>. Plain http:// is accepted only for a literal loopback address. A login that would change the stored sign-in service asks for confirmation on a terminal and is refused without one.

Identity output​

tritonctl whoami prints local facts first, then what it learns from the server. It reads the principal from /v1/me and the server version from /v1/health, which needs no credential.

LineContent
endpoint:Resolved endpoint.
client:tritonctl and its version.
credential:Where the bearer came from: an API key from --api-key or TRITONCTL_API_KEY, an access token from TRITONCTL_ACCESS_TOKEN, or a session token from the config file path, with (sso via <ISSUER>) for an SSO session. With no credential, it prints none and tells you to run tritonctl login.
project:Project name and UUID, or a note that none is set.
expires:For a stored session, when the access token expires and how long the refresh token stays valid.
principal:Username and user UUID, followed by kind:, federated:, tenant:, and silo:. Without a valid session: not available (no valid session).
scope:For an SSO session, the scope the sign-in service granted. Marked read-only when it lacks tenant authority.
server:tritond version, build, and git SHA, or unreachable with the cause.

whoami exits nonzero when the session is invalid or the server is unreachable. With -j or --format, it prints a single document with principal, endpoint, credential, and project, and prints nothing on failure.

See also​