@hedge-layer/cli 1.7.0 → 2.0.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 +56 -5
- package/dist/index.mjs +374 -284
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,33 @@ npm install -g @hedge-layer/cli
|
|
|
16
16
|
|
|
17
17
|
Requires Node.js 22 or later.
|
|
18
18
|
|
|
19
|
+
### Install troubleshooting
|
|
20
|
+
|
|
21
|
+
- **`EACCES` / "operation was rejected by your operating system"** on `npm install -g`:
|
|
22
|
+
your npm prefix points at a root-owned directory (e.g. `/usr/lib/node_modules`) and you
|
|
23
|
+
don't have `sudo`. Install into a user-writable prefix instead:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
mkdir -p "$HOME/.npm-global"
|
|
27
|
+
npm config set prefix "$HOME/.npm-global"
|
|
28
|
+
export PATH="$HOME/.npm-global/bin:$PATH" # add to your shell rc to persist
|
|
29
|
+
npm install -g @hedge-layer/cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- **`nvm` warns `npmrc ... globalconfig and/or prefix setting ... incompatible with nvm`:**
|
|
33
|
+
this is harmless shell-init noise from `nvm` (not from `hl`) that appears after setting a
|
|
34
|
+
custom npm prefix as above — the CLI still works. To avoid it entirely under `nvm`, install
|
|
35
|
+
without a custom prefix (nvm's per-version `bin/` is already user-writable):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm config delete prefix
|
|
39
|
+
npm config delete globalconfig
|
|
40
|
+
nvm use --delete-prefix "$(node -v)" --silent
|
|
41
|
+
npm install -g @hedge-layer/cli
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Alternatively, skip the global install and run on demand with `npx @hedge-layer/cli <command>`.
|
|
45
|
+
|
|
19
46
|
## Quick Start
|
|
20
47
|
|
|
21
48
|
```bash
|
|
@@ -29,13 +56,16 @@ hl brief "US China trade war tariffs"
|
|
|
29
56
|
# 4. Or start an interactive research session
|
|
30
57
|
hl research
|
|
31
58
|
|
|
32
|
-
# 5. Run the
|
|
33
|
-
hl
|
|
34
|
-
hl lp
|
|
35
|
-
hl
|
|
59
|
+
# 5. Run the manual liquidity-provider flow
|
|
60
|
+
hl --json feed liquidity-provider --limit 15 | jq '{ markets: .markets }' > markets.json
|
|
61
|
+
hl lp allocator --markets markets.json
|
|
62
|
+
hl-trader buy
|
|
36
63
|
|
|
37
64
|
# 6. Check linked wallet funds
|
|
38
65
|
hl wallet balances
|
|
66
|
+
|
|
67
|
+
# 7. Analyze a market probability edge
|
|
68
|
+
hl signal analyze "https://polymarket.com/event/example-market"
|
|
39
69
|
```
|
|
40
70
|
|
|
41
71
|
## Commands
|
|
@@ -47,11 +77,24 @@ Liquidity-provider workflows are available under `hl lp`:
|
|
|
47
77
|
|
|
48
78
|
```bash
|
|
49
79
|
hl lp scan "liquidity opportunities" # persist candidate evidence
|
|
80
|
+
hl lp allocator --markets markets.json # run allocator agent on an explicit list
|
|
50
81
|
hl lp recommend --scan-id <scan-id> # recommend allocate/reduce/exit actions
|
|
51
82
|
hl lp evaluate # summarize PnL lessons
|
|
52
|
-
hl lp run # run the dry-run chain
|
|
53
83
|
```
|
|
54
84
|
|
|
85
|
+
The lightweight manual loop is:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
hl --json feed lp-opportunity --limit 15 > markets.json
|
|
89
|
+
hl lp allocator --markets markets.json
|
|
90
|
+
hl-trader buy ...
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`hl lp allocator` submits the candidate market list through the web API to the
|
|
94
|
+
allocator agent. Allocator output shows target capital, quote regime, failed
|
|
95
|
+
safety checks, and split spread/reward economics. Trade execution stays outside
|
|
96
|
+
the `hl` allocator command.
|
|
97
|
+
|
|
55
98
|
Wallet commands are available under `hl wallet`:
|
|
56
99
|
|
|
57
100
|
```bash
|
|
@@ -72,6 +115,14 @@ Keep a small `POL` balance in the owner wallet for Polygon gas; without native
|
|
|
72
115
|
`POL`, the browser-signed transfer can fail even when the deposit wallet has
|
|
73
116
|
enough `pUSD`.
|
|
74
117
|
|
|
118
|
+
Signal-agent analysis is available under `hl signal`:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
hl signal analyze "https://polymarket.com/event/example-market"
|
|
122
|
+
hl signal analyze "https://polymarket.com/event/example-market" --context "Recent search notes"
|
|
123
|
+
hl --json signal analyze "https://polymarket.com/event/example-market" | jq '.result.analysis'
|
|
124
|
+
```
|
|
125
|
+
|
|
75
126
|
## Changelog
|
|
76
127
|
|
|
77
128
|
See [CHANGELOG.md](CHANGELOG.md) for release history.
|