SwiftClaw
Introduction to SwiftClawQuick StartInstallationConfiguration

Authentication

Authentication OverviewAPI KeysWebhooks

API Reference

API OverviewREST APISDK Reference

Core Concepts

Understanding AgentsWorkspacesEnvironments

CLI

CLI ReferenceCLI CommandsCLI Configuration
SwiftClaw

CLI Configuration

Configuring the SwiftClaw CLI

CLI Configuration

Configure the SwiftClaw CLI for your workflow.

Configuration File

The CLI stores configuration in ~/.swiftclaw/config.json:

{
  "api_key": "sk_live_abc123...",
  "workspace": "my-workspace",
  "default_env": "development",
  "base_url": "https://api.swiftclaw.io",
  "timeout": 30,
  "max_retries": 3
}

Setting Configuration

Via CLI

# Set API key
swiftclaw config set api-key sk_live_abc123...

# Set default workspace
swiftclaw config set workspace my-workspace

# Set default environment
swiftclaw config set default-env production

Via Environment Variables

export SWIFTCLAW_API_KEY=sk_live_abc123...
export SWIFTCLAW_WORKSPACE=my-workspace
export SWIFTCLAW_ENV=production

Via Config File

Edit ~/.swiftclaw/config.json directly:

{
  "api_key": "sk_live_abc123...",
  "workspace": "my-workspace"
}

Configuration Precedence

Configuration is loaded in this order (later overrides earlier):

  1. Default values
  2. Config file (~/.swiftclaw/config.json)
  3. Environment variables
  4. Command-line flags

Authentication

API Key

# Set API key
swiftclaw config set api-key sk_live_abc123...

# Or use environment variable
export SWIFTCLAW_API_KEY=sk_live_abc123...

Login

# Interactive login
swiftclaw login

# Login with token
swiftclaw login --token sk_live_abc123...

Logout

swiftclaw logout

Workspace Configuration

Set Default Workspace

swiftclaw config set workspace my-workspace

Per-Command Workspace

swiftclaw agents list --workspace other-workspace

Environment Configuration

Set Default Environment

swiftclaw config set default-env production

Per-Command Environment

swiftclaw deploy my-agent --env staging

Output Configuration

Output Format

# Set output format (json|table|yaml)
swiftclaw config set output-format json

Verbosity

# Enable verbose output
swiftclaw config set verbose true

# Or use flag
swiftclaw agents list --verbose

Color Output

# Disable color output
swiftclaw config set no-color true

Network Configuration

Base URL

swiftclaw config set base-url https://api.swiftclaw.io

Timeout

# Set timeout in seconds
swiftclaw config set timeout 60

Retries

# Set max retries
swiftclaw config set max-retries 5

Proxy

# Set HTTP proxy
swiftclaw config set proxy http://proxy.example.com:8080

Tab Completion

Install Completion

# Bash
swiftclaw completion install bash

# Zsh
swiftclaw completion install zsh

# Fish
swiftclaw completion install fish

Manual Setup

Add to your shell config:

# ~/.bashrc or ~/.zshrc
eval "$(swiftclaw completion bash)"

Aliases

Create command aliases:

# Add to ~/.swiftclaw/config.json
{
  "aliases": {
    "d": "deploy",
    "l": "logs",
    "s": "status"
  }
}

Usage:

swiftclaw d my-agent  # Same as: swiftclaw deploy my-agent
swiftclaw l my-agent  # Same as: swiftclaw logs my-agent

Profiles

Use different profiles for different contexts:

# Create profile
swiftclaw config profile create work

# Switch profile
swiftclaw config profile use work

# List profiles
swiftclaw config profile list

Viewing Configuration

View All Configuration

swiftclaw config list

View Specific Value

swiftclaw config get api-key

View Effective Configuration

Shows final configuration after all overrides:

swiftclaw config show

Resetting Configuration

Reset Specific Value

swiftclaw config unset api-key

Reset All Configuration

swiftclaw config reset --force

Backup Configuration: Back up your config file before resetting.

Configuration Examples

Development Setup

{
  "api_key": "sk_test_dev123...",
  "workspace": "dev-workspace",
  "default_env": "development",
  "verbose": true,
  "output_format": "table"
}

Production Setup

{
  "api_key": "sk_live_prod456...",
  "workspace": "prod-workspace",
  "default_env": "production",
  "verbose": false,
  "output_format": "json"
}

Next Steps

  • CLI Commands
  • CLI Reference
  • Authentication

How is this guide ?

Last updated on

CLI Commands

Complete reference for SwiftClaw CLI commands

On this page

CLI Configuration
Configuration File
Setting Configuration
Via CLI
Via Environment Variables
Via Config File
Configuration Precedence
Authentication
API Key
Login
Logout
Workspace Configuration
Set Default Workspace
Per-Command Workspace
Environment Configuration
Set Default Environment
Per-Command Environment
Output Configuration
Output Format
Verbosity
Color Output
Network Configuration
Base URL
Timeout
Retries
Proxy
Tab Completion
Install Completion
Manual Setup
Aliases
Profiles
Viewing Configuration
View All Configuration
View Specific Value
View Effective Configuration
Resetting Configuration
Reset Specific Value
Reset All Configuration
Configuration Examples
Development Setup
Production Setup
Next Steps