Skip to main content

Authentication

The Roboticks CLI supports two authentication methods:
  1. Browser login - For interactive local development
  2. API keys - For CI/CD pipelines and automation

Browser Login (Interactive)

For local development, use browser-based authentication:
# Opens browser for login
rbtk login

# Check authentication status
rbtk auth status
After logging in, credentials are securely stored in your system keyring.

API Key Authentication (CI/CD)

For automated environments, use API keys:

Generate an API Key

  1. Go to Settings > API Keys in the Roboticks web app
  2. Click Create API Key
  3. Give it a descriptive name (e.g., “GitHub Actions CI”)
  4. Copy the key (it won’t be shown again)

Use the API Key

export ROBOTICKS_API_KEY=rbtk_xxxxxxxxxxxxxxxx

# CLI will automatically use the API key
rbtk device list
Never commit API keys to version control. Use environment variables or secrets management.

Setting Context

Before running commands, set your organization and project context:
# Set context interactively
rbtk context set --org acme --project warehouse

# View current context
rbtk context

# List available organizations and projects
rbtk context list

# Clear saved context
rbtk context clear

Context via Environment Variables

For CI/CD, set context via environment variables:
export ROBOTICKS_ORG=acme
export ROBOTICKS_PROJECT=warehouse

# Commands will use these automatically
rbtk device list

Configuration Files

User Configuration

The CLI stores user configuration at ~/.config/roboticks/config.yaml:
version: 1
context:
  organization: acme
  project: warehouse
api:
  base_url: https://api.roboticks.io
output:
  format: table

Project Configuration

You can also create a .roboticks.yaml in your project root:
organization: acme
project: warehouse
defaults:
  capsule:
    type: sw
This automatically sets context when running commands from that directory.

Environment Variables Reference

VariableDescriptionDefault
ROBOTICKS_API_KEYAPI key for authentication-
ROBOTICKS_ORGDefault organization slug-
ROBOTICKS_PROJECTDefault project slug-
ROBOTICKS_API_URLAPI base URLhttps://api.roboticks.io
ROBOTICKS_OUTPUTOutput format (table/json/yaml)table
ROBOTICKS_NO_INTERACTIVEDisable interactive promptsfalse
ROBOTICKS_DEBUGEnable debug outputfalse
NO_COLORDisable colored output-

Logout

# Clear stored credentials
rbtk logout

Troubleshooting

The CLI will display a URL you can copy and paste:
Open this URL in your browser:
https://app.roboticks.io/cli-auth?code=xxxx
  • Verify the key hasn’t expired
  • Check the key has the required permissions
  • Ensure the organization/project context matches the key’s access
Check that the config directory is writable:
ls -la ~/.config/roboticks/

Next Steps

Commands Reference

Explore all available CLI commands