@clawdvault/cli 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +250 -33
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @clawdvault/cli
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@clawdvault/cli.svg)](https://www.npmjs.com/package/@clawdvault/cli)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  Command-line interface for [ClawdVault](https://clawdvault.com) - a pump.fun-style token launchpad on Solana.
4
7
 
5
8
  ## Installation
@@ -16,7 +19,7 @@ npx @clawdvault/cli tokens list
16
19
 
17
20
  ## Quick Start
18
21
 
19
- ### Setup Wallet
22
+ ### 1. Setup Wallet
20
23
 
21
24
  ```bash
22
25
  # Generate a new wallet
@@ -26,7 +29,7 @@ clawdvault wallet init
26
29
  export CLAWDVAULT_WALLET=~/.config/solana/id.json
27
30
  ```
28
31
 
29
- ### Read Operations (No Wallet Required)
32
+ ### 2. Read Operations (No Wallet Required)
30
33
 
31
34
  ```bash
32
35
  # List featured tokens
@@ -42,7 +45,7 @@ clawdvault trade quote -m TOKEN_MINT_ADDRESS -t buy -a 0.1
42
45
  clawdvault wallet sol-price
43
46
  ```
44
47
 
45
- ### Write Operations (Wallet Required)
48
+ ### 3. Write Operations (Wallet Required)
46
49
 
47
50
  ```bash
48
51
  # Create a new token
@@ -56,28 +59,137 @@ clawdvault trade sell --mint TOKEN_MINT_ADDRESS --amount 1000000
56
59
 
57
60
  # Sell by percentage
58
61
  clawdvault trade sell --mint TOKEN_MINT_ADDRESS --percent 50
62
+ ```
63
+
64
+ ## Commands Reference
65
+
66
+ ### `clawdvault tokens`
67
+
68
+ List and filter tokens.
59
69
 
60
- # Native SOL transfer
61
- clawdvault wallet transfer --to RECIPIENT_ADDRESS --sol 0.5
70
+ ```bash
71
+ clawdvault tokens list [options]
72
+
73
+ Options:
74
+ -s, --sort <field> Sort by: created_at, market_cap, volume, price
75
+ -p, --page <number> Page number (default: 1)
76
+ -l, --limit <number> Items per page (default: 20)
77
+ --graduated Show only graduated tokens
78
+ --not-graduated Show only non-graduated tokens
79
+ --json Output as JSON
80
+
81
+ Examples:
82
+ clawdvault tokens list --sort market_cap --limit 10
83
+ clawdvault tokens list --graduated --json
62
84
  ```
63
85
 
64
- ### Wallet Operations
86
+ ### `clawdvault token`
87
+
88
+ Token details and creation.
65
89
 
66
90
  ```bash
67
- # Show wallet info
68
- clawdvault wallet info
91
+ # Get token details
92
+ clawdvault token get <mint> [--json]
69
93
 
70
- # Check SOL balance
71
- clawdvault wallet sol-balance
94
+ # Create a new token
95
+ clawdvault token create [options]
96
+ -n, --name <name> Token name (required)
97
+ -s, --symbol <symbol> Token symbol (required)
98
+ -d, --description <desc> Description
99
+ -i, --image <path> Image file path (png, jpg, gif)
100
+ --initial-buy <sol> Initial buy amount in SOL
101
+ --twitter <url> Twitter URL
102
+ --telegram <url> Telegram URL
103
+ --website <url> Website URL
104
+ -w, --wallet <path> Wallet file path
105
+
106
+ # Get on-chain stats
107
+ clawdvault token stats <mint> [--json]
108
+
109
+ # Get top holders
110
+ clawdvault token holders <mint> [--json]
111
+
112
+ Examples:
113
+ clawdvault token get 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
114
+ clawdvault token create -n "Moon Token" -s "MOON" -i ./moon.png
115
+ clawdvault token create --name "Test" --symbol "TEST" --initial-buy 0.5
116
+ ```
117
+
118
+ ### `clawdvault trade`
119
+
120
+ Buy, sell, and get quotes.
121
+
122
+ ```bash
123
+ # Buy tokens
124
+ clawdvault trade buy [options]
125
+ -m, --mint <address> Token mint address (required)
126
+ -a, --sol <amount> SOL amount to spend (required)
127
+ -s, --slippage <percent> Slippage tolerance (default: 1)
128
+ -w, --wallet <path> Wallet file path
129
+ --simulate Simulate only, don't execute
130
+
131
+ # Sell tokens
132
+ clawdvault trade sell [options]
133
+ -m, --mint <address> Token mint address (required)
134
+ -a, --amount <tokens> Token amount to sell
135
+ -p, --percent <percent> Percentage of holdings to sell
136
+ -s, --slippage <percent> Slippage tolerance (default: 1)
137
+ -w, --wallet <path> Wallet file path
138
+ --simulate Simulate only, don't execute
139
+
140
+ Note: Use either --amount or --percent, not both.
141
+
142
+ # Get price quote
143
+ clawdvault trade quote [options]
144
+ -m, --mint <address> Token mint address (required)
145
+ -t, --type <type> Quote type: buy or sell (required)
146
+ -a, --amount <amount> Amount (SOL for buy, tokens for sell)
147
+ --json Output as JSON
148
+
149
+ # View trade history
150
+ clawdvault trade history [options]
151
+ -m, --mint <address> Token mint address (required)
152
+ -l, --limit <number> Number of trades (default: 20)
153
+ --json Output as JSON
154
+
155
+ Examples:
156
+ clawdvault trade buy -m TOKEN_MINT -a 0.1
157
+ clawdvault trade buy -m TOKEN_MINT -a 0.5 -s 2 --simulate
158
+ clawdvault trade sell -m TOKEN_MINT -p 50
159
+ clawdvault trade sell -m TOKEN_MINT -a 1000000
160
+ clawdvault trade quote -m TOKEN_MINT -t buy -a 0.1
161
+ ```
162
+
163
+ ### `clawdvault wallet`
164
+
165
+ Wallet management and info.
166
+
167
+ ```bash
168
+ # Show wallet info (address, SOL balance)
169
+ clawdvault wallet info [-w, --wallet <path>]
170
+
171
+ # Generate new wallet
172
+ clawdvault wallet init [-o, --output <path>] [--force]
173
+ Default output: ~/.clawdvault/wallet.json
174
+
175
+ # Get wallet address only
176
+ clawdvault wallet address [-w, --wallet <path>]
72
177
 
73
178
  # Check token balance
74
- clawdvault wallet balance -m TOKEN_MINT_ADDRESS
179
+ clawdvault wallet balance -m, --mint <address> [-w, --wallet <path>]
75
180
 
76
- # Get deposit address
77
- clawdvault wallet address
181
+ # Network status
182
+ clawdvault wallet network [--json]
78
183
 
79
- # Request devnet SOL (devnet only)
80
- clawdvault wallet airdrop --sol 1
184
+ # Current SOL/USD price
185
+ clawdvault wallet sol-price [--json]
186
+
187
+ Examples:
188
+ clawdvault wallet init
189
+ clawdvault wallet init -o ~/my-wallet.json
190
+ clawdvault wallet info
191
+ clawdvault wallet balance -m TOKEN_MINT
192
+ clawdvault wallet address
81
193
  ```
82
194
 
83
195
  ## Configuration
@@ -85,24 +197,34 @@ clawdvault wallet airdrop --sol 1
85
197
  ### Environment Variables
86
198
 
87
199
  ```bash
88
- # Wallet path
200
+ # Wallet path (overrides default locations)
89
201
  export CLAWDVAULT_WALLET=~/.config/solana/id.json
90
202
 
91
203
  # Custom API endpoint
92
204
  export CLAWDVAULT_API_URL=https://clawdvault.com/api
93
205
 
94
- # Solana RPC (default: mainnet)
206
+ # Solana RPC endpoint (default: mainnet)
207
+ export SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
208
+ # For devnet testing:
95
209
  export SOLANA_RPC_URL=https://api.devnet.solana.com
96
210
  ```
97
211
 
212
+ ### Wallet Lookup Order
213
+
214
+ 1. `--wallet` / `-w` flag
215
+ 2. `CLAWDVAULT_WALLET` environment variable
216
+ 3. `~/.clawdvault/wallet.json`
217
+ 4. `~/.config/solana/id.json` (Solana CLI default)
218
+
98
219
  ### Global Options
99
220
 
100
221
  All commands support:
101
222
 
102
223
  ```bash
103
- -w, --wallet <path> # Specify wallet file
104
- --rpc <url> # Specify RPC endpoint
105
- --json # Output as JSON
224
+ -w, --wallet <path> Specify wallet file
225
+ --rpc <url> Specify RPC endpoint
226
+ --json Output as JSON (where applicable)
227
+ -h, --help Show help
106
228
  ```
107
229
 
108
230
  ## Examples
@@ -113,34 +235,129 @@ All commands support:
113
235
  # 1. Generate wallet (first time only)
114
236
  clawdvault wallet init
115
237
 
116
- # 2. Check your address
238
+ # 2. Check your address and fund with SOL
117
239
  clawdvault wallet address
240
+ # Send SOL to this address from an exchange or another wallet
118
241
 
119
- # 3. Fund with SOL (or use airdrop on devnet)
120
- clawdvault wallet airdrop --sol 2
242
+ # 3. Verify SOL balance
243
+ clawdvault wallet info
121
244
 
122
- # 4. Create token
245
+ # 4. Create your token
123
246
  clawdvault token create \
124
247
  --name "Moon Shot" \
125
248
  --symbol "MOON" \
126
- --description "To the moon!" \
249
+ --description "To the moon! 🚀" \
127
250
  --image ./moon.png \
128
- --twitter @moonshot \
129
- --website https://moonshot.io
251
+ --twitter https://twitter.com/moonshot \
252
+ --website https://moonshot.io \
253
+ --initial-buy 0.1
130
254
 
131
- # 5. Check your token
255
+ # 5. Check your new token
132
256
  clawdvault token get YOUR_TOKEN_MINT
133
257
 
134
- # 6. Buy more (optional)
135
- clawdvault trade buy --mint YOUR_TOKEN_MINT --sol 0.5
258
+ # 6. View it on ClawdVault
259
+ echo "https://clawdvault.com/token/YOUR_TOKEN_MINT"
260
+ ```
261
+
262
+ ### Trading Workflow
263
+
264
+ ```bash
265
+ # Get a quote first
266
+ clawdvault trade quote -m TOKEN_MINT -t buy -a 0.5
267
+
268
+ # Simulate the trade (dry run)
269
+ clawdvault trade buy -m TOKEN_MINT -a 0.5 --simulate
270
+
271
+ # Execute the trade
272
+ clawdvault trade buy -m TOKEN_MINT -a 0.5
273
+
274
+ # Check your balance
275
+ clawdvault wallet balance -m TOKEN_MINT
276
+
277
+ # Take profits - sell 25%
278
+ clawdvault trade sell -m TOKEN_MINT -p 25
279
+
280
+ # Or sell specific amount
281
+ clawdvault trade sell -m TOKEN_MINT -a 500000
282
+ ```
283
+
284
+ ### Monitoring
285
+
286
+ ```bash
287
+ # Check token stats
288
+ clawdvault token stats TOKEN_MINT --json
289
+
290
+ # View recent trades
291
+ clawdvault trade history -m TOKEN_MINT -l 50
292
+
293
+ # Check top holders
294
+ clawdvault token holders TOKEN_MINT
136
295
  ```
137
296
 
138
297
  ## Network Support
139
298
 
140
- - **Mainnet**: Production trading with real SOL
141
- - **Devnet**: Free testing with faucet SOL
299
+ | Network | RPC URL | Notes |
300
+ |---------|---------|-------|
301
+ | Mainnet | `https://api.mainnet-beta.solana.com` | Production (default) |
302
+ | Devnet | `https://api.devnet.solana.com` | Free testing |
303
+
304
+ ```bash
305
+ # Use devnet for testing
306
+ export SOLANA_RPC_URL=https://api.devnet.solana.com
307
+ clawdvault tokens list
308
+ ```
309
+
310
+ ## Troubleshooting
311
+
312
+ ### "Error: Wallet not found"
313
+ ```bash
314
+ # Generate a new wallet
315
+ clawdvault wallet init
316
+
317
+ # Or set path to existing wallet
318
+ export CLAWDVAULT_WALLET=~/.config/solana/id.json
319
+ ```
320
+
321
+ ### "Error: Insufficient SOL balance"
322
+ Your wallet needs SOL for transaction fees:
323
+ ```bash
324
+ clawdvault wallet info # Check balance
325
+ # Fund your wallet address with SOL
326
+ ```
327
+
328
+ ### "Error: Slippage exceeded"
329
+ Price moved during transaction. Increase slippage:
330
+ ```bash
331
+ clawdvault trade buy -m MINT -a 0.1 -s 5 # 5% slippage
332
+ ```
333
+
334
+ ### "Error: Token not found"
335
+ - Verify the mint address is correct
336
+ - Token may not be indexed yet (wait a few seconds after creation)
337
+
338
+ ### Transaction stuck/pending
339
+ - Solana network may be congested
340
+ - Check transaction on [Solscan](https://solscan.io)
341
+ - Try again with higher priority fee (coming soon)
342
+
343
+ ### Debug mode
344
+ Add `DEBUG=clawdvault:*` for verbose logging:
345
+ ```bash
346
+ DEBUG=clawdvault:* clawdvault trade buy -m MINT -a 0.1
347
+ ```
348
+
349
+ ## Programmatic Usage
350
+
351
+ You can also use the CLI from Node.js scripts:
352
+
353
+ ```typescript
354
+ import { execSync } from 'child_process';
355
+
356
+ const result = execSync('clawdvault tokens list --json', { encoding: 'utf-8' });
357
+ const tokens = JSON.parse(result);
358
+ ```
142
359
 
143
- Use `--rpc https://api.devnet.solana.com` or set `SOLANA_RPC_URL` for devnet.
360
+ For more control, use the [@clawdvault/sdk](https://www.npmjs.com/package/@clawdvault/sdk) package directly.
144
361
 
145
362
  ## License
146
363
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawdvault/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for ClawdVault - Solana token launchpad",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "clean": "rm -rf dist"
16
16
  },
17
17
  "dependencies": {
18
- "@clawdvault/sdk": "^0.1.1",
18
+ "@clawdvault/sdk": "^0.1.2",
19
19
  "@solana/spl-token": "^0.4.0",
20
20
  "@solana/web3.js": "^1.91.0",
21
21
  "bs58": "^5.0.0",