@baseline-markets/cli 0.2.2 → 0.3.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 +86 -2
- package/dist/index.js +1059 -41
- package/package.json +2 -2
- package/skills/aeon-baseline/SKILL.md +154 -0
- package/skills/bankr-baseline/SKILL.md +260 -0
- package/skills/base-mcp-baseline/SKILL.md +22 -292
- package/skills/base-mcp-baseline/plugins/baseline.md +240 -0
- package/skills/launch/SKILL.md +106 -0
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Baseline CLI
|
|
2
2
|
|
|
3
|
-
CLI for
|
|
3
|
+
CLI for Baseline token launches, swaps, and positions.
|
|
4
|
+
|
|
5
|
+
See [UX.md](./UX.md) for the target public command shape.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -8,6 +10,8 @@ Run without installing:
|
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
12
|
npx @baseline-markets/cli launch --help
|
|
13
|
+
npx @baseline-markets/cli swap --help
|
|
14
|
+
npx @baseline-markets/cli position --help
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
Or install globally:
|
|
@@ -60,6 +64,86 @@ BASELINE_PRIVATE_KEY=0x...
|
|
|
60
64
|
The deployer account is derived from the private key when `--execute` is used
|
|
61
65
|
and `--account` is omitted.
|
|
62
66
|
|
|
67
|
+
## Swaps
|
|
68
|
+
|
|
69
|
+
Quote a swap without sending a transaction:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
baseline quote swap \
|
|
73
|
+
--chain-id 84532 \
|
|
74
|
+
--token 0x... \
|
|
75
|
+
--buy \
|
|
76
|
+
--exact-out \
|
|
77
|
+
--amount 100 \
|
|
78
|
+
--format json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Execute a swap with quote-derived slippage limits and input-token approval:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
baseline swap \
|
|
85
|
+
--chain-id 84532 \
|
|
86
|
+
--token 0x... \
|
|
87
|
+
--buy \
|
|
88
|
+
--exact-out \
|
|
89
|
+
--amount 100 \
|
|
90
|
+
--slippage-bps 100 \
|
|
91
|
+
--private-key 0x...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Simulate the exact swap calls without sending transactions:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
baseline swap \
|
|
98
|
+
--chain-id 84532 \
|
|
99
|
+
--token 0x... \
|
|
100
|
+
--buy \
|
|
101
|
+
--amount 100 \
|
|
102
|
+
--simulate \
|
|
103
|
+
--private-key 0x...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`--buy --exact-in` spends an exact reserve amount for at least the quoted
|
|
107
|
+
BTokens. `--buy --exact-out` buys an exact BToken amount with a maximum reserve
|
|
108
|
+
input. Sell commands mirror this with BToken input or reserve output.
|
|
109
|
+
`--exact-in` is the default when neither exact flag is provided.
|
|
110
|
+
|
|
111
|
+
## Positions
|
|
112
|
+
|
|
113
|
+
Inspect a position:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
baseline position \
|
|
117
|
+
--chain-id 84532 \
|
|
118
|
+
--token 0x... \
|
|
119
|
+
--user 0x... \
|
|
120
|
+
--format json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The position output includes staking balances, earned rewards, credit
|
|
124
|
+
collateral, debt, and current max borrow. It prints a human-readable table by
|
|
125
|
+
default; pass `--format json` for structured output.
|
|
126
|
+
|
|
127
|
+
Stake, unstake, borrow, repay, and claim:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
baseline position stake --chain-id 84532 --token 0x... --amount 25 --private-key 0x...
|
|
131
|
+
baseline position unstake --chain-id 84532 --token 0x... --amount 10 --private-key 0x...
|
|
132
|
+
baseline position borrow --chain-id 84532 --token 0x... --amount 100 --private-key 0x...
|
|
133
|
+
baseline position repay --chain-id 84532 --token 0x... --amount 50 --private-key 0x...
|
|
134
|
+
baseline position claim --chain-id 84532 --token 0x... --private-key 0x...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`position stake` approves the BToken before depositing.
|
|
138
|
+
`position repay` approves the reserve before repaying unless `--use-native` is
|
|
139
|
+
set.
|
|
140
|
+
`position borrow --output-native` receives wrapped-native reserves as native ETH
|
|
141
|
+
when the reserve supports it.
|
|
142
|
+
`position claim --as-native` claims wrapped-native reserve rewards as native ETH
|
|
143
|
+
when the reserve supports it.
|
|
144
|
+
Pass `--simulate` to any position action to simulate the exact calls without
|
|
145
|
+
sending transactions.
|
|
146
|
+
|
|
63
147
|
## Launch Modes
|
|
64
148
|
|
|
65
149
|
`zrp` is the default zero-reserve launch:
|
|
@@ -80,7 +164,7 @@ The pool BToken amount is derived from `--total-supply`.
|
|
|
80
164
|
|
|
81
165
|
## Environment
|
|
82
166
|
|
|
83
|
-
- `BASELINE_PRIVATE_KEY`: signer used by
|
|
167
|
+
- `BASELINE_PRIVATE_KEY`: signer used by launch execution, swaps, and positions
|
|
84
168
|
- `RPC_URL`: Base Sepolia fork source for integration tests
|
|
85
169
|
|
|
86
170
|
## Tests
|