Commands

Full CLI reference for Clawon. All commands run via npx clawon.

Local Backups

Local backups are stored in ~/.clawon/backups/ as standard .tar.gz archives. No account needed.

# Create a backup
npx clawon local backup
npx clawon local backup --tag "before migration"
npx clawon local backup --include-memory-db  # Include SQLite memory index
npx clawon local backup --include-sessions   # Include chat history
npx clawon local backup --include-secrets    # Include credentials and auth files
npx clawon local backup --encrypt            # Encrypt with AES-256-GCM
npx clawon local backup --include-secrets --encrypt  # Encrypted with secrets
npx clawon local backup --no-secret-scan     # Skip secret scanning

# List all local backups
npx clawon local list

# Restore (detects encryption automatically)
npx clawon local restore                # Latest backup
npx clawon local restore --pick 2       # Backup #2 from list
npx clawon local restore --file path.tar.gz  # External file

Cloud Backups

Cloud backups sync your workspace to Clawon's servers for cross-machine access. Requires an account.

# Authenticate (env var recommended to avoid shell history)
export CLAWON_API_KEY=<your-key>
npx clawon login

# Or inline (key may appear in shell history)
npx clawon login --api-key <your-key>

# Create a cloud backup
npx clawon backup
npx clawon backup --tag "stable config"
npx clawon backup --dry-run             # Preview without uploading
npx clawon backup --include-memory-db   # Requires Hobby or Pro
npx clawon backup --include-sessions    # Requires Hobby or Pro
npx clawon backup --no-secret-scan      # Skip secret scanning
npx clawon backup --encrypt             # Encrypt before uploading
npx clawon backup --include-secrets --encrypt  # Secrets + encryption

# List cloud backups
npx clawon list

# Restore from cloud (decrypts automatically if encrypted)
npx clawon restore
npx clawon restore --snapshot <id>      # Specific snapshot
npx clawon restore --dry-run            # Preview without extracting

# Manage snapshots
npx clawon delete <id>
npx clawon delete --oldest
npx clawon files                        # List files in a cloud backup
npx clawon activity                     # Recent events

Scheduled Backups

Set up automatic backups via cron. Requires macOS or Linux. See the Scheduled Backups guide for details.

# Schedule local backups every 12 hours
npx clawon local schedule on
npx clawon local schedule on --every 6h --max-snapshots 10
npx clawon local schedule on --include-memory-db
npx clawon local schedule on --include-sessions
npx clawon local schedule on --include-secrets
npx clawon local schedule on --encrypt       # Encrypted (needs CLAWON_ENCRYPT_PASSPHRASE)

# Disable local schedule
npx clawon local schedule off

# Schedule cloud backups (requires Hobby or Pro)
npx clawon schedule on
npx clawon schedule on --encrypt             # Encrypted cloud backups
npx clawon schedule on --encrypt --include-secrets  # With secrets
npx clawon schedule off

# Check status
npx clawon schedule status

Workspaces

Workspaces organize your cloud snapshots by machine or environment. A default workspace is created automatically on login. See the Workspaces guide for strategies and tier limits.

# List your workspaces
npx clawon workspaces list

# Create a new workspace
npx clawon workspaces create "Work Server"
npx clawon workspaces create "VPS" --description "Production VPS backups"

# Switch active workspace (affects backup/restore/list)
npx clawon workspaces switch work-server

# Show current workspace info
npx clawon workspaces info

Other Commands

npx clawon discover    # Show exactly which files would be backed up
npx clawon discover --include-memory-db  # Include SQLite memory index
npx clawon discover --include-sessions   # Include chat history
npx clawon discover --include-secrets    # Preview with credentials included
npx clawon discover --scan               # Scan for secrets in discovered files
npx clawon schedule status  # Show active schedules
npx clawon status      # Connection status, workspace, and file count
npx clawon logout      # Remove local credentials

Having trouble? Check the Troubleshooting guide.