Skip to main content

Login

runtools login
This opens your browser for OAuth authentication. After logging in, the CLI stores your credentials securely.

API Key Login

runtools auth set-key rt_live_xxxxxxxxxxxxx
Use this for CI/CD or headless environments.

Verify Authentication

runtools auth whoami
# → Logged in as: [email protected]
# → Organization: acme-corp
# → Plan: Pro

Logout

runtools logout

Switch Organizations

Organization switching is coming soon. Currently, the CLI uses your default organization from your WorkOS account.

Environment Variables

For CI/CD, set the API key as an environment variable:
export RUNTOOLS_API_KEY=rt_live_xxxxxxxxxxxxx
The CLI automatically uses this if set.

Credential Storage

Credentials are stored in a local configuration file:
~/.runtools/credentials.json
This file contains your access token, refresh token, and user information.
This file contains sensitive data. Never share or commit it to version control.
Future versions may integrate with OS keychains (macOS Keychain, Windows Credential Manager, Linux Secret Service) for enhanced security.

Multiple Profiles

Multiple profile support is coming soon. For now, use environment variables to switch between accounts:
RUNTOOLS_API_KEY=rt_live_xxx runtools sandbox list

Token Refresh

The CLI automatically refreshes tokens. If you encounter auth errors:
# Force re-login
runtools login --force

CI/CD Examples

GitHub Actions

- name: Setup RunTools
  run: npm install -g @runtools/cli

- name: Deploy
  env:
    RUNTOOLS_API_KEY: ${{ secrets.RUNTOOLS_API_KEY }}
  run: runtools deploy

GitLab CI

deploy:
  script:
    - npm install -g @runtools/cli
    - runtools deploy
  variables:
    RUNTOOLS_API_KEY: $RUNTOOLS_API_KEY

Next Steps

Commands Reference

Explore all CLI commands