CLI Reference

The ClawKeep CLI handles encryption, chunking, upload, and restore. Everything runs locally — the server only sees encrypted blobs.

Installation

npm install -g clawkeep

Requires Node.js 18+. Verify with:

clawkeep --version

Authentication

clawkeep auth login

Authenticate with your API key.

clawkeep auth login --key ck_live_xxxxxxxxxxxxxxxxxxxxxxxx

Stores the key in ~/.clawkeep/credentials. Generate keys from the dashboard.

clawkeep auth status

Show current authentication state.

clawkeep auth status
# Authenticated as user@example.com (pro plan)
# API key: ck_live_abc...xyz

clawkeep auth logout

Remove stored credentials.

clawkeep auth logout

Workspaces

clawkeep workspace create

Create a new workspace. Each workspace maps to one project.

clawkeep workspace create my-project
# Created workspace ws_01JKXYZ...
FlagDescription
--nameWorkspace name (required, or positional arg)

clawkeep workspace list

List all workspaces.

clawkeep workspace list
# ws_01JKXYZ  my-project    48 MB  last sync 2h ago
# ws_01JKABC  api-server   120 MB  last sync 5m ago

clawkeep workspace delete

Delete a workspace and all its backups. Irreversible.

clawkeep workspace delete my-project --confirm

Backup

clawkeep backup sync

Encrypt and upload the current project state.

cd ~/my-project
clawkeep backup sync

# Encrypted 2,341 files (48 MB)
# Uploaded to workspace in 3.2s
# ✓ Backup complete
FlagDescription
--workspaceTarget workspace (auto-detected from .clawkeep config)
--excludeGlob patterns to exclude (stacks with .clawkeepignore)
--dry-runShow what would be uploaded without uploading

clawkeep backup cloud

Configure cloud backup for a workspace. Fetches scoped S3 credentials.

clawkeep backup cloud --workspace ws_01JKXYZ

clawkeep backup local

Back up to a local directory instead of the cloud.

clawkeep backup local --dest /mnt/nas/backups/my-project

clawkeep backup s3

Back up to any S3-compatible storage.

clawkeep backup s3 \
  --endpoint https://s3.amazonaws.com \
  --bucket my-backups \
  --access-key AKIAXXXXXXXX \
  --secret-key xxxxxxxx \
  --prefix clawkeep/my-project/

Snapshots

clawkeep snapshots list

List available snapshots for the current workspace.

clawkeep snapshots list

# ID          Date                 Files   Size
# snap_001    2026-02-09 14:30     2,341   48 MB
# snap_002    2026-02-09 10:15     2,338   47 MB
# snap_003    2026-02-08 22:00     2,200   45 MB

Restore

clawkeep restore

Restore files from a snapshot.

# Restore everything to latest snapshot
clawkeep restore .

# Restore to a specific point in time
clawkeep restore . --at 2026-02-08T14:30

# Restore a single file
clawkeep restore ./src/auth/handler.ts

# Restore to a different directory
clawkeep restore . --dest ~/recovery/
FlagDescription
--atRestore to a specific timestamp (ISO 8601)
--destOutput directory (default: current dir)
--dry-runShow what would be restored without writing
--workspaceTarget workspace

.clawkeepignore

Works like .gitignore. Place in your project root to exclude files from backups.

# .clawkeepignore
node_modules/
.next/
dist/
*.log
.env
.env.local

Environment variables

VariableDescription
CLAWKEEP_API_KEYAPI key (alternative to ~/.clawkeep/credentials)
CLAWKEEP_API_URLAPI base URL (default: https://api.clawkeep.com)
CLAWKEEP_WORKSPACEDefault workspace ID