Authenticate with Skytells CLI
Sign in to Skytells, manage personal access tokens, configure project access keys, and control credential storage.
Authentication methods
The CLI supports three authentication methods. Use device flow for interactive sessions, tokens for automation, and environment variables for CI/CD.
Device flow (recommended)
The default and most secure method. Uses OAuth 2.0 Device Authorization Grant (RFC 8628).
skytells loginWhat happens:
- The CLI requests a device code from the Skytells API
- A one-time code and URL appear in your terminal
- Your browser opens the authorization page
- Approve access in the browser
- The CLI stores your token at
~/.config/skytells/credentials.json
Example output:
⠋ Initiating device authorization...
Your device code is: ABCD-1234
Open this URL in your browser to authorize:
https://console.skytells.ai/device
Waiting for authorization...
✔ Authenticated successfully!
Credentials saved to ~/.config/skytells/credentials.jsonThe authorization window stays open for 15 minutes. If it expires, run skytells login again.
Request specific scopes
skytells login --scopes inference,projects.read,deployments.writeSee the Token scopes table below for available values.
Personal access token
For non-interactive environments or quick setup with a pre-generated token:
skytells login --tokenPaste your token when prompted. Tokens follow the format sk_pat_<64 hex characters>.
Create a token:
- Go to console.skytells.ai/settings/tokens — or see Access Tokens in the Console docs
- Click Create Token
- Select the scopes you need
- Copy the token — it is shown only once
Environment variables
For CI/CD pipelines and headless environments:
# User authentication
export SKYTELLS_TOKEN=sk_pat_your_token_here
# Project-scoped authentication
export SKYTELLS_ACCESS_KEY=sk_proj_your_key_hereEnvironment variables take precedence over stored credentials. See Configuration for the full precedence order.
Project access keys
Access keys scope CLI operations to a specific project. Commands for apps, databases, deployments, and environment variables all require a linked access key.
Link an access key
skytells link sk_proj_your_access_keyThis stores the key alongside your user token. All project-scoped commands will use this key.
Where to find access keys
Access keys are in your project's settings:
- Open console.skytells.ai — see Projects
- Select your project → Settings
- Copy the access key (
sk_proj_*)
Token scopes
Scopes control what the CLI can access. Request the minimum scopes your workflow needs.
| Scope | Description |
|---|---|
inference | Run inference requests |
projects.read | Read project information |
projects.write | Create and modify projects |
deployments.read | View deployments and logs |
deployments.write | Trigger and manage deployments |
keys.read | View API keys |
keys.write | Create and manage API keys |
account.read | Read account information |
Default scopes (when no --scopes flag is used):
inferenceprojects.readdeployments.readaccount.read
Managing credentials
Verify your session
skytells whoamiDisplays your user ID, name, and authentication status.
Log out
skytells logoutSkip the confirmation prompt:
skytells logout --forceCredential file
Credentials are stored at:
~/.config/skytells/credentials.jsonThe file has 0600 permissions (owner read/write only). It contains your token, project access key, and a creation timestamp.
Override the storage location:
export SKYTELLS_CONFIG_DIR=/custom/pathSecurity
Never commit ~/.config/skytells/credentials.json or tokens to version control. In CI/CD, always use environment variables injected from your secrets manager.
- Use device flow for interactive sessions — avoids exposing tokens in shell history
- Use environment variables in CI/CD — never store credentials in source code or config files
- Request minimal scopes — only request permissions your workflow actually needs
- Rotate tokens regularly — generate new ones at console.skytells.ai/settings/tokens and revoke old ones
- Keep the CLI updated —
npm update -g @skytells/cli
Troubleshooting auth
"You are not authenticated"
skytells loginOr set SKYTELLS_TOKEN in your environment.
"Access key required"
skytells link sk_proj_your_access_keyOr set SKYTELLS_ACCESS_KEY in your environment.
"Token is invalid or expired"
Generate a new token at console.skytells.ai/settings/tokens, then run skytells login.
"Insufficient scope"
Log in again with the required scopes:
skytells login --scopes inference,projects.read,projects.write,deployments.read,deployments.writeFor more auth errors, see Troubleshooting.
How is this guide?