@bagsfm/bags-cli 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 +91 -0
- package/dist/index.js +1371 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @bagsfm/bags-cli
|
|
2
|
+
|
|
3
|
+
CLI for Bags authentication, trading, launches, fees, and configuration.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @bagsfm/bags-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run without global install:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @bagsfm/bags-cli --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After installation, use:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bags --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
Run the setup wizard to configure RPC, import your wallet, and authenticate in one step:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bags setup
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or pass flags for non-interactive use:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bags setup --rpc-url https://my-rpc.example.com --private-key <base58_or_int_array>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The wizard accepts private keys as **base58** or **int array** format (auto-detected).
|
|
38
|
+
|
|
39
|
+
Once set up, verify everything is working:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bags auth status
|
|
43
|
+
bags wallet balance
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Command Groups
|
|
47
|
+
|
|
48
|
+
- `bags setup` - first-run wizard (RPC, wallet import, auth)
|
|
49
|
+
- `bags auth` - agent wallet signature authentication and credential storage
|
|
50
|
+
- `bags wallet` - local keypair management
|
|
51
|
+
- `bags fees` - list and claim fees, plus fee analytics endpoints
|
|
52
|
+
- `bags trade` - get quotes and execute swaps
|
|
53
|
+
- `bags launch` - full token launch workflow
|
|
54
|
+
- `bags config` - fee share config creation/update/admin transfer
|
|
55
|
+
- `bags partner` - partner config and claim flows
|
|
56
|
+
- `bags pool` - pool lookup endpoints
|
|
57
|
+
- `bags dexscreener` - check/create/pay Dexscreener orders
|
|
58
|
+
- `bags incorporation` - incorporation payment and project workflows
|
|
59
|
+
- `bags settings` - CLI defaults (`rpcUrl`, commitment, output mode)
|
|
60
|
+
|
|
61
|
+
## Interactive + Flags
|
|
62
|
+
|
|
63
|
+
Commands are interactive by default and every prompt can be overridden with flags.
|
|
64
|
+
For example:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bags trade quote \
|
|
68
|
+
--input-mint So11111111111111111111111111111111111111112 \
|
|
69
|
+
--output-mint <TOKEN_MINT> \
|
|
70
|
+
--amount 1000000 \
|
|
71
|
+
--slippage-mode auto
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Configuration Files
|
|
75
|
+
|
|
76
|
+
Stored under `~/.config/bags/`:
|
|
77
|
+
|
|
78
|
+
- `keypair.json`
|
|
79
|
+
- `credentials.json`
|
|
80
|
+
- `config.json`
|
|
81
|
+
|
|
82
|
+
The CLI writes these files with restrictive permissions (`0600`).
|
|
83
|
+
|
|
84
|
+
## Build From Source
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install
|
|
88
|
+
npm run typecheck
|
|
89
|
+
npm run build
|
|
90
|
+
node dist/index.js --help
|
|
91
|
+
```
|