@clawdvault/cli 0.1.0 → 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 +364 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,364 @@
1
+ # @clawdvault/cli
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
+
6
+ Command-line interface for [ClawdVault](https://clawdvault.com) - a pump.fun-style token launchpad on Solana.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install -g @clawdvault/cli
12
+ ```
13
+
14
+ Or use without installing:
15
+
16
+ ```bash
17
+ npx @clawdvault/cli tokens list
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ ### 1. Setup Wallet
23
+
24
+ ```bash
25
+ # Generate a new wallet
26
+ clawdvault wallet init
27
+
28
+ # Or use an existing Solana CLI wallet
29
+ export CLAWDVAULT_WALLET=~/.config/solana/id.json
30
+ ```
31
+
32
+ ### 2. Read Operations (No Wallet Required)
33
+
34
+ ```bash
35
+ # List featured tokens
36
+ clawdvault tokens list
37
+
38
+ # Get token details
39
+ clawdvault token get TOKEN_MINT_ADDRESS
40
+
41
+ # Get price quote
42
+ clawdvault trade quote -m TOKEN_MINT_ADDRESS -t buy -a 0.1
43
+
44
+ # Check SOL price
45
+ clawdvault wallet sol-price
46
+ ```
47
+
48
+ ### 3. Write Operations (Wallet Required)
49
+
50
+ ```bash
51
+ # Create a new token
52
+ clawdvault token create --name "My Token" --symbol "MYTOK" --image ./image.png
53
+
54
+ # Buy tokens
55
+ clawdvault trade buy --mint TOKEN_MINT_ADDRESS --sol 0.1
56
+
57
+ # Sell tokens (by amount)
58
+ clawdvault trade sell --mint TOKEN_MINT_ADDRESS --amount 1000000
59
+
60
+ # Sell by percentage
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.
69
+
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
84
+ ```
85
+
86
+ ### `clawdvault token`
87
+
88
+ Token details and creation.
89
+
90
+ ```bash
91
+ # Get token details
92
+ clawdvault token get <mint> [--json]
93
+
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>]
177
+
178
+ # Check token balance
179
+ clawdvault wallet balance -m, --mint <address> [-w, --wallet <path>]
180
+
181
+ # Network status
182
+ clawdvault wallet network [--json]
183
+
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
193
+ ```
194
+
195
+ ## Configuration
196
+
197
+ ### Environment Variables
198
+
199
+ ```bash
200
+ # Wallet path (overrides default locations)
201
+ export CLAWDVAULT_WALLET=~/.config/solana/id.json
202
+
203
+ # Custom API endpoint
204
+ export CLAWDVAULT_API_URL=https://clawdvault.com/api
205
+
206
+ # Solana RPC endpoint (default: mainnet)
207
+ export SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
208
+ # For devnet testing:
209
+ export SOLANA_RPC_URL=https://api.devnet.solana.com
210
+ ```
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
+
219
+ ### Global Options
220
+
221
+ All commands support:
222
+
223
+ ```bash
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
228
+ ```
229
+
230
+ ## Examples
231
+
232
+ ### Create and Launch a Token
233
+
234
+ ```bash
235
+ # 1. Generate wallet (first time only)
236
+ clawdvault wallet init
237
+
238
+ # 2. Check your address and fund with SOL
239
+ clawdvault wallet address
240
+ # Send SOL to this address from an exchange or another wallet
241
+
242
+ # 3. Verify SOL balance
243
+ clawdvault wallet info
244
+
245
+ # 4. Create your token
246
+ clawdvault token create \
247
+ --name "Moon Shot" \
248
+ --symbol "MOON" \
249
+ --description "To the moon! 🚀" \
250
+ --image ./moon.png \
251
+ --twitter https://twitter.com/moonshot \
252
+ --website https://moonshot.io \
253
+ --initial-buy 0.1
254
+
255
+ # 5. Check your new token
256
+ clawdvault token get YOUR_TOKEN_MINT
257
+
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
295
+ ```
296
+
297
+ ## Network Support
298
+
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
+ ```
359
+
360
+ For more control, use the [@clawdvault/sdk](https://www.npmjs.com/package/@clawdvault/sdk) package directly.
361
+
362
+ ## License
363
+
364
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawdvault/cli",
3
- "version": "0.1.0",
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.0",
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",