clawcloud 1.0.0 → 1.0.1
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/CLI_PUBLISHING_GUIDE.md +325 -0
- package/README.md +253 -118
- package/index.js +559 -0
- package/package.json +18 -35
- package/bin/clawcloud.js +0 -158
- package/src/api/agents.js +0 -22
- package/src/api/vms.js +0 -23
- package/src/api/wallet.js +0 -21
- package/src/commands/balance.js +0 -27
- package/src/commands/buy.js +0 -8
- package/src/commands/configure.js +0 -86
- package/src/commands/export.js +0 -203
- package/src/commands/fund.js +0 -13
- package/src/commands/interactive.js +0 -70
- package/src/commands/list.js +0 -87
- package/src/commands/nfts.js +0 -5
- package/src/commands/register.js +0 -72
- package/src/commands/ssh.js +0 -5
- package/src/commands/status.js +0 -5
- package/src/commands/terminate.js +0 -5
- package/src/commands/transfer.js +0 -5
- package/src/utils/banner.js +0 -9
- package/src/utils/config.js +0 -75
- package/src/utils/help.js +0 -85
- package/src/utils/version.js +0 -15
- package/templates/SKILL.md +0 -215
package/README.md
CHANGED
|
@@ -1,178 +1,313 @@
|
|
|
1
|
-
# ClawCloud CLI
|
|
1
|
+
# 🦞 ClawCloud CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Decentralized cloud infrastructure for AI agents. Purchase and manage VMs with crypto on Base.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
5
|
+
## 🚀 Quick Start
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
|
|
8
|
+
# Check available VM tiers
|
|
9
|
+
npx clawcloud tiers
|
|
10
|
+
|
|
11
|
+
# Purchase a VM
|
|
12
|
+
npx clawcloud purchase
|
|
13
|
+
|
|
14
|
+
# List your VMs
|
|
15
|
+
npx clawcloud list
|
|
16
|
+
|
|
17
|
+
# Get VM credentials
|
|
18
|
+
npx clawcloud get <tokenId>
|
|
11
19
|
```
|
|
12
20
|
|
|
13
|
-
## Installation
|
|
21
|
+
## 📦 Installation
|
|
14
22
|
|
|
15
|
-
###
|
|
23
|
+
### Option 1: npx (No installation needed)
|
|
24
|
+
```bash
|
|
25
|
+
npx clawcloud <command>
|
|
26
|
+
```
|
|
16
27
|
|
|
28
|
+
### Option 2: Global Install
|
|
17
29
|
```bash
|
|
18
|
-
|
|
30
|
+
npm install -g clawcloud
|
|
31
|
+
clawcloud <command>
|
|
19
32
|
```
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
## 🎯 Features
|
|
22
35
|
|
|
36
|
+
- ✅ Purchase VMs with USDC on Base
|
|
37
|
+
- ✅ Ownership via ERC-721 NFTs
|
|
38
|
+
- ✅ Automatic VM provisioning
|
|
39
|
+
- ✅ SSH credential retrieval
|
|
40
|
+
- ✅ Wallet management
|
|
41
|
+
- ✅ Balance checking
|
|
42
|
+
|
|
43
|
+
## 📋 Commands
|
|
44
|
+
|
|
45
|
+
### Purchase & Manage
|
|
23
46
|
```bash
|
|
24
|
-
|
|
25
|
-
clawcloud
|
|
47
|
+
clawcloud purchase # Purchase a new VM
|
|
48
|
+
clawcloud get <tokenId> # Get VM credentials
|
|
49
|
+
clawcloud list # List your VMs
|
|
26
50
|
```
|
|
27
51
|
|
|
28
|
-
|
|
52
|
+
### Information
|
|
53
|
+
```bash
|
|
54
|
+
clawcloud tiers # Show available VM tiers
|
|
55
|
+
clawcloud balance # Check wallet balance
|
|
56
|
+
clawcloud info # Show contract/API info
|
|
57
|
+
```
|
|
29
58
|
|
|
30
|
-
###
|
|
59
|
+
### Wallet
|
|
60
|
+
```bash
|
|
61
|
+
clawcloud wallet # View/setup wallet
|
|
62
|
+
```
|
|
31
63
|
|
|
64
|
+
### Help
|
|
32
65
|
```bash
|
|
33
|
-
|
|
66
|
+
clawcloud help # Show all commands
|
|
34
67
|
```
|
|
35
68
|
|
|
36
|
-
|
|
69
|
+
## 🛠️ Setup
|
|
37
70
|
|
|
38
|
-
###
|
|
71
|
+
### First Time Setup
|
|
39
72
|
|
|
40
|
-
|
|
73
|
+
1. **Run any command** and the CLI will guide you through wallet setup:
|
|
74
|
+
```bash
|
|
75
|
+
npx clawcloud tiers
|
|
76
|
+
```
|
|
41
77
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
78
|
+
2. **Choose wallet option:**
|
|
79
|
+
- Import existing private key
|
|
80
|
+
- Generate new wallet
|
|
81
|
+
|
|
82
|
+
3. **Fund your wallet:**
|
|
83
|
+
- Get ETH on Base (for gas): https://bridge.base.org
|
|
84
|
+
- Get USDC (for purchases): https://app.uniswap.org/swap?chain=base
|
|
85
|
+
|
|
86
|
+
### Configuration
|
|
87
|
+
|
|
88
|
+
Config is stored in: `~/.clawcloud/config.json`
|
|
89
|
+
|
|
90
|
+
**Security Note:** Never share your private key or config file!
|
|
45
91
|
|
|
46
|
-
|
|
47
|
-
- Verify your agent ID
|
|
48
|
-
- Create a wallet
|
|
49
|
-
- Send you the private key
|
|
50
|
-
- Provide funding instructions
|
|
92
|
+
## 💰 Pricing
|
|
51
93
|
|
|
52
|
-
|
|
94
|
+
| Tier | Name | Per Day | Per Month |
|
|
95
|
+
|------|------|---------|-----------|
|
|
96
|
+
| 0 | CPU-Basic-1vCPU-1GB | $0.50 | $15.00 |
|
|
97
|
+
| 1 | CPU-Standard-2vCPU-4GB | $1.00 | $30.00 |
|
|
98
|
+
| 2 | CPU-Performance-4vCPU-8GB | $2.00 | $60.00 |
|
|
99
|
+
| 3 | CPU-HighMem-8vCPU-16GB | $4.00 | $120.00 |
|
|
100
|
+
| 4 | GPU-T4-4vCPU-16GB | $8.00 | $240.00 |
|
|
101
|
+
| 5 | GPU-V100-8vCPU-32GB | $16.00 | $480.00 |
|
|
102
|
+
| 6 | GPU-A100-16vCPU-64GB | $32.00 | $960.00 |
|
|
103
|
+
| 7 | GPU-H100-32vCPU-128GB | $64.00 | $1,920.00 |
|
|
104
|
+
|
|
105
|
+
*Prices in USDC. Minimum 3-day purchase required.*
|
|
106
|
+
|
|
107
|
+
## 🔐 Security
|
|
108
|
+
|
|
109
|
+
- **Private keys are stored locally** in `~/.clawcloud/config.json`
|
|
110
|
+
- **Never share your private key** with anyone
|
|
111
|
+
- **Use a dedicated wallet** for ClawCloud operations
|
|
112
|
+
- **Backup your private key** securely
|
|
113
|
+
|
|
114
|
+
## 📖 Examples
|
|
115
|
+
|
|
116
|
+
### Purchase a VM
|
|
53
117
|
|
|
54
118
|
```bash
|
|
55
|
-
npx clawcloud
|
|
119
|
+
$ npx clawcloud purchase
|
|
120
|
+
|
|
121
|
+
🦞 Wallet: 0x1234...5678
|
|
122
|
+
📊 Available Tiers:
|
|
123
|
+
|
|
124
|
+
0. CPU-Basic-1vCPU-1GB - $0.50/day ($15.00/month)
|
|
125
|
+
1. CPU-Standard-2vCPU-4GB - $1.00/day ($30.00/month)
|
|
126
|
+
...
|
|
127
|
+
|
|
128
|
+
Choose tier (0-7): 4
|
|
129
|
+
Duration in days (3+ recommended): 7
|
|
130
|
+
|
|
131
|
+
💰 Total cost: $56.00 USDC
|
|
132
|
+
Proceed with purchase? (y/n): y
|
|
133
|
+
|
|
134
|
+
✅ USDC balance: $100.00 ✅
|
|
135
|
+
⏳ Approving USDC...
|
|
136
|
+
✅ USDC approved!
|
|
137
|
+
⏳ Purchasing VM...
|
|
138
|
+
✅ VM purchased successfully! 🎉
|
|
139
|
+
|
|
140
|
+
Token ID: 42
|
|
141
|
+
Tier: 4
|
|
142
|
+
Duration: 7 days
|
|
143
|
+
|
|
144
|
+
⏳ VM is provisioning... This takes 2-3 minutes.
|
|
145
|
+
Get credentials: npx clawcloud get 42
|
|
56
146
|
```
|
|
57
147
|
|
|
58
|
-
|
|
148
|
+
### Get VM Credentials
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
$ npx clawcloud get 42
|
|
152
|
+
|
|
153
|
+
⏳ Fetching credentials for VM #42...
|
|
154
|
+
✅ VM credentials retrieved!
|
|
155
|
+
|
|
156
|
+
======================================================================
|
|
157
|
+
🖥️ VM #42 - GPU-EXTERNAL
|
|
158
|
+
======================================================================
|
|
159
|
+
Tier: 4
|
|
160
|
+
Host: rentals-xxxxx.ssh.deployments.targon.com
|
|
161
|
+
Username: root
|
|
162
|
+
Expires: Feb 9, 2026, 12:00:00 PM
|
|
59
163
|
|
|
60
|
-
|
|
164
|
+
📝 SSH Command:
|
|
165
|
+
ssh rentals-xxxxx.ssh.deployments.targon.com
|
|
166
|
+
|
|
167
|
+
======================================================================
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### List Your VMs
|
|
61
171
|
|
|
62
172
|
```bash
|
|
63
|
-
npx clawcloud
|
|
173
|
+
$ npx clawcloud list
|
|
174
|
+
|
|
175
|
+
⏳ Fetching VMs for 0x1234...5678...
|
|
176
|
+
✅ Found 2 VM(s)
|
|
177
|
+
|
|
178
|
+
==========================================================================================
|
|
179
|
+
Your VMs:
|
|
180
|
+
==========================================================================================
|
|
181
|
+
|
|
182
|
+
✅ VM #42
|
|
183
|
+
Tier: 4
|
|
184
|
+
Type: gpu-external
|
|
185
|
+
Host: rentals-xxxxx.ssh.deployments.targon.com
|
|
186
|
+
Status: running
|
|
187
|
+
Created: Feb 2, 2026, 10:30:00 AM
|
|
188
|
+
Expires: Feb 9, 2026, 10:30:00 AM
|
|
189
|
+
Access: npx clawcloud get 42
|
|
190
|
+
|
|
191
|
+
✅ VM #43
|
|
192
|
+
Tier: 1
|
|
193
|
+
Type: gcp
|
|
194
|
+
Host: 35.123.45.67
|
|
195
|
+
Status: running
|
|
196
|
+
Created: Feb 2, 2026, 11:00:00 AM
|
|
197
|
+
Expires: Feb 5, 2026, 11:00:00 AM
|
|
198
|
+
Access: npx clawcloud get 43
|
|
199
|
+
|
|
200
|
+
==========================================================================================
|
|
64
201
|
```
|
|
65
202
|
|
|
66
|
-
|
|
67
|
-
- **OpenClaw / Clawd / Molt** - Installs skill automatically
|
|
68
|
-
- **Node.js SDK** - Exports config for custom agents
|
|
69
|
-
- **Python SDK** - Coming soon
|
|
70
|
-
- **Environment Variables** - For any language
|
|
203
|
+
### Check Balance
|
|
71
204
|
|
|
72
|
-
|
|
205
|
+
```bash
|
|
206
|
+
$ npx clawcloud balance
|
|
73
207
|
|
|
74
|
-
|
|
75
|
-
- `npx clawcloud` - Interactive menu
|
|
76
|
-
- `npx clawcloud register` - Register new agent
|
|
77
|
-
- `npx clawcloud configure` - Link wallet after Telegram
|
|
78
|
-
- `npx clawcloud fund` - Show funding instructions
|
|
208
|
+
⏳ Checking balances...
|
|
79
209
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
210
|
+
💰 Wallet Balances:
|
|
211
|
+
Address: 0x1234567890123456789012345678901234567890
|
|
212
|
+
ETH: 0.05 ETH (for gas)
|
|
213
|
+
USDC: $100.00 USDC
|
|
214
|
+
```
|
|
83
215
|
|
|
84
|
-
|
|
85
|
-
- `npx clawcloud balance` - Check USDC balance
|
|
216
|
+
## 🌐 Network Details
|
|
86
217
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- `npx clawcloud ssh <nft-id>` - SSH into VM
|
|
91
|
-
- `npx clawcloud transfer <nft-id>` - Transfer NFT/VM ownership
|
|
92
|
-
- `npx clawcloud terminate <nft-id>` - Destroy VM & burn NFT
|
|
218
|
+
**Network:** Base Mainnet
|
|
219
|
+
**Chain ID:** 8453
|
|
220
|
+
**RPC:** https://mainnet.base.org
|
|
93
221
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
222
|
+
**Smart Contract:** `0xF708741D37C420518852c6A15aB658066951c852`
|
|
223
|
+
**USDC Token:** `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
|
|
224
|
+
**API:** https://api.clawcloud.co
|
|
225
|
+
|
|
226
|
+
**Explorer:** https://basescan.org/address/0xF708741D37C420518852c6A15aB658066951c852
|
|
97
227
|
|
|
98
|
-
##
|
|
228
|
+
## 🛠️ For Developers
|
|
99
229
|
|
|
100
|
-
|
|
230
|
+
### Using in Your Application
|
|
101
231
|
|
|
102
232
|
```javascript
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const vm = await cloud.vms.purchase({
|
|
115
|
-
tier: 'SMALL',
|
|
116
|
-
months: 1
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// Wait for provisioning
|
|
120
|
-
await vm.waitReady();
|
|
121
|
-
|
|
122
|
-
// Deploy code
|
|
123
|
-
await vm.deployCode('./my-strategy');
|
|
124
|
-
|
|
125
|
-
// Run task
|
|
126
|
-
await vm.execute('npm run backtest');
|
|
127
|
-
}
|
|
233
|
+
const { exec } = require('child_process');
|
|
234
|
+
const util = require('util');
|
|
235
|
+
const execPromise = util.promisify(exec);
|
|
236
|
+
|
|
237
|
+
// Purchase VM
|
|
238
|
+
const { stdout } = await execPromise('npx clawcloud purchase');
|
|
239
|
+
console.log(stdout);
|
|
240
|
+
|
|
241
|
+
// Get credentials
|
|
242
|
+
const { stdout: creds } = await execPromise('npx clawcloud get 42');
|
|
243
|
+
console.log(creds);
|
|
128
244
|
```
|
|
129
245
|
|
|
130
|
-
|
|
246
|
+
### API Integration
|
|
131
247
|
|
|
132
|
-
|
|
133
|
-
- An ERC-721 NFT is minted to your wallet
|
|
134
|
-
- NFT token ID = VM identifier
|
|
135
|
-
- Own the NFT = Own the VM
|
|
136
|
-
- Transfer NFT = Transfer VM ownership
|
|
248
|
+
For programmatic access, use the REST API directly:
|
|
137
249
|
|
|
138
|
-
|
|
250
|
+
```bash
|
|
251
|
+
# API Documentation
|
|
252
|
+
https://api.clawcloud.co/docs
|
|
253
|
+
|
|
254
|
+
# Get tiers
|
|
255
|
+
curl https://api.clawcloud.co/tiers
|
|
139
256
|
|
|
140
|
-
|
|
257
|
+
# Get credentials (requires signature)
|
|
258
|
+
curl -H "Authorization: Bearer $SIGNATURE" \
|
|
259
|
+
https://api.clawcloud.co/credentials/42
|
|
260
|
+
```
|
|
141
261
|
|
|
142
|
-
|
|
143
|
-
- 🎨 **NFT-Based**: VMs are owned as ERC-721 tokens
|
|
144
|
-
- ⛓️ **Base Blockchain**: Fast, cheap transactions
|
|
145
|
-
- ☁️ **Multi-Cloud**: GCP, AWS, private servers
|
|
146
|
-
- 💰 **Pay-as-you-go**: Starting at $0.08/hour
|
|
147
|
-
- 🔐 **Non-Custodial**: You control your keys
|
|
262
|
+
## 🐛 Troubleshooting
|
|
148
263
|
|
|
149
|
-
|
|
264
|
+
### "Insufficient USDC" Error
|
|
265
|
+
- Buy USDC on Base: https://app.uniswap.org/swap?chain=base
|
|
266
|
+
- Bridge USDC to Base: https://bridge.base.org
|
|
267
|
+
|
|
268
|
+
### "Insufficient funds for gas" Error
|
|
269
|
+
- Bridge ETH to Base: https://bridge.base.org
|
|
270
|
+
- You need ~0.001 ETH for gas
|
|
271
|
+
|
|
272
|
+
### "VM still provisioning" Message
|
|
273
|
+
- Wait 2-3 minutes after purchase
|
|
274
|
+
- Try getting credentials again: `npx clawcloud get <tokenId>`
|
|
275
|
+
|
|
276
|
+
### "Invalid signature" Error
|
|
277
|
+
- Make sure you own the NFT for the token ID
|
|
278
|
+
- Check that you're using the correct wallet
|
|
279
|
+
|
|
280
|
+
### CLI Config Issues
|
|
281
|
+
```bash
|
|
282
|
+
# Remove config and start fresh
|
|
283
|
+
rm -rf ~/.clawcloud
|
|
284
|
+
npx clawcloud wallet
|
|
285
|
+
```
|
|
150
286
|
|
|
151
|
-
|
|
152
|
-
- USDC on Base blockchain
|
|
153
|
-
- Telegram account (for wallet setup)
|
|
287
|
+
## 🆘 Support
|
|
154
288
|
|
|
155
|
-
|
|
289
|
+
- **Documentation:** https://docs.clawcloud.co
|
|
290
|
+
- **Discord:** discord.gg/clawcloud
|
|
291
|
+
- **Twitter:** @ClawCloud
|
|
292
|
+
- **GitHub Issues:** https://github.com/clawcloud/clawcloud-cli/issues
|
|
156
293
|
|
|
157
|
-
|
|
158
|
-
- `agents.json` - Registered agents
|
|
159
|
-
- `wallet.json` - Wallet configuration (secure!)
|
|
160
|
-
- `config.json` - API endpoints and settings
|
|
294
|
+
## 📜 License
|
|
161
295
|
|
|
162
|
-
|
|
296
|
+
MIT License - see LICENSE file for details
|
|
163
297
|
|
|
164
|
-
|
|
165
|
-
- **Docs**: https://docs.clawcloud.co
|
|
166
|
-
- **Telegram**: https://t.me/clawcloud_devbot
|
|
167
|
-
- **GitHub**: https://github.com/clawcloud/clawcloud
|
|
168
|
-
- **Twitter**: https://twitter.com/clawcloudx
|
|
298
|
+
## 🚀 Roadmap
|
|
169
299
|
|
|
170
|
-
|
|
300
|
+
- [ ] Web dashboard
|
|
301
|
+
- [ ] VM management (restart, resize)
|
|
302
|
+
- [ ] Custom images/templates
|
|
303
|
+
- [ ] Team/organization accounts
|
|
304
|
+
- [ ] Volume attachments
|
|
305
|
+
- [ ] Networking configuration
|
|
306
|
+
- [ ] Monitoring & alerts
|
|
171
307
|
|
|
172
|
-
|
|
173
|
-
- 🐛 Issues: https://github.com/clawcloud/clawcloud/issues
|
|
174
|
-
- 📧 Email: support@clawcloud.co
|
|
308
|
+
---
|
|
175
309
|
|
|
176
|
-
|
|
310
|
+
**Built with ❤️ for autonomous AI agents**
|
|
311
|
+
Powered by Base, Railway, and Targon
|
|
177
312
|
|
|
178
|
-
|
|
313
|
+
🦞 LFG!
|