clawncher 0.1.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 ADDED
@@ -0,0 +1,494 @@
1
+ # clawncher
2
+
3
+ Command-line interface for [Clawncher](https://clawn.ch/er) - deploy tokens on Base with Uniswap V4 pools, MEV protection, and configurable fee distribution.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g clawncher
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Configure your private key
15
+ clawncher config --private-key YOUR_PRIVATE_KEY
16
+
17
+ # Deploy a new token
18
+ clawncher deploy --name "My Token" --symbol MYTKN
19
+
20
+ # Show contract addresses
21
+ clawncher addresses
22
+
23
+ # Get token info from chain
24
+ clawncher info 0xTokenAddress
25
+ ```
26
+
27
+ ## Commands
28
+
29
+ ### Deploy
30
+
31
+ Deploy a new token on Base with Uniswap V4 pool:
32
+
33
+ ```bash
34
+ # Basic deployment
35
+ clawncher deploy --name "My Token" --symbol MYTKN
36
+
37
+ # With image and description
38
+ clawncher deploy --name "My Token" --symbol MYTKN \
39
+ --image "https://example.com/logo.png" \
40
+ --description "A great token"
41
+
42
+ # Custom fee recipient
43
+ clawncher deploy --name "My Token" --symbol MYTKN --recipient 0x1234...
44
+
45
+ # 1% LP fee: 80% to deployer, 20% protocol
46
+ # Change fee preference to receive in WETH instead:
47
+ clawncher deploy --name "My Token" --symbol MYTKN --fee-preference Paired
48
+
49
+ # With vault allocation
50
+ clawncher deploy --name "My Token" --symbol MYTKN \
51
+ --vault-percent 10 \
52
+ --vault-lockup 30 \
53
+ --vault-recipient 0x1234...
54
+
55
+ # With dev buy (instant purchase at launch)
56
+ clawncher deploy --name "My Token" --symbol MYTKN \
57
+ --dev-buy 0.1 \
58
+ --dev-buy-recipient 0x1234...
59
+
60
+ # Simulate deployment without sending transaction
61
+ clawncher deploy --name "My Token" --symbol MYTKN --dry-run
62
+
63
+ # Deploy to mainnet
64
+ clawncher deploy --name "My Token" --symbol MYTKN --network mainnet
65
+
66
+ # Use custom RPC
67
+ clawncher deploy --name "My Token" --symbol MYTKN --rpc https://my-rpc.com
68
+
69
+ # JSON output
70
+ clawncher deploy --name "My Token" --symbol MYTKN --json
71
+ ```
72
+
73
+ ### Info
74
+
75
+ Get token info directly from the blockchain:
76
+
77
+ ```bash
78
+ # Get token info
79
+ clawncher info 0xTokenAddress
80
+
81
+ # Specify network
82
+ clawncher info 0xTokenAddress --network mainnet
83
+
84
+ # JSON output
85
+ clawncher info 0xTokenAddress --json
86
+ ```
87
+
88
+ ### Fees
89
+
90
+ Check and manage trading fees:
91
+
92
+ ```bash
93
+ # Check claimable fees (on-chain)
94
+ clawncher fees check 0xWalletAddress -t 0xToken1,0xToken2
95
+
96
+ # Check available fees (via API)
97
+ clawncher fees available 0xWalletAddress
98
+
99
+ # Claim fees
100
+ clawncher fees claim 0xToken... --network mainnet --private-key 0x...
101
+
102
+ # Claim everything (fees + vault)
103
+ clawncher fees claim 0xToken... --vault
104
+
105
+ # Batch claim across multiple tokens
106
+ clawncher fees batch-claim 0xToken1 0xToken2 --fee-owner 0x...
107
+ ```
108
+
109
+ ### Portfolio
110
+
111
+ View token portfolio for a wallet:
112
+
113
+ ```bash
114
+ # Check specific tokens
115
+ clawncher portfolio 0xWallet --tokens 0xToken1,0xToken2
116
+
117
+ # Auto-discover deployed tokens
118
+ clawncher portfolio 0xWallet --discover
119
+ ```
120
+
121
+ ### Watch
122
+
123
+ Monitor live deployments:
124
+
125
+ ```bash
126
+ # Watch all new deployments
127
+ clawncher watch
128
+
129
+ # Filter by admin and set history depth
130
+ clawncher watch --admin 0xAdmin --history 1000
131
+ ```
132
+
133
+ ### Config
134
+
135
+ Manage CLI configuration:
136
+
137
+ ```bash
138
+ # Show current configuration
139
+ clawncher config --show
140
+
141
+ # Set default network
142
+ clawncher config --network mainnet
143
+
144
+ # Set private key
145
+ clawncher config --private-key 0x...
146
+
147
+ # Set custom RPC URLs
148
+ clawncher config --rpc-sepolia https://my-sepolia-rpc.com
149
+ clawncher config --rpc-mainnet https://my-mainnet-rpc.com
150
+
151
+ # Clear all configuration
152
+ clawncher config --clear
153
+ ```
154
+
155
+ Configuration is stored in `~/.clawncher/config.json`.
156
+
157
+ ### Addresses
158
+
159
+ Show contract addresses for a network:
160
+
161
+ ```bash
162
+ # Show mainnet addresses
163
+ clawncher addresses --network mainnet
164
+
165
+ # Show sepolia addresses
166
+ clawncher addresses --network sepolia
167
+
168
+ # JSON output
169
+ clawncher addresses --json
170
+ ```
171
+
172
+ ### API Commands
173
+
174
+ These commands fetch data from the Clawnch API:
175
+
176
+ ```bash
177
+ # List all tokens
178
+ clawncher tokens
179
+ clawncher tokens --symbol DOG --limit 10
180
+
181
+ # View launch history
182
+ clawncher launches
183
+ clawncher launches --agent "MyAgent" --source moltbook
184
+
185
+ # Get market statistics
186
+ clawncher stats
187
+ ```
188
+
189
+ ### Swap
190
+
191
+ Execute token swaps via 0x aggregation:
192
+
193
+ ```bash
194
+ # Get indicative price (read-only)
195
+ clawncher swap price --sell ETH --buy 0xToken... --amount 0.01
196
+
197
+ # Execute a swap
198
+ clawncher swap exec --sell ETH --buy 0xToken... --amount 0.01 \
199
+ --network mainnet --private-key 0x...
200
+
201
+ # Swap ERC20 for ETH
202
+ clawncher swap exec --sell 0xToken... --buy ETH --amount 1000000 \
203
+ --slippage 200 --network mainnet
204
+
205
+ # JSON output
206
+ clawncher swap price --sell ETH --buy 0xToken... --amount 0.01 --json
207
+ ```
208
+
209
+ Swaps are routed through the Clawnch API — no API key needed.
210
+
211
+ ### Liquidity
212
+
213
+ Manage Uniswap V3/V4 liquidity positions:
214
+
215
+ ```bash
216
+ # List V3 positions for a wallet
217
+ clawncher liquidity positions 0xWallet...
218
+
219
+ # Create new V3 position
220
+ clawncher liquidity mint \
221
+ --token0 0xTokenA --token1 0xTokenB \
222
+ --fee 3000 --tick-lower -887220 --tick-upper 887220 \
223
+ --amount0 1.0 --amount1 2000 \
224
+ --network mainnet --private-key 0x...
225
+
226
+ # Add liquidity to position
227
+ clawncher liquidity add --id 123456 \
228
+ --amount0 0.5 --amount1 1000 \
229
+ --network mainnet --private-key 0x...
230
+
231
+ # Remove 50% of liquidity
232
+ clawncher liquidity remove --id 123456 --percent 50 \
233
+ --network mainnet --private-key 0x...
234
+
235
+ # Remove 100% and burn NFT
236
+ clawncher liquidity remove --id 123456 --percent 100 --burn \
237
+ --network mainnet --private-key 0x...
238
+
239
+ # View unclaimed fees
240
+ clawncher liquidity fees --id 123456 --network mainnet
241
+
242
+ # Collect fees
243
+ clawncher liquidity fees --id 123456 --collect \
244
+ --network mainnet --private-key 0x...
245
+ ```
246
+
247
+ ### About
248
+
249
+ Show Clawncher information and links:
250
+
251
+ ```bash
252
+ clawncher about
253
+ ```
254
+
255
+ ## Deploy Options Reference
256
+
257
+ | Option | Description | Example |
258
+ |--------|-------------|---------|
259
+ | `--name` | Token name | `--name "My Token"` |
260
+ | `--symbol` | Token symbol | `--symbol MYTKN` |
261
+ | `--image` | Token image URL | `--image "https://..."` |
262
+ | `--description` | Token description | `--description "A great token"` |
263
+ | `--recipient` | Fee recipient address | `--recipient 0x1234...` |
264
+ | `--fee-preference` | Fee token: Clawnch (default), Paired, Both | `--fee-preference Paired` |
265
+ | `--vault-percent` | Vault allocation (1-90%) | `--vault-percent 10` |
266
+ | `--vault-lockup` | Vault lockup in days | `--vault-lockup 30` |
267
+ | `--vault-vesting` | Vault vesting in days | `--vault-vesting 60` |
268
+ | `--vault-recipient` | Vault recipient address | `--vault-recipient 0x...` |
269
+ | `--dev-buy` | ETH amount for instant dev buy | `--dev-buy 0.1` |
270
+ | `--dev-buy-recipient` | Dev buy recipient address | `--dev-buy-recipient 0x...` |
271
+ | `--no-vanity` | Disable vanity address mining | `--no-vanity` |
272
+ | `--dry-run` | Simulate deployment without sending transaction | `--dry-run` |
273
+ | `--network` | Network (sepolia/mainnet) | `--network mainnet` |
274
+ | `--rpc` | Custom RPC URL | `--rpc https://...` |
275
+ | `--json` | Output as JSON | `--json` |
276
+
277
+ ### Vanity Addresses
278
+
279
+ Vanity addresses are handled by Clanker's remote service. Use `--no-vanity` to disable.
280
+
281
+ ### Dev Buy
282
+
283
+ **Dev Buy** (`--dev-buy`): Instantly purchases tokens at launch using ETH. Tokens are sent directly to the recipient with no lockup.
284
+
285
+ ## Swap Options Reference
286
+
287
+ | Option | Description | Example |
288
+ |--------|-------------|---------|
289
+ | `--sell` | Token to sell (address or `ETH`) | `--sell ETH` |
290
+ | `--buy` | Token to buy (address or `ETH`) | `--buy 0x...` |
291
+ | `--amount` | Amount to sell (human-readable) | `--amount 0.01` |
292
+ | `--slippage` | Max slippage in bps (default: 100 = 1%) | `--slippage 200` |
293
+ | `--network` | Network (mainnet/sepolia) | `--network mainnet` |
294
+ | `--private-key` | Private key (for exec) | `--private-key 0x...` |
295
+ | `--json` | JSON output | `--json` |
296
+
297
+ ## Liquidity Options Reference
298
+
299
+ | Option | Description | Example |
300
+ |--------|-------------|---------|
301
+ | `--id` | Position NFT token ID | `--id 123456` |
302
+ | `--token0` | Token 0 address (for mint) | `--token0 0x...` |
303
+ | `--token1` | Token 1 address (for mint) | `--token1 0x...` |
304
+ | `--fee` | Fee tier (for mint) | `--fee 3000` |
305
+ | `--tick-lower` | Lower tick (for mint) | `--tick-lower -887220` |
306
+ | `--tick-upper` | Upper tick (for mint) | `--tick-upper 887220` |
307
+ | `--amount0` | Token 0 amount (human-readable) | `--amount0 1.0` |
308
+ | `--amount1` | Token 1 amount (human-readable) | `--amount1 2000` |
309
+ | `--percent` | % to remove (for remove) | `--percent 50` |
310
+ | `--burn` | Burn NFT after 100% remove | `--burn` |
311
+ | `--collect` | Collect fees (for fees cmd) | `--collect` |
312
+
313
+ ### Wallet Management
314
+
315
+ Securely create, import, and manage encrypted wallets:
316
+
317
+ ```bash
318
+ # Create a new wallet (generates mnemonic + encrypts with password)
319
+ clawncher wallet create my-wallet --set-active
320
+
321
+ # Import from private key
322
+ clawncher wallet import trading --private-key 0x...
323
+
324
+ # Import from mnemonic
325
+ clawncher wallet import recovery --mnemonic "word1 word2 ... word12"
326
+
327
+ # List all wallets
328
+ clawncher wallet list
329
+
330
+ # Set active wallet (used automatically by all commands)
331
+ clawncher wallet use my-wallet
332
+
333
+ # Check balances
334
+ clawncher wallet balance
335
+ clawncher wallet balance my-wallet --token 0xTokenAddress
336
+
337
+ # Send ETH
338
+ clawncher wallet send --to 0x... --amount 0.1
339
+
340
+ # Send ERC20 tokens
341
+ clawncher wallet send --to 0x... --amount 100 --token 0xTokenAddress
342
+
343
+ # Sign a message
344
+ clawncher wallet sign --message "Hello World"
345
+
346
+ # Export private key (requires password)
347
+ clawncher wallet export my-wallet --show-mnemonic
348
+
349
+ # Change wallet password
350
+ clawncher wallet password my-wallet
351
+
352
+ # Remove a wallet
353
+ clawncher wallet remove my-wallet
354
+ ```
355
+
356
+ #### Wallet Options
357
+
358
+ | Option | Description |
359
+ |--------|-------------|
360
+ | `--set-active` | Set as active wallet after create/import |
361
+ | `--private-key <key>` | Import from private key hex |
362
+ | `--mnemonic <phrase>` | Import from 12-word mnemonic |
363
+ | `--show-mnemonic` | Show mnemonic on export |
364
+ | `--force` | Skip confirmation on remove |
365
+ | `--token <address>` | ERC20 token for balance/send |
366
+ | `--to <address>` | Recipient for send |
367
+ | `--amount <value>` | Amount for send |
368
+ | `--message <text>` | Message for sign |
369
+
370
+ #### Security
371
+
372
+ - Private keys encrypted at rest with AES-256-GCM
373
+ - scrypt KDF (N=2^18, r=8, p=1) for password-to-key derivation
374
+ - Keystore files stored in `~/.clawncher/wallets/` with 0o600 permissions
375
+ - Keys only decrypted on-demand, never cached in memory
376
+ - Mnemonic phrases encrypted alongside private key
377
+
378
+ ## Configuration
379
+
380
+ ### Private Key
381
+
382
+ You can provide your private key in four ways (in order of precedence):
383
+
384
+ 1. **Command line flag:** `--private-key 0x...`
385
+ 2. **Environment variable:** `CLAWNCHER_PRIVATE_KEY=0x...`
386
+ 3. **Config file:** `clawncher config --private-key 0x...`
387
+ 4. **Active wallet:** `clawncher wallet use my-wallet` (prompts for password)
388
+
389
+ ### Network
390
+
391
+ Default network is `sepolia`. Change with:
392
+
393
+ ```bash
394
+ clawncher config --network mainnet
395
+ ```
396
+
397
+ Or per-command:
398
+
399
+ ```bash
400
+ clawncher deploy --name "My Token" --symbol MYTKN --network mainnet
401
+ ```
402
+
403
+ ### RPC URLs
404
+
405
+ Default RPCs are used if not configured:
406
+ - Sepolia: `https://sepolia.base.org`
407
+ - Mainnet: `https://mainnet.base.org`
408
+
409
+ Configure custom RPCs:
410
+
411
+ ```bash
412
+ clawncher config --rpc-sepolia https://my-rpc.com
413
+ clawncher config --rpc-mainnet https://my-rpc.com
414
+ ```
415
+
416
+ Or per-command:
417
+
418
+ ```bash
419
+ clawncher deploy --name "My Token" --symbol MYTKN --rpc https://my-rpc.com
420
+ ```
421
+
422
+ ## Verified Agent Launches
423
+
424
+ Register as a verified agent and deploy tokens via the Clawnch API:
425
+
426
+ ```bash
427
+ # One-time: register agent and receive API key
428
+ clawncher agent register --name "MyAgent" --description "AI trading agent"
429
+
430
+ # One-time: approve $CLAWNCH token spend
431
+ clawncher agent approve --api-key YOUR_API_KEY
432
+
433
+ # Check agent status
434
+ clawncher agent status --api-key YOUR_API_KEY
435
+
436
+ # Deploy a verified token
437
+ clawncher deploy-verified --api-key YOUR_API_KEY --name "My Token" --symbol MYTKN
438
+ ```
439
+
440
+ ### Agent Options
441
+
442
+ | Option | Description |
443
+ |--------|-------------|
444
+ | `--name` | Agent display name |
445
+ | `--description` | Short agent description |
446
+ | `--api-key` | API key from registration |
447
+ | `--api-url` | Clawnch API URL (default: https://clawn.ch) |
448
+ | `--network` | Network: mainnet or sepolia |
449
+ | `--private-key` | Override wallet private key |
450
+ | `--json` | JSON output |
451
+
452
+ ### Deploy-Verified Options
453
+
454
+ | Option | Description |
455
+ |--------|-------------|
456
+ | `--api-key` | API key from registration |
457
+ | `--name` | Token name |
458
+ | `--symbol` | Token symbol |
459
+ | `--image` | Token image URL |
460
+ | `--description` | Token description |
461
+ | `--recipient` | Fee recipient address |
462
+ | `--fee-preference` | Fee type: Clawnch, Paired, or Both |
463
+ | `--vault-percentage` | Vault percentage (0-100) |
464
+ | `--vault-lockup` | Vault lockup duration (seconds) |
465
+ | `--vault-vesting` | Vault vesting duration (seconds) |
466
+ | `--dev-buy-eth` | Dev buy ETH amount |
467
+ | `--no-vanity` | Disable vanity address |
468
+ | `--json` | JSON output |
469
+
470
+ ## Environment Variables
471
+
472
+ - `CLAWNCHER_PRIVATE_KEY` - Private key for deployments
473
+ - `CLAWNCHER_API_KEY` - API key for verified agent launches
474
+ - `CLAWNCHER_API_URL` - Override the default API URL (default: https://clawn.ch)
475
+
476
+ ## JSON Output
477
+
478
+ All commands support `--json` flag for machine-readable output:
479
+
480
+ ```bash
481
+ clawncher deploy --name "My Token" --symbol TEST --json | jq '.tokenAddress'
482
+ clawncher info 0x... --json | jq '.symbol'
483
+ ```
484
+
485
+ ## Related
486
+
487
+ - [Clawncher Website](https://clawn.ch/er)
488
+ - [Agent Skill](https://clawn.ch/er/skill)
489
+ - [Documentation](https://clawn.ch/er/docs)
490
+ - [@clawnch/clawncher-sdk](https://npmjs.com/package/@clawnch/clawncher-sdk) - TypeScript SDK
491
+
492
+ ## License
493
+
494
+ MIT
package/dist/cli.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Clawncher CLI
4
+ *
5
+ * Command-line interface for deploying tokens on Base with Uniswap V4 pools.
6
+ * Uses ClawnchDeployer from SDK (Clanker-backed infrastructure).
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}