Skip to main content

Get API Key

First, you need to get an API key from the dashboard -> config -> integrations. You can use this API key to authenticate with the CLI.

Log In

Authenticate with the CLI using shardcloud auth login:
You’ll be prompted to paste your API token:
You can skip the prompt by passing your token with --token:
Either way, the CLI verifies the token against the API before saving it — an invalid token is rejected immediately with invalid token: ... rather than being written to disk.

Profiles

The CLI supports multiple named auth profiles (e.g. one per ShardCloud account, or a separate profile for CI), stored in a single config file on disk. shardcloud auth login always writes into whichever profile is active, unless you pass --profile.
shardcloud config profile add <name> only creates an empty, logged-out profile — it does not take a --token flag. Log into a specific profile with shardcloud auth login --profile <name> --token <t>.
Every command that talks to the API runs against the currently active profile. Check who that is at any time:

Logging Out

This clears the stored token for that profile but leaves the profile itself (and any other profiles) in place.

Non-Interactive / CI Authentication

There is no environment variable the CLI reads for a token override (e.g. no SHARD_TOKEN) — the only way to authenticate a script or CI job is the same --token flag used interactively, pointed at a dedicated profile so it doesn’t clobber your local login:
This persists the token to the CLI’s config file (shardcloud.json, under your user config directory) exactly like an interactive login does, so make sure your CI runner has a writable, ideally ephemeral, home/config directory for the job.

Creating Your First App

See the commands section for the full command reference and how to get started.