mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 08:05:04 +00:00
Renamed everything to clawdock
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
4da2e24d5c
commit
3715b9671c
@@ -1,140 +1,111 @@
|
||||
# OpenClaw Shell Helpers <!-- omit in toc -->
|
||||
# ClawDock <!-- omit in toc -->
|
||||
|
||||
User-friendly shell commands for managing OpenClaw Docker containers. These helpers make it easy to start, stop, configure, and interact with OpenClaw without memorizing complex docker-compose commands.
|
||||
Stop typing `docker-compose` commands. Just type `clawdock-start`.
|
||||
|
||||
- [Features](#features)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Installation](#installation)
|
||||
- [First Time Setup](#first-time-setup)
|
||||
Inspired by Simon Willison's [Running OpenClaw in Docker](https://til.simonwillison.net/llms/openclaw-docker).
|
||||
|
||||
- [Quickstart](#quickstart)
|
||||
- [Available Commands](#available-commands)
|
||||
- [Basic Operations](#basic-operations)
|
||||
- [Container Access](#container-access)
|
||||
- [Web UI \& Devices](#web-ui--devices)
|
||||
- [Setup \& Configuration](#setup--configuration)
|
||||
- [Maintenance](#maintenance)
|
||||
- [Utilities](#utilities)
|
||||
- [Common Workflows](#common-workflows)
|
||||
- [Check Status and Logs](#check-status-and-logs)
|
||||
- [Restart After Configuration Changes](#restart-after-configuration-changes)
|
||||
- [Access the Dashboard](#access-the-dashboard)
|
||||
- [Set Up WhatsApp Bot](#set-up-whatsapp-bot)
|
||||
- [Troubleshooting Device Pairing](#troubleshooting-device-pairing)
|
||||
- [Fix Token Mismatch Issues](#fix-token-mismatch-issues)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Commands Not Found](#commands-not-found)
|
||||
- [Token Mismatch Errors](#token-mismatch-errors)
|
||||
- [Permission Denied](#permission-denied)
|
||||
- [Container Not Starting](#container-not-starting)
|
||||
- [Requirements](#requirements)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
- [Support](#support)
|
||||
|
||||
## Features
|
||||
## Quickstart
|
||||
|
||||
✨ **Simple Commands** - Intuitive names like `openclaw-start`, `openclaw-stop`, `openclaw-dashboard`
|
||||
🎨 **Beautiful Output** - Colorful, emoji-rich terminal output with clear guidance
|
||||
🔧 **Auto-Configuration** - Helpers guide you through setup and troubleshooting
|
||||
🚀 **Fast Onboarding** - Get started with OpenClaw in minutes
|
||||
📖 **Self-Documenting** - Run `openclaw-help` anytime to see available commands
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Installation
|
||||
|
||||
**Add to your shell config (`~/.zshrc` or `~/.bashrc`):**
|
||||
**Try it out:**
|
||||
|
||||
```bash
|
||||
source /path/to/openclaw/scripts/shell-helpers/openclaw-helpers.sh
|
||||
source <(curl -sL https://raw.githubusercontent.com/openclaw/openclaw/main/scripts/shell-helpers/clawdock-helpers.sh)
|
||||
```
|
||||
|
||||
**Reload your shell:**
|
||||
**Make it permanent:**
|
||||
|
||||
```bash
|
||||
source ~/.zshrc
|
||||
echo 'source <(curl -sL https://raw.githubusercontent.com/openclaw/openclaw/main/scripts/shell-helpers/clawdock-helpers.sh)' >> ~/.zshrc
|
||||
```
|
||||
|
||||
### First Time Setup
|
||||
|
||||
**Start the gateway:**
|
||||
**See what you get:**
|
||||
|
||||
```bash
|
||||
openclaw-start
|
||||
clawdock-help
|
||||
```
|
||||
|
||||
**Configure authentication token:**
|
||||
**First time setup:**
|
||||
|
||||
```bash
|
||||
openclaw-fix-token
|
||||
```
|
||||
|
||||
**Open the web dashboard:**
|
||||
|
||||
```bash
|
||||
openclaw-dashboard
|
||||
```
|
||||
|
||||
**If you see "pairing required", approve devices:**
|
||||
|
||||
```bash
|
||||
openclaw-devices
|
||||
clawdock-start
|
||||
```
|
||||
|
||||
```bash
|
||||
openclaw-approve <request-id>
|
||||
clawdock-fix-token
|
||||
```
|
||||
|
||||
**Set up WhatsApp (optional):**
|
||||
|
||||
```bash
|
||||
openclaw-shell
|
||||
clawdock-dashboard
|
||||
```
|
||||
|
||||
Then inside the container:
|
||||
If you see "pairing required":
|
||||
|
||||
```bash
|
||||
openclaw channels login --channel whatsapp
|
||||
clawdock-devices
|
||||
```
|
||||
|
||||
```bash
|
||||
clawdock-approve <request-id>
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
### Basic Operations
|
||||
|
||||
- `openclaw-start` - Start the OpenClaw gateway
|
||||
- `openclaw-stop` - Stop the gateway
|
||||
- `openclaw-restart` - Restart the gateway
|
||||
- `openclaw-status` - Check container status
|
||||
- `openclaw-logs` - View live logs (follows output)
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-start` | Start the gateway |
|
||||
| `clawdock-stop` | Stop the gateway |
|
||||
| `clawdock-restart` | Restart the gateway |
|
||||
| `clawdock-status` | Check container status |
|
||||
| `clawdock-logs` | View live logs (follows output) |
|
||||
|
||||
### Container Access
|
||||
|
||||
- `openclaw-shell` - Interactive shell inside the gateway container
|
||||
- `openclaw-cli <command>` - Run OpenClaw CLI commands
|
||||
- `openclaw-exec <command>` - Execute arbitrary commands in the container
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-shell` | Interactive shell inside the gateway container |
|
||||
| `clawdock-cli <command>` | Run OpenClaw CLI commands |
|
||||
| `clawdock-exec <command>` | Execute arbitrary commands in the container |
|
||||
|
||||
### Web UI & Devices
|
||||
|
||||
- `openclaw-dashboard` - Open web UI in browser with authentication
|
||||
- `openclaw-devices` - List device pairing requests
|
||||
- `openclaw-approve <id>` - Approve a device pairing request
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-dashboard` | Open web UI in browser with authentication |
|
||||
| `clawdock-devices` | List device pairing requests |
|
||||
| `clawdock-approve <id>` | Approve a device pairing request |
|
||||
|
||||
### Setup & Configuration
|
||||
|
||||
- `openclaw-fix-token` - Configure gateway authentication token (run once after setup)
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-fix-token` | Configure gateway authentication token (run once) |
|
||||
|
||||
### Maintenance
|
||||
|
||||
- `openclaw-rebuild` - Rebuild the Docker image
|
||||
- `openclaw-clean` - ⚠️ Remove all containers and volumes (destructive!)
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-rebuild` | Rebuild the Docker image |
|
||||
| `clawdock-clean` | Remove all containers and volumes (destructive!) |
|
||||
|
||||
### Utilities
|
||||
|
||||
- `openclaw-health` - Run gateway health check
|
||||
- `openclaw-token` - Display the gateway authentication token
|
||||
- `openclaw-cd` - Jump to the OpenClaw project directory
|
||||
- `openclaw-config` - Open the OpenClaw config directory
|
||||
- `openclaw-workspace` - Open the workspace directory
|
||||
- `openclaw-help` - Show all available commands with examples
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `clawdock-health` | Run gateway health check |
|
||||
| `clawdock-token` | Display the gateway authentication token |
|
||||
| `clawdock-cd` | Jump to the OpenClaw project directory |
|
||||
| `clawdock-config` | Open the OpenClaw config directory |
|
||||
| `clawdock-workspace` | Open the workspace directory |
|
||||
| `clawdock-help` | Show all available commands with examples |
|
||||
|
||||
## Common Workflows
|
||||
|
||||
@@ -143,13 +114,13 @@ openclaw channels login --channel whatsapp
|
||||
**Check container status:**
|
||||
|
||||
```bash
|
||||
openclaw-status
|
||||
clawdock-status
|
||||
```
|
||||
|
||||
**View live logs:**
|
||||
|
||||
```bash
|
||||
openclaw-logs
|
||||
clawdock-logs
|
||||
```
|
||||
|
||||
### Restart After Configuration Changes
|
||||
@@ -157,29 +128,21 @@ openclaw-logs
|
||||
**Restart the gateway:**
|
||||
|
||||
```bash
|
||||
openclaw-restart
|
||||
clawdock-restart
|
||||
```
|
||||
|
||||
**Watch the logs:**
|
||||
|
||||
```bash
|
||||
openclaw-logs
|
||||
clawdock-logs
|
||||
```
|
||||
|
||||
### Access the Dashboard
|
||||
|
||||
```bash
|
||||
openclaw-dashboard
|
||||
```
|
||||
|
||||
The dashboard will open automatically with the correct authentication token.
|
||||
|
||||
### Set Up WhatsApp Bot
|
||||
|
||||
**Shell into the container:**
|
||||
|
||||
```bash
|
||||
openclaw-shell
|
||||
clawdock-shell
|
||||
```
|
||||
|
||||
**Inside the container, login to WhatsApp:**
|
||||
@@ -201,13 +164,13 @@ openclaw status
|
||||
**Check for pending pairing requests:**
|
||||
|
||||
```bash
|
||||
openclaw-devices
|
||||
clawdock-devices
|
||||
```
|
||||
|
||||
**Copy the Request ID from the "Pending" table, then approve:**
|
||||
|
||||
```bash
|
||||
openclaw-approve 6f9db1bd-a1cc-4d3f-b643-2c195262464e
|
||||
clawdock-approve 6f9db1bd-a1cc-4d3f-b643-2c195262464e
|
||||
```
|
||||
|
||||
Then refresh your browser.
|
||||
@@ -217,11 +180,10 @@ Then refresh your browser.
|
||||
If you see "gateway token mismatch" errors:
|
||||
|
||||
```bash
|
||||
openclaw-fix-token
|
||||
clawdock-fix-token
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
1. Read the token from your `.env` file
|
||||
2. Configure it in the OpenClaw config
|
||||
3. Restart the gateway
|
||||
@@ -234,14 +196,18 @@ This will:
|
||||
**Source the helpers file:**
|
||||
|
||||
```bash
|
||||
source /path/to/openclaw/scripts/shell-helpers/openclaw-helpers.sh
|
||||
source <(curl -sL https://raw.githubusercontent.com/openclaw/openclaw/main/scripts/shell-helpers/clawdock-helpers.sh)
|
||||
```
|
||||
|
||||
Add this line to your `~/.zshrc` or `~/.bashrc` for persistence.
|
||||
|
||||
### Token Mismatch Errors
|
||||
|
||||
Run `openclaw-fix-token` to automatically configure the authentication token.
|
||||
**Run the token fixer:**
|
||||
|
||||
```bash
|
||||
clawdock-fix-token
|
||||
```
|
||||
|
||||
### Permission Denied
|
||||
|
||||
@@ -256,11 +222,10 @@ docker ps
|
||||
**Check the logs:**
|
||||
|
||||
```bash
|
||||
openclaw-logs
|
||||
clawdock-logs
|
||||
```
|
||||
|
||||
Common issues:
|
||||
|
||||
- Port 18789 or 18790 already in use
|
||||
- Missing environment variables in `.env`
|
||||
- Docker daemon not running
|
||||
@@ -273,20 +238,10 @@ Common issues:
|
||||
|
||||
## Contributing
|
||||
|
||||
Found a bug or want to add a new helper? Contributions are welcome!
|
||||
Found a bug or want to add a new helper? Contributions welcome!
|
||||
|
||||
1. Test your changes locally
|
||||
2. Ensure helpers work in both bash and zsh
|
||||
3. Follow the existing naming convention (`openclaw-*`)
|
||||
3. Follow the naming convention (`clawdock-*`)
|
||||
4. Add documentation for new commands
|
||||
5. Submit a pull request
|
||||
|
||||
## License
|
||||
|
||||
Same as the OpenClaw project.
|
||||
|
||||
## Support
|
||||
|
||||
- 📚 [OpenClaw Documentation](https://docs.openclaw.ai)
|
||||
- 💬 [Community Discussions](https://github.com/openclaw/openclaw/discussions)
|
||||
- 🐛 [Report Issues](https://github.com/openclaw/openclaw/issues)
|
||||
|
||||
Reference in New Issue
Block a user