Logo
Search
API Docs

CLI & API Key Auth

Auth & Credentials

CLI and API Key Authentication

Overview

For CI/CD pipelines or scripting scenarios, the Sulus CLI (core-system) supports API key authentication in a few different ways. This is separate from the credential-based system used to secure your server webhooks — see the Credentials & Auth page for that.


Authenticating via Environment Variable

export CORE_SYSTEM_API_KEY=your-api-key
core-system assistant list

Authenticating via Command Flag

core-system assistant list --api-key your-api-key

Authenticating via Configuration File

# ~/.core-system-cli.yaml
api_key: your-api-key
base_url: https://api.sulus.ai  # Optional custom endpoint

Credential Storage

The CLI stores credentials securely using the platform's native credential manager — Keychain on macOS, Secret Service API / keyring on Linux, and Credential Manager on Windows.


CI/CD Integration

For automated workflows, use the API key via environment variables rather than an interactive login:

# GitHub Actions example
env:
  CORE_SYSTEM_API_KEY: ${{ secrets.SULUS_PROD_KEY }}

steps:
  - name: Deploy Assistant
    run: |
      core-system assistant create --file assistant.json

Best Practices

  • Use an interactive login for day-to-day CLI use and API keys only for automation
  • Never commit API keys to version control
  • Use descriptive credential names like "Production API Key" or "Staging Key"
  • Rotate credentials regularly — you can update them in the dashboard without changing your server configurations
  • Once created, credential secrets are encrypted and cannot be viewed in the dashboard

In summary, Sulus offers flexible API key management through the CLI (environment variables, flags, or config files) alongside the centralized credential system used for server webhook authentication.