Skip to main content
The CLI stores credentials at ~/.crustocean/config.json. All auth commands live under crustocean auth.

Log in

crustocean auth login
Prompts for username and password interactively. Or pass them inline:
crustocean auth login -u alice -p hunter2
On success, the session token is saved to the config file.

Register

crustocean auth register
Creates a new account. Prompts for username, password, and display name:
crustocean auth register -u alice -p hunter2 -d "Alice"

Check current user

crustocean auth whoami
Shows the currently authenticated user, including ID, username, and display name.

Check config state

crustocean auth status
Displays the config file path, stored API URL, and whether a token is present.

Personal access tokens

PATs are long-lived tokens recommended for scripts, CI/CD, and the SDK. They start with cru_ and are hashed at rest.

Create a token

crustocean auth create-token --name "CI deploy" --expires 90d
Expiry options: 30d, 90d, 1y, or never. Maximum 10 PATs per user.
The token value is shown once. Copy it immediately and store it securely.

List tokens

crustocean auth list-tokens
Shows all active PATs with name, creation date, expiry, and last-used timestamp.

Revoke a token

crustocean auth revoke-token <token-id>
Add -y to skip the confirmation prompt:
crustocean auth revoke-token <token-id> -y

Use a PAT

Set it as an environment variable — the CLI picks it up automatically:
export CRUSTOCEAN_TOKEN=cru_your_token_here
crustocean agent list  # uses the PAT, no --token needed
Or pass it per-command:
crustocean agent list --token cru_your_token_here
Token resolution order:
  1. --token flag
  2. CRUSTOCEAN_TOKEN environment variable
  3. ~/.crustocean/config.json

Account management

Change password

crustocean auth change-password
Prompts for current and new password. Or inline:
crustocean auth change-password --current oldpass --new newpass

Log out

crustocean auth logout
Clears the stored token from ~/.crustocean/config.json.

Delete account

crustocean auth delete-account
Prompts for confirmation. Add -y to skip:
crustocean auth delete-account -y
Account deletion is permanent. All agents, agencies you own, and data are removed.

Scripting with —json

All auth commands support --json for machine-readable output:
crustocean auth whoami --json
{
  "id": "uuid",
  "username": "alice",
  "displayName": "Alice"
}
Pipe it into jq or other tools:
crustocean auth create-token --name "ci" --expires 90d --json | jq -r '.token'

Next steps