CLI Reference
The create-better-openclaw CLI is the primary way to generate OpenClaw stacks. It supports both an interactive wizard and a fully non-interactive mode for CI/CD pipelines.
Basic Usage
create-better-openclaw <project-name> [options]If no options are provided, the CLI launches the interactive wizard. If --yes is passed, it uses defaults combined with any explicit flags.
Flag Cheat Sheet
| Flag | Type | Default | Description |
|---|---|---|---|
--preset <name> | string | — | Use a named preset (minimal, researcher, devops, local-ai, full) |
--services <list> | string | — | Comma-separated service IDs (e.g. qdrant,redis,n8n) |
--skills <list> | string | — | Comma-separated skill pack IDs |
--proxy <type> | string | none | Reverse proxy: caddy, traefik, nginx, or none |
--domain <name> | string | — | Domain name for reverse proxy (requires --proxy) |
--gpu | boolean | false | Enable GPU passthrough for Ollama, Whisper, etc. |
--platform <arch> | string | auto | Target platform (e.g. linux/arm64) |
--deployment-type <type> | string | docker | docker: all services in containers. bare-metal: native + Docker hybrid — services with a native recipe (e.g. Redis on Linux) get install scripts in native/; top-level install.sh / install.ps1 runs native first, then docker compose up. See Bare-metal deployment. |
--generateSecrets | boolean | true | Auto-generate random passwords and API keys |
--yes | boolean | false | Skip all prompts, use defaults + flags |
--output <dir> | string | ./<project> | Custom output directory |
--dry-run | boolean | false | Show what would be generated without writing files |
--version | — | — | Print version number |
--help | — | — | Show help message |
Non-Interactive Mode
Pass --yes to skip all interactive prompts. Combine with other flags to fully automate stack generation — perfect for CI/CD, scripts, or infrastructure-as-code workflows.
# Minimal stack with no prompts
npx create-better-openclaw my-stack --preset minimal --yes
# Custom service selection
npx create-better-openclaw my-stack \
--services qdrant,redis,n8n,searxng \
--skills researcher,automation \
--proxy caddy \
--domain ai.example.com \
--yes
# Dry run to preview
npx create-better-openclaw my-stack \
--preset full \
--dry-runExamples
Research Assistant Stack
npx create-better-openclaw research-stack \
--preset researcher \
--proxy caddy \
--domain research.example.com \
--yesLocal-Only AI (No Cloud APIs)
npx create-better-openclaw local-ai \
--services ollama,whisper,redis,qdrant \
--skills local-ai,memory \
--gpu \
--yesProduction VPS Deployment
npx create-better-openclaw prod-stack \
--preset devops \
--proxy caddy \
--domain openclaw.mycompany.com \
--generateSecrets \
--yesARM64 Homelab (Raspberry Pi / Apple Silicon)
npx create-better-openclaw homelab-stack \
--preset minimal \
--platform linux/arm64 \
--yesCustom Output Directory
npx create-better-openclaw my-stack \
--preset researcher \
--output ~/projects/ai-stacks/my-stack \
--yesBare-metal (native + Docker)
npx create-better-openclaw my-stack \
--preset minimal \
--deployment-type bare-metal \
--platform linux/amd64 \
--yesGenerates native/install-linux.sh (or Windows/macOS), install.sh/install.ps1, and a Docker Compose file for the remaining services. See Deployment → Bare-metal for details.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General error (invalid flags, missing dependencies) |
2 | Validation error (conflicting services, invalid preset) |
130 | User cancelled (Ctrl+C) |
Environment Variables
The CLI respects the following environment variables:
| Variable | Description |
|---|---|
OPENCLAW_DEFAULT_PRESET | Default preset when no --preset is provided |
OPENCLAW_PROXY | Default reverse proxy type |
NO_COLOR | Disable colored output (standard convention) |
Next Steps
- Interactive Wizard — step-by-step walkthrough of each prompt
- API Reference — programmatic stack generation via REST
- Service Catalog — all available services