clawmacdo 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +355 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# clawmacdo
|
|
2
|
+
|
|
3
|
+
[](https://github.com/kenken64/clawmacdo/actions/workflows/release.yml)
|
|
4
|
+
[](https://github.com/kenken64/clawmacdo/actions/workflows/changelog.yml)
|
|
5
|
+
|
|
6
|
+
Rust CLI tool for deploying [OpenClaw](https://openclaw.ai) to **DigitalOcean**, **AWS Lightsail**, **Tencent Cloud**, or **Microsoft Azure** — with Claude Code, Codex, and Gemini CLI pre-installed.
|
|
7
|
+
|
|
8
|
+
## ✨ What's New in v0.9.0
|
|
9
|
+
|
|
10
|
+
- **Deploy progress tracking** — All 16 deploy steps are now persisted to SQLite in real-time
|
|
11
|
+
- **`clawmacdo track` command** — Query deploy progress by ID, hostname, or IP address
|
|
12
|
+
- **Follow mode** (`--follow`) — Live-polling display that refreshes until deployment finishes
|
|
13
|
+
- **JSON output** (`--json`) — NDJSON format for programmatic consumption
|
|
14
|
+
- **Clap-based CLI** — Proper subcommand routing with `track` and `serve`
|
|
15
|
+
|
|
16
|
+
### Previous highlights
|
|
17
|
+
- **Modular workspace** — Each crate has a single responsibility with feature flags
|
|
18
|
+
- **4 cloud providers** — DigitalOcean, AWS Lightsail, Tencent Cloud, Microsoft Azure
|
|
19
|
+
- **npm distribution** — `npm install -g clawmacdo`
|
|
20
|
+
|
|
21
|
+
## 🏗️ Project Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
clawmacdo/
|
|
25
|
+
├── Cargo.toml # Workspace configuration
|
|
26
|
+
├── crates/ # All crates in workspace
|
|
27
|
+
│ ├── clawmacdo-cli/ # 🖥️ Main CLI binary & command orchestration
|
|
28
|
+
│ ├── clawmacdo-core/ # 🔧 Config, errors, shared types
|
|
29
|
+
│ ├── clawmacdo-cloud/ # ☁️ Cloud provider implementations
|
|
30
|
+
│ ├── clawmacdo-provision/# 🔨 Server provisioning & setup logic
|
|
31
|
+
│ ├── clawmacdo-db/ # 💾 Database operations & storage
|
|
32
|
+
│ ├── clawmacdo-ssh/ # 🔑 SSH/SCP operations & key management
|
|
33
|
+
│ └── clawmacdo-ui/ # 🎨 Web UI, progress bars, user prompts
|
|
34
|
+
├── assets/ # Static assets (mascot, etc.)
|
|
35
|
+
└── README.md
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 📦 Crate Overview
|
|
39
|
+
|
|
40
|
+
| Crate | Purpose | Dependencies |
|
|
41
|
+
|-------|---------|--------------|
|
|
42
|
+
| **clawmacdo-cli** | Main binary, command parsing, orchestration | All other crates |
|
|
43
|
+
| **clawmacdo-core** | Configuration, errors, shared types | Minimal (serde, anyhow) |
|
|
44
|
+
| **clawmacdo-cloud** | DigitalOcean, AWS Lightsail & Tencent Cloud APIs | reqwest, async-trait |
|
|
45
|
+
| **clawmacdo-provision** | Server setup, package installation | SSH, Core, UI |
|
|
46
|
+
| **clawmacdo-db** | SQLite operations, job tracking | rusqlite |
|
|
47
|
+
| **clawmacdo-ssh** | SSH connections, file transfers | ssh2 |
|
|
48
|
+
| **clawmacdo-ui** | Progress bars, web interface | indicatif, axum |
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
- **Multi-cloud**: Deploy to DigitalOcean, AWS Lightsail, or Tencent Cloud with `--provider` flag
|
|
53
|
+
- **Backup** local `~/.openclaw/` config into a timestamped `.tar.gz`
|
|
54
|
+
- **1-click deploy**: generate SSH keys, provision a cloud instance, install Node 24 + OpenClaw + Claude Code + Codex + Gemini CLI, restore config, configure `.env` (API + messaging), start the gateway, and auto-configure model failover
|
|
55
|
+
- **Cloud-to-cloud migration**: SSH into a source instance, back up remotely, deploy to a new instance, restore
|
|
56
|
+
- **Destroy**: delete an instance by name with confirmation, clean up SSH keys (cloud + local)
|
|
57
|
+
- **Status**: list all openclaw-tagged instances with IPs
|
|
58
|
+
- **List backups**: show local backup archives with sizes and dates
|
|
59
|
+
- **Web UI**: Browser-based deploy interface with real-time SSE progress streaming (optional)
|
|
60
|
+
- **Security groups**: Auto-create firewall rules on Tencent Cloud (SSH + HTTP/HTTPS)
|
|
61
|
+
|
|
62
|
+
## Supported Cloud Providers
|
|
63
|
+
|
|
64
|
+
| Provider | Flag | Credentials | Prerequisite |
|
|
65
|
+
|----------|------|-------------|-------------|
|
|
66
|
+
| DigitalOcean | `--provider=digitalocean` (default) | `--do-token` | — |
|
|
67
|
+
| AWS Lightsail | `--provider=lightsail` (or `aws`) | `--aws-access-key-id` + `--aws-secret-access-key` | [AWS CLI](https://aws.amazon.com/cli/) installed |
|
|
68
|
+
| Tencent Cloud | `--provider=tencent` | `--tencent-secret-id` + `--tencent-secret-key` | — |
|
|
69
|
+
| Microsoft Azure | `--provider=azure` (or `az`) | `--azure-tenant-id` + `--azure-subscription-id` + `--azure-client-id` + `--azure-client-secret` | [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/) installed |
|
|
70
|
+
|
|
71
|
+
## Download
|
|
72
|
+
|
|
73
|
+
Pre-built binaries for every release are available on the [Releases page](https://github.com/kenken64/clawmacdo/releases):
|
|
74
|
+
|
|
75
|
+
| Platform | Architecture | File |
|
|
76
|
+
|----------|-------------|------|
|
|
77
|
+
| Windows | x86_64 | `clawmacdo-windows-amd64.zip` |
|
|
78
|
+
| Linux | x86_64 | `clawmacdo-linux-amd64.tar.gz` |
|
|
79
|
+
| macOS | Apple Silicon (arm64) | `clawmacdo-darwin-arm64.tar.gz` |
|
|
80
|
+
|
|
81
|
+
## Installation
|
|
82
|
+
|
|
83
|
+
### From npm (recommended)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g clawmacdo
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### From release binary
|
|
90
|
+
|
|
91
|
+
Download the archive for your platform from [Releases](https://github.com/kenken64/clawmacdo/releases), extract, and add to your `PATH`.
|
|
92
|
+
|
|
93
|
+
### From source
|
|
94
|
+
|
|
95
|
+
#### Full build (all features)
|
|
96
|
+
```bash
|
|
97
|
+
cargo build --release
|
|
98
|
+
# Binary: target/release/clawmacdo (4.6MB)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Minimal build (CLI only, no web UI)
|
|
102
|
+
```bash
|
|
103
|
+
cargo build --release --no-default-features --features minimal
|
|
104
|
+
# Binary: target/release/clawmacdo (3.1MB - 32% smaller!)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### DigitalOcean-only build
|
|
108
|
+
```bash
|
|
109
|
+
cargo build --release --no-default-features --features digitalocean-only
|
|
110
|
+
# Binary: target/release/clawmacdo (3.1MB, no Tencent Cloud)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### AWS Lightsail-only build
|
|
114
|
+
```bash
|
|
115
|
+
cargo build --release --no-default-features --features aws-only
|
|
116
|
+
# Binary: target/release/clawmacdo (Lightsail only, requires AWS CLI)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Build Features
|
|
120
|
+
|
|
121
|
+
| Feature | Description | Default |
|
|
122
|
+
|---------|-------------|---------|
|
|
123
|
+
| `web-ui` | Browser-based deployment interface | ✅ |
|
|
124
|
+
| `lightsail` | AWS Lightsail provider support (via AWS CLI) | ✅ |
|
|
125
|
+
| `tencent-cloud` | Tencent Cloud provider support | ✅ |
|
|
126
|
+
| `azure` | Microsoft Azure provider support (via Azure CLI) | ✅ |
|
|
127
|
+
| `digitalocean` | DigitalOcean provider support | ✅ |
|
|
128
|
+
| `aws-only` | Lightsail-only build (no DO or Tencent) | ❌ |
|
|
129
|
+
| `minimal` | CLI-only, no web UI or optional features | ❌ |
|
|
130
|
+
|
|
131
|
+
## Usage
|
|
132
|
+
|
|
133
|
+
### Deploy OpenClaw to DigitalOcean
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Set your DO token
|
|
137
|
+
export DO_TOKEN="your_digitalocean_api_token"
|
|
138
|
+
|
|
139
|
+
# Deploy with backup & restore
|
|
140
|
+
clawmacdo deploy \
|
|
141
|
+
--customer-name "my-openclaw" \
|
|
142
|
+
--restore-from ~/backups/openclaw-backup-2024-03-09.tar.gz
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Deploy to AWS Lightsail
|
|
146
|
+
|
|
147
|
+
> **Prerequisite:** [AWS CLI](https://aws.amazon.com/cli/) must be installed and accessible in your `PATH`.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Set AWS credentials
|
|
151
|
+
export AWS_ACCESS_KEY_ID="your_access_key_id"
|
|
152
|
+
export AWS_SECRET_ACCESS_KEY="your_secret_access_key"
|
|
153
|
+
export AWS_REGION="us-east-1" # default region
|
|
154
|
+
|
|
155
|
+
# Deploy to Lightsail
|
|
156
|
+
clawmacdo deploy \
|
|
157
|
+
--provider lightsail \
|
|
158
|
+
--customer-name "my-openclaw" \
|
|
159
|
+
--customer-email "you@example.com" \
|
|
160
|
+
--aws-region us-east-1
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Lightsail Instance Sizes
|
|
164
|
+
|
|
165
|
+
| clawmacdo `--size` | Lightsail Bundle | vCPU | RAM | Price |
|
|
166
|
+
|--------------------|-----------------|------|-----|-------|
|
|
167
|
+
| `s-1vcpu-2gb` | `small_3_0` | 1 | 2 GB | ~$10/mo |
|
|
168
|
+
| `s-2vcpu-4gb` *(default)* | `medium_3_0` | 2 | 4 GB | ~$20/mo |
|
|
169
|
+
| `s-4vcpu-8gb` | `large_3_0` | 4 | 8 GB | ~$40/mo |
|
|
170
|
+
|
|
171
|
+
### Deploy to Tencent Cloud
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Set Tencent credentials
|
|
175
|
+
export TENCENT_SECRET_ID="your_secret_id"
|
|
176
|
+
export TENCENT_SECRET_KEY="your_secret_key"
|
|
177
|
+
|
|
178
|
+
# Deploy to Hong Kong region
|
|
179
|
+
clawmacdo deploy \
|
|
180
|
+
--provider tencent \
|
|
181
|
+
--customer-name "my-openclaw-hk" \
|
|
182
|
+
--region ap-hongkong
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Track Deploy Progress
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Track by deploy ID, hostname, or IP
|
|
189
|
+
clawmacdo track <deploy-id>
|
|
190
|
+
|
|
191
|
+
# Follow mode — live refresh until complete
|
|
192
|
+
clawmacdo track <deploy-id> --follow
|
|
193
|
+
|
|
194
|
+
# JSON output (NDJSON)
|
|
195
|
+
clawmacdo track <deploy-id> --json
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Web UI Mode
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Start browser interface
|
|
202
|
+
clawmacdo serve --port 3456
|
|
203
|
+
# Open http://localhost:3456
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Cloud Migration
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Migrate from one cloud to another
|
|
210
|
+
clawmacdo migrate \
|
|
211
|
+
--source-ip 1.2.3.4 \
|
|
212
|
+
--source-ssh-key ~/.ssh/old_instance \
|
|
213
|
+
--target-provider tencent \
|
|
214
|
+
--customer-name "migrated-openclaw"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Backup & Restore
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Create local backup
|
|
221
|
+
clawmacdo backup
|
|
222
|
+
|
|
223
|
+
# List backups
|
|
224
|
+
clawmacdo list-backups
|
|
225
|
+
|
|
226
|
+
# Deploy with specific backup
|
|
227
|
+
clawmacdo deploy --restore-from ~/.openclaw/backups/openclaw-2024-03-09_14-30-15.tar.gz
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Examples
|
|
231
|
+
|
|
232
|
+
### Full Deploy with All Options
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
clawmacdo deploy \
|
|
236
|
+
--provider digitalocean \
|
|
237
|
+
--customer-name "production-openclaw" \
|
|
238
|
+
--size s-2vcpu-4gb \
|
|
239
|
+
--region nyc1 \
|
|
240
|
+
--restore-from ~/openclaw-backup.tar.gz \
|
|
241
|
+
--claude-api-key "$CLAUDE_API_KEY" \
|
|
242
|
+
--openai-api-key "$OPENAI_API_KEY" \
|
|
243
|
+
--whatsapp-phone "+1234567890" \
|
|
244
|
+
--telegram-token "$TELEGRAM_TOKEN" \
|
|
245
|
+
--tailscale \
|
|
246
|
+
--tailscale-auth-key "$TAILSCALE_AUTH"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Quick Status Check
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# List all instances
|
|
253
|
+
clawmacdo status
|
|
254
|
+
|
|
255
|
+
# Check specific provider
|
|
256
|
+
clawmacdo status --provider tencent
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Development
|
|
260
|
+
|
|
261
|
+
### Workspace Commands
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# Build all crates
|
|
265
|
+
cargo build
|
|
266
|
+
|
|
267
|
+
# Test all crates
|
|
268
|
+
cargo test
|
|
269
|
+
|
|
270
|
+
# Build specific crate
|
|
271
|
+
cargo build -p clawmacdo-core
|
|
272
|
+
|
|
273
|
+
# Run clippy on workspace
|
|
274
|
+
cargo clippy --all
|
|
275
|
+
|
|
276
|
+
# Update dependencies
|
|
277
|
+
cargo update
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Adding Dependencies
|
|
281
|
+
|
|
282
|
+
Add to workspace `Cargo.toml`:
|
|
283
|
+
```toml
|
|
284
|
+
[workspace.dependencies]
|
|
285
|
+
new-crate = "1.0"
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Then reference in individual crate:
|
|
289
|
+
```toml
|
|
290
|
+
[dependencies]
|
|
291
|
+
new-crate = { workspace = true }
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Environment Variables
|
|
295
|
+
|
|
296
|
+
| Variable | Description | Required |
|
|
297
|
+
|----------|-------------|----------|
|
|
298
|
+
| `DO_TOKEN` | DigitalOcean API token | For DO deploys |
|
|
299
|
+
| `AWS_ACCESS_KEY_ID` | AWS IAM access key ID | For Lightsail deploys |
|
|
300
|
+
| `AWS_SECRET_ACCESS_KEY` | AWS IAM secret access key | For Lightsail deploys |
|
|
301
|
+
| `AWS_REGION` | AWS region (default: `us-east-1`) | For Lightsail deploys |
|
|
302
|
+
| `TENCENT_SECRET_ID` | Tencent Cloud Secret ID | For Tencent deploys |
|
|
303
|
+
| `TENCENT_SECRET_KEY` | Tencent Cloud Secret Key | For Tencent deploys |
|
|
304
|
+
| `AZURE_TENANT_ID` | Azure AD tenant ID | For Azure deploys |
|
|
305
|
+
| `AZURE_SUBSCRIPTION_ID` | Azure subscription ID | For Azure deploys |
|
|
306
|
+
| `AZURE_CLIENT_ID` | Azure service principal client ID | For Azure deploys |
|
|
307
|
+
| `AZURE_CLIENT_SECRET` | Azure service principal client secret | For Azure deploys |
|
|
308
|
+
| `CLAUDE_API_KEY` | Anthropic Claude API key | Optional |
|
|
309
|
+
| `OPENAI_API_KEY` | OpenAI API key | Optional |
|
|
310
|
+
| `TELEGRAM_TOKEN` | Telegram bot token | Optional |
|
|
311
|
+
| `TAILSCALE_AUTH_KEY` | Tailscale auth key | Optional |
|
|
312
|
+
|
|
313
|
+
## Architecture Notes
|
|
314
|
+
|
|
315
|
+
The refactored workspace follows a **dependency hierarchy**:
|
|
316
|
+
|
|
317
|
+
1. **clawmacdo-core** - Foundation (no internal deps)
|
|
318
|
+
2. **clawmacdo-ssh** - Depends on core
|
|
319
|
+
3. **clawmacdo-db** - Depends on core
|
|
320
|
+
4. **clawmacdo-ui** - Depends on core
|
|
321
|
+
5. **clawmacdo-cloud** - Depends on core
|
|
322
|
+
6. **clawmacdo-provision** - Depends on core, ssh, ui, cloud
|
|
323
|
+
7. **clawmacdo-cli** - Orchestration layer (depends on all)
|
|
324
|
+
|
|
325
|
+
This prevents circular dependencies and enables clean testing.
|
|
326
|
+
|
|
327
|
+
## Performance Optimizations
|
|
328
|
+
|
|
329
|
+
- **LTO enabled** for release builds
|
|
330
|
+
- **Panic = abort** for smaller binaries
|
|
331
|
+
- **Symbol stripping** in release mode
|
|
332
|
+
- **Feature gates** for optional components
|
|
333
|
+
- **Minimal Tokio features** (not "full")
|
|
334
|
+
|
|
335
|
+
## Contributing
|
|
336
|
+
|
|
337
|
+
1. Fork the repository
|
|
338
|
+
2. Create a feature branch
|
|
339
|
+
3. Add tests for new functionality
|
|
340
|
+
4. Run `cargo clippy` and `cargo test`
|
|
341
|
+
5. Submit a pull request
|
|
342
|
+
|
|
343
|
+
## License
|
|
344
|
+
|
|
345
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
346
|
+
|
|
347
|
+
## Changelog
|
|
348
|
+
|
|
349
|
+
See [CHANGELOG.md](CHANGELOG.md) for version history and breaking changes.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
**Last updated:** March 14, 2026
|
|
354
|
+
**Current version:** 0.9.0
|
|
355
|
+
**Architecture version:** 2.0 (modular workspace)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawmacdo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "CLI tool for deploying OpenClaw to multiple cloud providers with pre-installed AI dev tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openclaw",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"node": ">=16"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@clawmacdo/darwin-arm64": "0.
|
|
34
|
-
"@clawmacdo/linux-x64": "0.
|
|
35
|
-
"@clawmacdo/win32-x64": "0.
|
|
33
|
+
"@clawmacdo/darwin-arm64": "0.10.0",
|
|
34
|
+
"@clawmacdo/linux-x64": "0.10.0",
|
|
35
|
+
"@clawmacdo/win32-x64": "0.10.0"
|
|
36
36
|
}
|
|
37
37
|
}
|