
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@clawops/cli
Advanced tools
Deploy OpenClaw once. Operate it from your terminal or Claude Code.
clawops is a CLI and MCP server for deploying and operating self-hosted OpenClaw instances. Provision on AWS, GCP, Azure, or any Linux VM — then manage day-to-day operations from the terminal, or let Claude Code and Cursor drive them through typed MCP tools with explicit safety controls.
pulumi binary required).--json) for scripting and automation.docs/limitations.md for the manual path.~/.clawops/config.json.docs/support-matrix.md.The local provider needs only a Linux host reachable over SSH — no cloud account required.
Prerequisites: Node.js ≥ 22, an SSH key, a Linux host (Ubuntu/Debian/RHEL) you can reach.
npm install -g @clawops/cli
# Check your environment
clawops doctor
# Configure clawops for a local host
clawops init --provider local --host 192.168.1.50 --user ubuntu --key-path ~/.ssh/id_ed25519
# Bootstrap OpenClaw on the host (installs Docker + OpenClaw over SSH)
clawops up
# Verify it's running
clawops status
# Start the MCP server for Claude Code
clawops mcp serve
See docs/examples/local-vm.md for the full walkthrough including
SSH prerequisites, firewall setup, and troubleshooting.
npm install -g @clawops/cli
# or: npx @clawops/cli
# Requires AWS credentials in your environment (AWS_PROFILE or ~/.aws/credentials)
clawops init --provider aws
# Edit ~/.clawops/config.json — set stateUrl to your S3 bucket:
# "stateUrl": "s3://my-clawops-state"
# Generate a deploy plan (runs pulumi preview internally)
clawops plan --provider aws --stack default --out /tmp/plan.json
# Review the plan, then apply
clawops apply /tmp/plan.json
Add to your Claude Code MCP config (~/.claude.json or project .mcp.json):
{
"mcpServers": {
"clawops": {
"command": "clawops",
"args": ["mcp", "serve", "--read-only"]
}
}
}
Start with --read-only — it enables status, logs, config reads, and diagnostics while
blocking any operation that mutates infrastructure. Remove --read-only only once you understand
which tools are destructive and have reviewed docs/security/mcp-safety.md.
Destructive tools (clawops_destroy, clawops_up, clawops_config_set, etc.) require explicit
confirmation from the agent before executing — they will never run silently.
For Cursor, VS Code, or HTTP mode setup see docs/mcp/.
clawops status # Stack outputs: IP, gateway URL, SSH info
clawops logs -f # Tail OpenClaw logs over SSH
clawops ssh # Interactive SSH session
clawops ssh --command "docker ps"
clawops config get maxAgents
clawops config set maxAgents 8
clawops tunnel # Port-forward gateway UI to localhost
clawops destroy --yes # Destroy cloud-provider stack
clawops down --yes # Destroy local-provider stack
| Command | Description |
|---|---|
init | Interactive setup wizard — writes config, generates SSH key pair |
up | Provision or update stack (--dry-run for preview) |
down | Destroy local-provider stack (requires --yes; --dry-run shows current outputs) |
destroy | Destroy cloud-provider stack with confirmation prompt (--dry-run shows current outputs) |
status | Show stack outputs: IP, gateway URL, region, provisioned time |
plan | Generate a deploy-plan JSON artifact (dry-run safe) |
apply | Apply a previously reviewed plan file (--dry-run validates and shows diff without applying) |
ssh | Interactive SSH session or run a remote command |
logs | Stream OpenClaw logs (-f, --tail N, --since 5m) |
tunnel | Local port-forward to gateway UI over SSH |
config | Get/set remote OpenClaw config values (--dry-run shows would-write JSON) |
agents | List or restart OpenClaw agents |
gateway | Restart the OpenClaw gateway service |
backup | Create or restore an OpenClaw state backup |
stacks | List named stacks and their state |
doctor | Check Node version, config, SSH key, provider credentials, and Pulumi home |
mcp | Start the embedded MCP server (mcp serve) |
Full flag reference: clawops <command> --help
For non-local providers, clawops enforces a review-before-apply discipline:
# 1. Generate a plan — runs `pulumi preview` internally, produces JSON
clawops plan --provider aws --region us-east-1 --out /tmp/plan.json
# 2. Review plan.json — the `diff` field shows projected changes at plan-generation time
cat /tmp/plan.json | jq .diff
# 3. Apply — reads and validates the plan file, then runs `pulumi up`
clawops apply /tmp/plan.json
# Without --yes, apply prompts: "Continue? (y/N)"
clawops apply /tmp/plan.json --yes # skip prompt in automation
The plan JSON conforms to spec/deploy-plan.schema.json (AJV-validated) and captures reviewed
intent: provider, region, instance type, CIDR ranges, and OpenClaw version. apply re-runs
pulumi up using those parameters against the current live state — it does not replay a locked
execution artifact. Review and apply in the same session to minimize drift risk.
See docs/plan-apply.md for full semantics, drift guidance, and the safe CI pattern.
clawops ships an embedded MCP server. Claude Code, Cursor, and any MCP-compatible agent can drive deployments without leaving the chat interface.
{
"mcpServers": {
"clawops": {
"command": "clawops",
"args": ["mcp", "serve", "--read-only"]
}
}
}
clawops mcp serve --http --port 3333 --bind 127.0.0.1
# MCP HTTP server listening on 127.0.0.1:3333
Do not bind to a non-loopback address without additional authentication controls in front of it.
| Tool | Toolset | Description |
|---|---|---|
clawops_status | read | Show stack outputs |
clawops_logs_tail | read | Tail OpenClaw logs |
clawops_config_get | read | Read a remote config value |
clawops_agents_list | read | List running agents |
clawops_task_status | read | Poll a long-running task |
clawops_stacks_list | admin | List all stacks and their state |
clawops_up | cli | Provision or update a stack |
clawops_plan | cli | Generate a deploy plan |
clawops_apply | cli | Apply a plan file |
clawops_ssh_exec | cli | Run a command over SSH |
clawops_config_set | cli | Write a remote config value |
clawops_destroy | cli | Destroy a stack (elicits confirmation) |
clawops_workflow_deploy_app | workflow | End-to-end deploy: plan → confirm → apply → status |
read toolset tools are available in --read-only mode. All other toolsets require full mode.
Destructive tools require explicit confirmation (elicitation) unless yes: true is passed.
See docs/security/tool-risk-matrix.md for the full risk
classification of every tool.
Config lives at ~/.clawops/config.json (override with $CLAWOPS_HOME).
{
"version": 1,
"defaults": {
"provider": "aws",
"stack": "default"
},
"stacks": {
"default": {
"provider": "aws",
"region": "us-east-1",
"stateUrl": "s3://my-clawops-state"
}
},
"ssh": {
"keyPath": "~/.clawops/id_ed25519",
"knownHostsPath": "~/.clawops/known_hosts"
}
}
Cloud credentials are never stored in config — clawops reads them from the environment:
| Provider | Credential source |
|---|---|
| AWS | AWS_PROFILE or standard AWS credential chain (~/.aws/credentials) |
| GCP | GOOGLE_APPLICATION_CREDENTIALS or gcloud auth application-default login |
| Azure | AZURE_CLIENT_ID / AZURE_CLIENT_SECRET or az login |
| Local | SSH host + key configured in stacks[name].localOpts |
See docs/limitations.md for the full list. Key points:
clawops apply is not an immutable plan execution — see docs/plan-apply.md.--read-only for first evaluation.clawops
├── src/cli/ citty-based commands (one file per verb)
├── src/config/ ~/.clawops/config.json management
├── src/providers/ Cloud adapters (AWS, GCP, Azure, local)
│ ├── aws/ Pulumi inline program + ProviderAdapter
│ ├── gcp/
│ ├── azure/
│ └── local/ SSH bootstrap (no Pulumi)
├── src/pulumi/ Pulumi Automation API wrapper + output helpers
├── src/transport/ SSH client (ssh2) + connection pool + tunnels
├── src/mcp/ MCP server, tool handlers, progress tracking
├── src/plan/ Maker plan generation, AJV validation, apply
├── src/output/ ASCII table, spinner, JSON, human-readable output
├── src/errors/ Typed error hierarchy with exit codes
└── spec/ Machine-readable ground truth (JSON Schema, YAML)
Key design decisions:
pulumi binary required; Pulumi home is sandboxed to ~/.clawops/.pulumi; stack programs are inline TypeScript closuresgs://), S3 (s3://), Azure Blob — no local state files, no pulumi.yamlssh2: never shells out to /usr/bin/ssh; TOFU host verification against ~/.clawops/known_hosts; connection pool with 5-min idle TTLgeneratePlan() → review → applyPlan(); destructive changes always require human review of the plan JSONspec/mcp-tools.yaml; all destructive tools use elicitationSee docs/architecture.md for a full narrative, and docs/decisions/ for ADRs.
git clone https://github.com/dfridkin/clawops.git
cd clawops
# Node 22+ required; use nvm: nvm use
pnpm install
pnpm dev doctor # verify toolchain
pnpm dev # run CLI from src/ via tsx
pnpm build # tsup → dist/
pnpm test # vitest (476 tests, ~2s)
pnpm test:changed # vitest --changed (fast edit loop)
pnpm test:integration # Docker-based SSH integration tests
pnpm typecheck # tsc --noEmit
pnpm lint # eslint src/ tests/ scripts/ (--max-warnings=0)
pnpm gen:schemas # regenerate src/providers/types.ts + src/mcp/tools/_generated.ts
pnpm gen:schemas --check # CI guard: committed generated files match spec
pnpm changeset # record a release note before merging
| Path | Purpose |
|---|---|
spec/ | Machine-readable ground truth: JSON Schema, YAML. Treat as source of truth. |
SPEC.md | Full technical specification (milestones, rules, schemas) |
DESIGN_RULES.md | 25 normative rules (R1–R25) referenced throughout the codebase |
docs/architecture.md | Narrative system overview |
docs/plan-apply.md | Plan/apply semantics, drift guidance, CI pattern |
docs/ci.md | CI integration guide: OIDC, env vars, plan → apply in CI |
docs/security/ | MCP safety model, tool risk matrix, redaction, audit logs |
docs/providers/matrix.md | Per-provider capability matrix |
docs/decisions/ | Architecture Decision Records |
.claude/skills/ | Invokable procedures: /add-provider, /release, /tdd, /mcp-tool |
.claude/rules/ | Path-scoped lint rules loaded by Claude Code |
Two files are generated from spec/ and must not be hand-edited:
src/providers/types.ts — ProviderAdapter interface from spec/providers.schema.jsonsrc/mcp/tools/_generated.ts — Zod schemas and type exports from spec/mcp-tools.yamlRun pnpm gen:schemas after modifying either spec file. CI enforces this with --check.
Use the /add-provider skill in Claude Code, or follow src/providers/CLAUDE.md. Every adapter must satisfy ProviderAdapter in src/providers/types.ts — do not relax the schema to fit the adapter.
Use the /mcp-tool skill. The skill adds the tool to spec/mcp-tools.yaml, runs pnpm gen:schemas, creates the handler in src/mcp/tools/<toolset>/<name>.ts, and wires it into the registry. All four annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are required on every tool.
feat(scope): description
fix(scope): description
docs / refactor / chore / test / perf / ci
Use pnpm changeset to record a release note before merging a feat or fix.
| Milestone | Status | What ships |
|---|---|---|
| M0 — Scaffold | ✅ | Tooling, CI, stubs, generated types |
| M1 — GCP MVP | ✅ | init / up / down / status / ssh / logs on GCP |
| M2 — Remote Mgmt | ✅ | tunnel, config, agents, gateway; SSH connection pool |
| M3 — AWS + Azure | ✅ | AWS EC2 + Azure VM adapters; stacks list |
| M4 — Local VM | ✅ | Local adapter (SSH bootstrap, no Pulumi); doctor |
| M5 — MCP Layer | ✅ | mcp serve (stdio), all CLI ops as MCP tools, progress tracking |
| M6 — Plan/Apply | ✅ | plan + apply; deploy-plan schema; MCP HTTP transport; workflow_deploy_app |
| M7 — v1.0 Polish | ✅ | Full doctor surface; destroy command; --dry-run across commands; CI guide |
See docs/roadmap.md for the public roadmap and upcoming work.
MPL-2.0 — see LICENSE.
FAQs
Deploy and manage self-hosted OpenClaw instances across clouds
The npm package @clawops/cli receives a total of 49 weekly downloads. As such, @clawops/cli popularity was classified as not popular.
We found that @clawops/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.