Skip to content

Heretek-AI/heretek-openclaw-cli

Repository files navigation

Heretek OpenClaw CLI

Unified command-line interface for Heretek OpenClaw deployment and management.

Installation

npm (Recommended)

npm install -g @heretek/openclaw-cli

From Source

git clone https://github.com/heretek/heretek-openclaw-cli.git
cd heretek-openclaw-cli
npm install
npm link

Quick Start

# Initialize OpenClaw deployment
openclaw init

# Deploy OpenClaw
openclaw deploy

# Check status
openclaw status

# View health
openclaw health check

Commands

Core Commands

Command Description
openclaw init Initialize deployment configuration
openclaw deploy Deploy OpenClaw
openclaw status Check deployment status
openclaw logs View logs
openclaw stop Stop deployment

Management Commands

Command Description
openclaw backup Manage backups
openclaw config Manage configuration
openclaw update Update OpenClaw
openclaw agents Manage agents
openclaw health Run health checks

Command Reference

openclaw init

Initialize deployment configuration with interactive setup wizard.

# Interactive mode
openclaw init

# Non-interactive mode
openclaw init --type docker --non-interactive

# Specify output directory
openclaw init --output /path/to/config

Options:

  • -t, --type <type> - Deployment type (docker, bare-metal, kubernetes, aws, gcp, azure)
  • -o, --output <path> - Output directory for configuration
  • -n, --non-interactive - Non-interactive mode (use defaults)
  • --skip-validation - Skip configuration validation

openclaw deploy

Deploy OpenClaw using the configured deployment type.

# Interactive deployment
openclaw deploy

# Deploy to Docker
openclaw deploy docker

# Deploy to Kubernetes with Helm
openclaw deploy kubernetes --method helm

# Deploy with build
openclaw deploy --build --force-recreate

Options:

  • -c, --config <path> - Configuration file path
  • --build - Build images before deployment
  • --force-recreate - Force recreate containers
  • --pull - Pull latest images
  • --method <method> - Deployment method (helm, kustomize) for Kubernetes
  • --auto-approve - Auto-approve Terraform changes
  • -y, --yes - Skip confirmation prompts

openclaw status

Check deployment status and display service health.

# Full status
openclaw status

# Service status only
openclaw status --services

# Agent status only
openclaw status --agents

# JSON output
openclaw status --json

openclaw backup

Manage backups.

# Create backup
openclaw backup create

# Create full backup with verification
openclaw backup create --type full --verify

# List backups
openclaw backup list

# Restore from backup
openclaw backup restore backup-name

# Delete backup
openclaw backup delete backup-name

Deployment Types

Docker

openclaw init --type docker
openclaw deploy

Bare Metal

openclaw init --type bare-metal
openclaw deploy

Kubernetes

openclaw init --type kubernetes
openclaw deploy --method helm

Cloud (AWS/GCP/Azure)

openclaw init --type aws
openclaw deploy --auto-approve

Environment Variables

Variable Description Default
GATEWAY_URL Gateway endpoint http://localhost:18789
LITELLM_URL LiteLLM endpoint http://localhost:4000
LITELLM_MASTER_KEY LiteLLM API key -
POSTGRES_HOST PostgreSQL host localhost
POSTGRES_PORT PostgreSQL port 5432
REDIS_HOST Redis host localhost
REDIS_PORT Redis port 6379

Configuration Files

  • openclaw.json - Main configuration file
  • .env - Environment variables
  • ~/.openclaw/openclaw.json - User configuration
  • openclaw.config.js - CLI settings

Troubleshooting

Command not found

# Ensure CLI is installed
npm install -g @heretek/openclaw-cli

# Or run directly
node bin/openclaw.js

Permission denied

# Fix npm global permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Docker connection failed

# Ensure Docker is running
docker ps

# Check Docker socket permissions
sudo usermod -aG docker $USER

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Lint code
npm run lint

Related Repositories

License

MIT

Support


🦞 The thought that never ends.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors