@vike-io/cli 0.7.2 → 0.8.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/CHANGELOG.md +18 -0
- package/SKILL.md +355 -0
- package/package.json +2 -1
- package/skills/vike-hl-position-match/SKILL.md +86 -0
- package/skills/vike-router/SKILL.md +1 -0
- package/src/commands/install.js +125 -0
- package/src/commands/perp.js +24 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes are documented here. Entries follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
4
4
|
|
|
5
|
+
## 0.8.0 — HL share-card reverse-lookup + multi-IDE installer + SKILL.md hardening
|
|
6
|
+
|
|
7
|
+
- **`vike perp find-position`** (new command, alias for the new `hl_position_match` MCP tool). Reverse-lookup a Hyperliquid open position from share-card details: paste `coin + side + leverage + entry` and get the wallet(s) holding a matching open position back. Walks widening entry tolerance bands (tight 0.05% → loose 0.5% → fallback 1.0%) with leverage tolerance ±0.5; tie-break by closest mark price. Returns `tolerance_used` so callers can flag low-confidence matches. Backed by `position_snapshots_latest` — near-real-time, no new schema.
|
|
8
|
+
- **`vike install`** (new command). One-shot multi-IDE skill drop: `--claude` writes `~/.claude/skills/vike/SKILL.md`; `--cursor` / `--copilot` / `--agents` update marker-fenced blocks in `.cursorrules` / `.github/copilot-instructions.md` / `AGENTS.md` (idempotent — re-running replaces the block, never clobbers surrounding user content). `--all` writes every target at once.
|
|
9
|
+
- **Root `SKILL.md` hardening**: added a "Critical Rules" block (8 hard rules agents most often violate), per-service "Historical Data Availability" tables (transfers per chain, prices per venue, HL perps, CEX perps, Polymarket — so agents stop over-promising data we don't have), and UTM-tagged signup links for attribution.
|
|
10
|
+
- New skill playbook: `vike-hl-position-match`. Total: 40 skills (was 39), 35 MCP tools (was 34).
|
|
11
|
+
|
|
12
|
+
## 0.7.3 — agent-discoverable SKILL.md + auto GH releases
|
|
13
|
+
|
|
14
|
+
- **Root-level `SKILL.md`** — single agent-discoverable entry point covering all 34 MCP tools, auth flow, intent → tool routing table, and per-service tool reference. Ships in the npm package so installing `@vike-io/cli` also installs the skill. Existing per-tool playbooks under `skills/` are unchanged and cross-linked from the root.
|
|
15
|
+
- **GH releases now created automatically** on `v*` tag push (release.yml). Previously every tag from v0.5.0 onward was published to npm but never created a corresponding github.com/vike-io/vike-cli/releases entry.
|
|
16
|
+
|
|
17
|
+
## 0.7.2 — telemetry wired
|
|
18
|
+
|
|
19
|
+
- **Telemetry skeleton turned on**: Commander `preAction`/`postAction` hooks emit `command_succeeded` (with command name, kebab-cased flag names, duration_ms, cli_version); `parseAsync().catch` emits `command_failed`. Default endpoint is `https://vike.io/api/cli-telemetry`. Honors `DO_NOT_TRACK=1` / `VIKE_NO_TELEMETRY=1` / `CI` / `NODE_ENV=test`.
|
|
20
|
+
- **Lint cleanup**: dropped 4 stale unused-vars in `src/telemetry.js` and `src/update-check.js` (the cause of red CI on 0.7.0 + 0.7.1).
|
|
21
|
+
- **Dependency bumps** (via Dependabot, all green): `commander ^14`, `eslint ^10`, `vitest ^4`, `actions/checkout v6`, `actions/setup-node v6`.
|
|
22
|
+
|
|
5
23
|
## 0.7.1 — eval harness v2 + help tweaks + SQL fix
|
|
6
24
|
|
|
7
25
|
- **Eval schema upgraded** (`evals/questions.yaml`): multi-command list, per-skill tag, multi-step flag, word-boundary forbidden matching. Per-skill scoring breakdown + single-vs-multi-step split in the runner output.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vike
|
|
3
|
+
description: "Use this skill whenever the user asks any question about on-chain crypto data, wallet behavior, token transfers, smart money, CEX perpetual futures, Hyperliquid perps, Deribit options, prediction markets (Polymarket), DeFi positions, ENS, or institutional fund holdings — and live data from vike.io would improve the answer. This includes questions like \"who is buying X token\", \"what is wallet 0x... doing\", \"top wallets by PnL\", \"funding rate spread across Binance/Bybit/OKX\", \"largest HL perp traders this week\", \"Deribit BTC put-call ratio\", \"who is winning on Polymarket\", \"which funds hold X token\", \"resolve this ENS\", \"label this wallet\", \"trace this transfer\", \"top tokens by smart-money inflow\". Always use this skill proactively when the user's query could benefit from real-time or historical on-chain data — don't wait for the user to explicitly ask to \"use vike\". If the user asks a general on-chain question that requires synthesis across wallets/tokens/venues, route to vike first."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# vike — Multi-chain On-chain Analytics
|
|
7
|
+
|
|
8
|
+
Answer on-chain questions using the vike.io platform: 11 chains (ETH, BSC, Base, Arbitrum, HyperEVM, BTC, Solana, Tron, XMR, ZEC, Dash), full Hyperliquid perps coverage, CEX perps across 5 venues, Deribit options, Polymarket prediction markets, multi-source wallet labels, and a 34-tool MCP server.
|
|
9
|
+
|
|
10
|
+
**MCP endpoint for all calls:** `https://vike.io/mcp` (JSON-RPC 2.0)
|
|
11
|
+
**Or use the CLI:** `npm install -g @vike-io/cli` → `vike <command>`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Critical Rules
|
|
16
|
+
|
|
17
|
+
Hard rules — agents that violate these produce wrong answers. Read once, apply always.
|
|
18
|
+
|
|
19
|
+
1. **Addresses are always full 0x-hex (42 chars).** Never truncate when querying. Never display truncated when the user asks for the address — they'll copy-paste it.
|
|
20
|
+
2. **Symbols are case-insensitive in queries, but display as the user typed.** `btc` and `BTC` both resolve; echo back what they wrote.
|
|
21
|
+
3. **Time windows are UTC, day-boundaries cut at 00:00 UTC.** "Today" = since 00:00 UTC today, not local-time today.
|
|
22
|
+
4. **Default page size is 50, max 500.** Don't request `--limit 10000` to "get everything" — paginate or use a screener tool instead.
|
|
23
|
+
5. **Refresh cadence varies by tool.** Wallet PnL, HL positions: ≤2 min. Transfer-derived metrics: 5 min. Token price history: 1 min. Always assume <5 min unless a tool says otherwise.
|
|
24
|
+
6. **USD amounts are floats in dollars.** `--min-usd 10000` = ten thousand dollars, not micro-USD.
|
|
25
|
+
7. **`--json` flag is always available** on CLI commands and gives stable machine-readable output. Default (human) format may change; `--json` will not.
|
|
26
|
+
8. **Resolve a token before asking transfer/holder questions.** `token_search` → take the canonical address → pass to `token_transfers` / `token_holders`. Symbol-only queries lose precision on tickers that collide across chains (e.g. FUN, BEAM, USDC).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 1: Confirm Authentication
|
|
31
|
+
|
|
32
|
+
Follow this decision tree **before every session**. Do not skip to Step 2 until auth is confirmed.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
1. Is the `vike` CLI installed? (`vike --version`)
|
|
36
|
+
├── YES → continue
|
|
37
|
+
└── NO → `npm install -g @vike-io/cli`
|
|
38
|
+
|
|
39
|
+
2. Is $VIKE_API_KEY set OR has the user run `vike init` / `vike login` already?
|
|
40
|
+
├── YES → run `vike doctor` to verify the key + endpoint reachability. Proceed.
|
|
41
|
+
└── NO → prompt the user (see Setup below).
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Setup
|
|
45
|
+
|
|
46
|
+
If the user has no API key yet, tell them:
|
|
47
|
+
|
|
48
|
+
> **To use vike, you'll need a free API key:**
|
|
49
|
+
>
|
|
50
|
+
> 1. Visit https://vike.io/api/keys?utm_source=skill&utm_medium=ai&utm_campaign=cli_skill, sign in, and copy a key (starts with `vk_`).
|
|
51
|
+
> 2. Save it: `vike login --api-key vk_...` (or `export VIKE_API_KEY=vk_...`).
|
|
52
|
+
> 3. Verify: `vike doctor`.
|
|
53
|
+
>
|
|
54
|
+
> Per-key default cap: 2000 requests/hour. Most calls return in <500ms.
|
|
55
|
+
|
|
56
|
+
If using the MCP server directly (without the CLI), send the key as a header:
|
|
57
|
+
```
|
|
58
|
+
X-API-KEY: vk_...
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 2: Route to the Right Service
|
|
64
|
+
|
|
65
|
+
| User is asking about... | Service | CLI / Tool |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| Token by symbol/name → address, market cap, holders | **Tokens** | `vike token search` / `token_search` |
|
|
68
|
+
| Token holders, who bought/sold, top inflows | **Tokens** | `vike token transfers` / `token_transfers` |
|
|
69
|
+
| Token chart / OHLCV / historical price | **Tokens** | `vike token chart` / `token_chart` |
|
|
70
|
+
| Filter/screen tokens by smart-money flow, liquidity, age | **Tokens** | `vike token screener` / `token_screener` |
|
|
71
|
+
| Single wallet's PnL, holdings, recent activity | **Wallets** | `vike wallet summary` / `wallet_summary` |
|
|
72
|
+
| Top wallets by PnL on a token / leaderboard | **Wallets** | `vike wallet discover` / `wallet_discover` |
|
|
73
|
+
| Recent wallet transactions with USD values | **Wallets** | `vike wallet transactions` / `wallet_transactions` |
|
|
74
|
+
| Compare 2+ wallets side by side | **Wallets** | `vike wallet compare` / `wallet_compare` |
|
|
75
|
+
| Trace funds N hops from a starting wallet | **Wallets** | `vike wallet trace` / `wallet_trace` |
|
|
76
|
+
| Find counterparties (who sends to / receives from) | **Wallets** | `vike wallet counterparties` / `wallet_counterparties` |
|
|
77
|
+
| Wallet PnL history (timeseries) | **Wallets** | `vike wallet pnl-history` / `wallet_pnl_history` |
|
|
78
|
+
| Token balances for a wallet | **Wallets** | `vike wallet balances` / `wallet_token_balances` |
|
|
79
|
+
| ENS name → address or address → ENS | **Wallets** | `vike wallet ens` / `wallet_ens` |
|
|
80
|
+
| Bulk-label many wallets at once | **Wallets** | `vike wallet batch` / `wallet_batch_labels` |
|
|
81
|
+
| Why is this wallet labeled X? (provenance) | **Labels** | `vike labels provenance` / `wallet_label_provenance` |
|
|
82
|
+
| Which funds hold this token / what funds hold | **Funds** | `vike funds holdings` / `fund_holdings` |
|
|
83
|
+
| Funding rates across CEX perps (Binance/Bybit/OKX/Aster/HL) | **CEX Perps** | `vike perp funding` / `perp_funding` |
|
|
84
|
+
| Price spreads of same symbol across CEX perp venues | **CEX Perps** | `vike perp spreads` / `perp_spreads` |
|
|
85
|
+
| Top Hyperliquid perp traders by PnL / volume | **HL Perps** | `vike perp top-traders` / `hl_perp_top_traders` |
|
|
86
|
+
| Reverse-lookup an HL share card → which wallet holds it | **HL Perps** | `vike perp find-position` / `hl_position_match` |
|
|
87
|
+
| Deribit options flow, put/call ratios, IV | **Options** | `vike options flow` / `options_flow` |
|
|
88
|
+
| Active Polymarket markets, volume, odds | **Polymarket** | `vike polymarket markets` / `polymarket_markets` |
|
|
89
|
+
| Single Polymarket market detail | **Polymarket** | `vike polymarket detail` / `polymarket_market_detail` |
|
|
90
|
+
| Polymarket trader profile / positions | **Polymarket** | `vike polymarket wallet` / `polymarket_wallet` |
|
|
91
|
+
| Best-performing Polymarket traders | **Polymarket** | `vike polymarket smart-money` / `polymarket_smart_money` |
|
|
92
|
+
| DeFi positions for a wallet (Aave/Uniswap/Lido/…) | **DeFi** | `vike defi positions` / `defi_positions` |
|
|
93
|
+
| Create / list / edit price-or-flow alerts | **Alerts** | `vike alerts ...` / `alerts_*` |
|
|
94
|
+
| General web search or fetch + AI summarize a URL | **Web** | `vike web search` / `web_search`, `vike web fetch` / `web_fetch` |
|
|
95
|
+
|
|
96
|
+
**When in doubt, start with `vike token search` or `vike wallet summary`** — both are cheap, return instantly, and disambiguate what the user actually meant.
|
|
97
|
+
|
|
98
|
+
### Example query routing
|
|
99
|
+
```
|
|
100
|
+
"Top 20 wallets buying PEPE in the last 24h" → wallet_discover (token=PEPE, sort=net_inflow_usd)
|
|
101
|
+
"What is 0xd8dA6BF...AbA96 holding?" → wallet_summary + defi_positions
|
|
102
|
+
"Funding rate for BTC across all perp venues" → perp_funding (symbol=BTC)
|
|
103
|
+
"Cheapest venue to short ETH right now?" → perp_spreads (symbol=ETH)
|
|
104
|
+
"Biggest HL perp PnL last week" → hl_perp_top_traders (window=7d, sort=pnl_usd)
|
|
105
|
+
"Largest BTC put writes on Deribit today" → options_flow (asset=BTC, side=put)
|
|
106
|
+
"Show me the largest Polymarket bets on US election" → polymarket_market_detail + polymarket_smart_money
|
|
107
|
+
"Which funds bought Lido tokens this quarter?" → fund_holdings (token=LDO, window=90d)
|
|
108
|
+
"Why is 0x28C6... labeled 'Binance hot wallet'?" → wallet_label_provenance (addr=0x28C6...)
|
|
109
|
+
"Resolve vitalik.eth" → wallet_ens (name=vitalik.eth)
|
|
110
|
+
"Alert me when whale 0xABCD sells over $1M of WBTC" → alerts_create
|
|
111
|
+
"Trace funds from 0xHACKER 3 hops out" → wallet_trace (start=0xHACKER, depth=3)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Step 3: Call the tool
|
|
117
|
+
|
|
118
|
+
### Two equivalent interfaces
|
|
119
|
+
|
|
120
|
+
**A) Via CLI (recommended for shell-bound agents).** All commands accept `--json` for machine-readable output:
|
|
121
|
+
```bash
|
|
122
|
+
vike wallet summary 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --json
|
|
123
|
+
vike perp funding --symbol BTC --window 24h --json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**B) Via MCP JSON-RPC (recommended when an MCP connector is available).** All 34 tools live at `https://vike.io/mcp`:
|
|
127
|
+
```http
|
|
128
|
+
POST https://vike.io/mcp
|
|
129
|
+
X-API-KEY: vk_...
|
|
130
|
+
Content-Type: application/json
|
|
131
|
+
|
|
132
|
+
{
|
|
133
|
+
"jsonrpc": "2.0",
|
|
134
|
+
"id": 1,
|
|
135
|
+
"method": "tools/call",
|
|
136
|
+
"params": {
|
|
137
|
+
"name": "wallet_summary",
|
|
138
|
+
"arguments": {"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum"}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Run `vike schema --pretty` (or call MCP `tools/list`) to see the live arg shape for every tool. Always read the schema before constructing arguments — defaults and enum values change.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Per-service tool reference
|
|
148
|
+
|
|
149
|
+
For deeper per-tool workflows (multi-step recipes, common pitfalls, output schemas), see the `skills/` directory in this repo. The router lives at [`skills/vike-router/SKILL.md`](skills/vike-router/SKILL.md).
|
|
150
|
+
|
|
151
|
+
### Tokens
|
|
152
|
+
Address resolution, transfers, OHLCV, holder cohorts, screening.
|
|
153
|
+
|
|
154
|
+
| Tool | Description | Skill |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `token_search` | Symbol/name → contract address + chain + market cap | [vike-token-search](skills/vike-token-search/SKILL.md) |
|
|
157
|
+
| `token_transfers` | Recent transfers with USD values; supports `--min-usd`, time windows | [vike-token-transfers](skills/vike-token-transfers/SKILL.md) |
|
|
158
|
+
| `token_chart` | OHLCV from data_history (binance/bybit/okx/gate aggregate) | [vike-token-research](skills/vike-token-research/SKILL.md) |
|
|
159
|
+
| `token_holders` | Top holders + concentration metrics | [vike-token-holders](skills/vike-token-holders/SKILL.md) |
|
|
160
|
+
| `token_screener` | Filter tokens by smart-money inflow, age, liquidity, sector | [vike-token-screener](skills/vike-token-screener/SKILL.md) |
|
|
161
|
+
|
|
162
|
+
**Key chains:** `ethereum`, `bsc`, `base`, `arbitrum`, `hyperevm` (EVM); `bitcoin`, `solana`, `tron`, `xmr`, `zec`, `dash` (non-EVM, limited tool support).
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Wallets
|
|
167
|
+
Profile, PnL, transactions, comparison, tracing, counterparty graph.
|
|
168
|
+
|
|
169
|
+
| Tool | Description | Skill |
|
|
170
|
+
|---|---|---|
|
|
171
|
+
| `wallet_summary` | One-call profile: PnL, top holdings, recent activity, labels | [vike-wallet-summary](skills/vike-wallet-summary/SKILL.md) |
|
|
172
|
+
| `wallet_discover` | Leaderboard of top wallets by PnL/inflow on a token | [vike-wallet-discover](skills/vike-wallet-discover/SKILL.md), [vike-smart-money-discovery](skills/vike-smart-money-discovery/SKILL.md) |
|
|
173
|
+
| `wallet_transactions` | Raw recent transactions (tx_hash, ts, from, to, token, usd) | [vike-wallet-transactions](skills/vike-wallet-transactions/SKILL.md) |
|
|
174
|
+
| `wallet_compare` | Side-by-side metrics for 2+ wallets | [vike-wallet-compare](skills/vike-wallet-compare/SKILL.md) |
|
|
175
|
+
| `wallet_trace` | BFS funds tracing N hops from a starting wallet | [vike-wallet-trace](skills/vike-wallet-trace/SKILL.md) |
|
|
176
|
+
| `wallet_counterparties` | Top counterparties (who they send to / receive from) | [vike-wallet-counterparties](skills/vike-wallet-counterparties/SKILL.md) |
|
|
177
|
+
| `wallet_pnl_history` | Daily PnL timeseries over `--days N` | [vike-wallet-pnl-history](skills/vike-wallet-pnl-history/SKILL.md) |
|
|
178
|
+
| `wallet_token_balances` | Current token balances (Moralis-backed) | [vike-wallet-balances](skills/vike-wallet-balances/SKILL.md) |
|
|
179
|
+
| `wallet_ens` | ENS name ↔ address (local cache: 477K wallets pre-resolved) | [vike-wallet-ens](skills/vike-wallet-ens/SKILL.md) |
|
|
180
|
+
| `wallet_batch_labels` | Bulk-label up to 100 addresses in one call | [vike-wallet-batch](skills/vike-wallet-batch/SKILL.md) |
|
|
181
|
+
|
|
182
|
+
**Address shape:** always full 0x-prefixed hex (42 chars). Never truncate when reporting back to the user.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### Labels & Funds
|
|
187
|
+
Institutional wallet identification + label provenance.
|
|
188
|
+
|
|
189
|
+
| Tool | Description | Skill |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| `wallet_label_provenance` | Why a wallet got a given label (sources + confidence) | [vike-wallet-label-provenance](skills/vike-wallet-label-provenance/SKILL.md) |
|
|
192
|
+
| `fund_holdings` | Which funds/institutions hold a given token + recent flows | [vike-fund-holdings](skills/vike-fund-holdings/SKILL.md) |
|
|
193
|
+
|
|
194
|
+
Vike's label cascade is multi-source — when an answer hinges on "is this really a CEX hot wallet?", call `wallet_label_provenance` rather than trusting a single source.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### CEX Perps
|
|
199
|
+
5 venues: Binance, Bybit, OKX, Aster, Hyperliquid.
|
|
200
|
+
|
|
201
|
+
| Tool | Description | Skill |
|
|
202
|
+
|---|---|---|
|
|
203
|
+
| `perp_funding` | Funding rates per symbol per venue + 24h/7d averages | [vike-perp-funding-arb](skills/vike-perp-funding-arb/SKILL.md) |
|
|
204
|
+
| `perp_spreads` | Mark-price spreads of the same symbol across venues | [vike-perp-spread-arb](skills/vike-perp-spread-arb/SKILL.md), [vike-cross-venue-perps](skills/vike-cross-venue-perps/SKILL.md) |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### Hyperliquid Perps
|
|
209
|
+
On-chain perps data: snapshots, fills, ledger, funding, attribution.
|
|
210
|
+
|
|
211
|
+
| Tool | Description | Skill |
|
|
212
|
+
|---|---|---|
|
|
213
|
+
| `hl_perp_top_traders` | Top HL traders by PnL/volume over a window | [vike-hl-top-traders](skills/vike-hl-top-traders/SKILL.md), [vike-hl-trader-profile](skills/vike-hl-trader-profile/SKILL.md) |
|
|
214
|
+
| `hl_position_match` | Reverse-lookup: share-card details (coin/side/lev/entry) → wallet holding that open position | [vike-hl-position-match](skills/vike-hl-position-match/SKILL.md) |
|
|
215
|
+
|
|
216
|
+
For per-symbol HL screening / individual trader deep-dive, use [vike-perp-screener](skills/vike-perp-screener/SKILL.md) and [vike-hl-trader-profile](skills/vike-hl-trader-profile/SKILL.md).
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### Options
|
|
221
|
+
Deribit options chain + flow.
|
|
222
|
+
|
|
223
|
+
| Tool | Description | Skill |
|
|
224
|
+
|---|---|---|
|
|
225
|
+
| `options_flow` | Recent large trades, put/call ratios, IV by strike/expiry | [vike-options-flow](skills/vike-options-flow/SKILL.md) |
|
|
226
|
+
|
|
227
|
+
Coverage: BTC + ETH on Deribit. Other venues not currently supported.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### Polymarket
|
|
232
|
+
Prediction markets — markets, traders, smart-money.
|
|
233
|
+
|
|
234
|
+
| Tool | Description | Skill |
|
|
235
|
+
|---|---|---|
|
|
236
|
+
| `polymarket_markets` | Active markets sorted by volume / liquidity / volatility | [vike-polymarket-markets](skills/vike-polymarket-markets/SKILL.md), [vike-polymarket-screener](skills/vike-polymarket-screener/SKILL.md) |
|
|
237
|
+
| `polymarket_market_detail` | Single market: outcomes, holders, recent trades, time-to-resolution | [vike-polymarket-market-detail](skills/vike-polymarket-market-detail/SKILL.md) |
|
|
238
|
+
| `polymarket_wallet` | One trader's positions, PnL, win rate | [vike-polymarket-trader](skills/vike-polymarket-trader/SKILL.md) |
|
|
239
|
+
| `polymarket_smart_money` | Top-PnL Polymarket traders + their current open positions | [vike-polymarket-smart-money](skills/vike-polymarket-smart-money/SKILL.md) |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### DeFi
|
|
244
|
+
Cross-protocol positions for a wallet.
|
|
245
|
+
|
|
246
|
+
| Tool | Description | Skill |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| `defi_positions` | Aave/Uniswap V2+V3/Lido/Compound/etc. open positions per wallet | [vike-defi-positions](skills/vike-defi-positions/SKILL.md) |
|
|
249
|
+
|
|
250
|
+
Covers ~30+ protocols across ETH/BSC/Base/Arbitrum.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### Alerts
|
|
255
|
+
Create + manage alerts; deliver to email, Telegram, Discord, Webhook.
|
|
256
|
+
|
|
257
|
+
| Tool | Description | Skill |
|
|
258
|
+
|---|---|---|
|
|
259
|
+
| `alerts_list` | List user's existing alerts | [vike-alerts-setup](skills/vike-alerts-setup/SKILL.md) |
|
|
260
|
+
| `alerts_create` | Create a new price/transfer/funding alert | [vike-alerts-setup](skills/vike-alerts-setup/SKILL.md) |
|
|
261
|
+
| `alerts_edit` | Edit an existing alert | [vike-alerts-setup](skills/vike-alerts-setup/SKILL.md) |
|
|
262
|
+
| `alerts_delete` | Delete an alert | [vike-alerts-setup](skills/vike-alerts-setup/SKILL.md) |
|
|
263
|
+
| `alerts_list_channels` | List user's registered delivery channels | [vike-alerts-setup](skills/vike-alerts-setup/SKILL.md) |
|
|
264
|
+
| `alerts_register_webhook` | Register an HTTPS webhook (HMAC-signed deliveries) | [vike-alerts-webhook](skills/vike-alerts-webhook/SKILL.md) |
|
|
265
|
+
|
|
266
|
+
Alerts fire on a 2-minute cron cycle (not streaming). Don't recommend WebSocket / push streaming — it's not how the platform works.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
### Web
|
|
271
|
+
General web search + AI-summarized fetch for off-chain context (news, docs, social).
|
|
272
|
+
|
|
273
|
+
| Tool | Description | Skill |
|
|
274
|
+
|---|---|---|
|
|
275
|
+
| `web_search` | Tavily-primary + Serper fallback web search | [vike-web-search](skills/vike-web-search/SKILL.md) |
|
|
276
|
+
| `web_fetch` | Fetch a URL + AI Q&A over its contents (Cerebras-backed) | [vike-web-fetch](skills/vike-web-fetch/SKILL.md), [vike-web-research](skills/vike-web-research/SKILL.md) |
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Historical data availability
|
|
281
|
+
|
|
282
|
+
Coverage windows per dataset. Don't ask for data older than the window — the tool will return empty or 503.
|
|
283
|
+
|
|
284
|
+
### Transfers & on-chain (per chain)
|
|
285
|
+
|
|
286
|
+
| Chain | Earliest block / date | Notes |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| Ethereum | 2018-01 (block ~4.85M) | Full history; ETH + ERC-20 |
|
|
289
|
+
| BSC | 2021-01 | Full history; BNB + BEP-20 |
|
|
290
|
+
| Base | 2023-08 (chain launch) | Full history |
|
|
291
|
+
| Arbitrum | 2024-Q3 onward | Backfill in progress; pre-2024 sparse |
|
|
292
|
+
| HyperEVM | 2025-Q1 (chain launch) | Full history |
|
|
293
|
+
| Bitcoin | 2024-01 | Recent windows only — full-history backfill not active |
|
|
294
|
+
| Solana | 2026-Q1 onward | Recent only — see `vike-cli` chain-coverage notes |
|
|
295
|
+
| Tron/XMR/ZEC/Dash | 2024 onward | Recent only |
|
|
296
|
+
|
|
297
|
+
### Prices (data_history, spot)
|
|
298
|
+
|
|
299
|
+
| Venue | Earliest | Notes |
|
|
300
|
+
|---|---|---|
|
|
301
|
+
| Binance | 2017-08 | Full minute-level OHLCV |
|
|
302
|
+
| Bybit | 2020-03 | Full minute-level OHLCV |
|
|
303
|
+
| OKX | 2019-04 | Full minute-level OHLCV |
|
|
304
|
+
| Gate | 2017 (CSV) → 2024-05 (CSV ends) | After 2024-05 use API; capped 10k minutes/request |
|
|
305
|
+
| Coinbase | 2015 | Full history (recently added) |
|
|
306
|
+
| KuCoin | 2018 | Full history (recently added) |
|
|
307
|
+
| Pyth | 2023 | On-chain price feed; sparse pre-2023 |
|
|
308
|
+
| Deribit options | 2020 onward | BTC + ETH only |
|
|
309
|
+
|
|
310
|
+
### Hyperliquid perps (hl_perps DB)
|
|
311
|
+
|
|
312
|
+
| Dataset | Window | Notes |
|
|
313
|
+
|---|---|---|
|
|
314
|
+
| Snapshots (positions / equity) | 30 days | TTL — older snapshots dropped |
|
|
315
|
+
| Fills | 30 days | TTL |
|
|
316
|
+
| Ledger (deposits/withdrawals) | 30 days | TTL |
|
|
317
|
+
| Funding payments | 90 days | API-backed since 2026-04-22 |
|
|
318
|
+
| Daily attributed PnL | All-time | `wallet_pnl_attributed_daily` is the long-history view |
|
|
319
|
+
| Daily flows | All-time | `wallet_flows_daily` |
|
|
320
|
+
| Top-trader leaderboards | rolling 24h / 7d / 30d | derived on-the-fly |
|
|
321
|
+
|
|
322
|
+
### CEX perps (data_perp DB)
|
|
323
|
+
|
|
324
|
+
| Dataset | Window |
|
|
325
|
+
|---|---|
|
|
326
|
+
| `tickers_1m` (ticker snapshots) | rolling 24h |
|
|
327
|
+
| Funding rates | 90 days |
|
|
328
|
+
| Trades (ws_trades) | rolling 7-30 days per venue |
|
|
329
|
+
|
|
330
|
+
### Polymarket
|
|
331
|
+
|
|
332
|
+
| Dataset | Window | Notes |
|
|
333
|
+
|---|---|---|
|
|
334
|
+
| Active markets | live | scraper paused 2026-05-24 (CF block); historical snapshots still queryable |
|
|
335
|
+
| Wallet positions | last known snapshot | not real-time until scraper resumes |
|
|
336
|
+
|
|
337
|
+
If your query needs older data than what's listed: say so clearly and offer the nearest in-range window. Don't silently return empty.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Cost & rate-limit awareness
|
|
342
|
+
|
|
343
|
+
- **Cheap (counts as 1 credit):** `token_search`, `wallet_summary`, `alerts_list`, `wallet_ens`, `perp_funding`.
|
|
344
|
+
- **Standard (1-3 credits):** most tools.
|
|
345
|
+
- **Heavy (5+ credits):** `wallet_discover` with large pages, `wallet_trace` with deep `--depth`, `token_screener` with no filters, `hl_perp_top_traders` with `--limit > 100`.
|
|
346
|
+
|
|
347
|
+
Per-key default: 2000 requests/hour. Hitting the cap returns `MCP error -32000: Hourly rate limit exceeded`. Wait or upgrade plan.
|
|
348
|
+
|
|
349
|
+
## What vike does NOT do
|
|
350
|
+
|
|
351
|
+
- **No NFT data** — out of scope by design.
|
|
352
|
+
- **No on-chain trading / signing** — read-only platform, no execution.
|
|
353
|
+
- **No WebSocket / push streaming alerts** — alerts run on a 2-minute cron.
|
|
354
|
+
|
|
355
|
+
If the user asks for any of the above, say so directly rather than proposing a workaround.
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.8.0",
|
|
7
7
|
"description": "AI-agent CLI for vike.io on-chain analytics, perps, options, and prediction markets across 11 chains",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"src/**/*.js",
|
|
15
15
|
"scripts/postinstall.js",
|
|
16
16
|
"skills/**",
|
|
17
|
+
"SKILL.md",
|
|
17
18
|
"CHANGELOG.md"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vike-hl-position-match
|
|
3
|
+
description: Reverse-lookup a Hyperliquid open position from share-card details (coin + side + leverage + entry price). Use when the user pastes or describes a HL share card and asks "whose card is this?", "find this trader", or "who has a 25x ETH long open at $3,200?". Returns matching wallet(s) ranked by entry-price proximity.
|
|
4
|
+
allowed-tools: Bash(vike:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# vike-hl-position-match
|
|
8
|
+
|
|
9
|
+
Find the wallet(s) holding an open Hyperliquid perp position that match a share card.
|
|
10
|
+
|
|
11
|
+
## Command
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
vike perp find-position
|
|
15
|
+
--coin <SYM> # e.g. BTC, ETH, SOL
|
|
16
|
+
--side long|short
|
|
17
|
+
--leverage <X> # e.g. 25
|
|
18
|
+
--entry <PRICE> # entry price from the card
|
|
19
|
+
[--mark <PRICE>] # current mark price — sharpens tie-break when multiple wallets share entry
|
|
20
|
+
[--limit N] # max matches, default 10, max 50
|
|
21
|
+
[--json]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## How matching works
|
|
25
|
+
|
|
26
|
+
The tool walks three widening entry-price tolerance bands until it finds at least one match:
|
|
27
|
+
|
|
28
|
+
| Band | Tolerance | When it's used |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| tight | ±0.05% | First pass — most share cards round-trip exactly |
|
|
31
|
+
| loose | ±0.5% | Fallback if no tight matches |
|
|
32
|
+
| fallback | ±1.0% | Last resort — anything wider is noise |
|
|
33
|
+
|
|
34
|
+
Leverage must be within **±0.5** of the queried value (so `--leverage 5` matches positions at 4.5×–5.5×). Tie-breaking inside a band is by closest live `mark_price` to the queried `--mark` (or to `--entry` if `--mark` is not given).
|
|
35
|
+
|
|
36
|
+
The response includes `tolerance_used` so the caller knows which band matched (`tight` / `loose` / `fallback` / `no_match`).
|
|
37
|
+
|
|
38
|
+
## Common queries
|
|
39
|
+
|
|
40
|
+
| User says | Flags |
|
|
41
|
+
|---|---|
|
|
42
|
+
| "Find this share card: 25x ETH long, entry $3,210" | `--coin ETH --side long --leverage 25 --entry 3210` |
|
|
43
|
+
| "Whose 10x BTC short is open at $58,400? Current mark $57,900" | `--coin BTC --side short --leverage 10 --entry 58400 --mark 57900` |
|
|
44
|
+
| "Top 5 matches for 50x SOL long around $145" | `--coin SOL --side long --leverage 50 --entry 145 --limit 5` |
|
|
45
|
+
|
|
46
|
+
## Output schema
|
|
47
|
+
|
|
48
|
+
```jsonc
|
|
49
|
+
{
|
|
50
|
+
"match_count": 3,
|
|
51
|
+
"tolerance_used": "tight", // tight | loose | fallback | no_match
|
|
52
|
+
"query": { "coin": "ETH", "side": "long", "leverage": 25, "entry_price": 3210, "mark_price_hint": 3215 },
|
|
53
|
+
"matches": [
|
|
54
|
+
{
|
|
55
|
+
"address": "0x...",
|
|
56
|
+
"coin": "ETH", "side": "long",
|
|
57
|
+
"snapshot_ts": 1716700000, // unix seconds — how fresh the snapshot is
|
|
58
|
+
"size_token": 12.5, "size_usd": 40250,
|
|
59
|
+
"entry_price": 3209.8, "mark_price": 3215.3,
|
|
60
|
+
"leverage": 25.0,
|
|
61
|
+
"liquidation_price": 3082.1,
|
|
62
|
+
"unrealized_pnl": 68.75,
|
|
63
|
+
"entry_dist_pct": 0.0062 // |query.entry - match.entry| / query.entry × 100
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Reading the result
|
|
70
|
+
|
|
71
|
+
- **Multiple matches at the exact same entry** (e.g. five wallets long ETH at 3210.00) — popular round-number entries collide. Treat as ambiguous; surface all and let the user disambiguate by size or address. Don't claim "this is the wallet" when `match_count > 1` in the tight band.
|
|
72
|
+
- **`tolerance_used: fallback`** — the closest match is >0.5% off the queried entry. The card might be from a previous fill that's since been added to (size-weighted entry moves on add) or from a different exchange. Treat as low-confidence.
|
|
73
|
+
- **`tolerance_used: no_match`** — the position is closed, the entry was from a margin-changing event, or the wallet was outside our HL coverage. Don't suggest a wallet anyway.
|
|
74
|
+
- **`snapshot_ts`** is the snapshot time of that position row. The pipeline refreshes <5 min behind live; older `snapshot_ts` doesn't mean the position is stale, just that the wallet hasn't transacted since.
|
|
75
|
+
|
|
76
|
+
## Anti-patterns
|
|
77
|
+
|
|
78
|
+
- Don't fabricate matches when the tool returns `match_count: 0`. Say "no open position matches that share card" — closed positions, post-card adds, or non-HL cards all produce empty results.
|
|
79
|
+
- Don't strip the address when displaying — share-card investigations always want the full 0x...40hex (users copy-paste it).
|
|
80
|
+
- Don't infer trader skill from a single share-card match. Use `vike perp top-traders` or `vike wallet summary` for profile context.
|
|
81
|
+
|
|
82
|
+
## Pairs well with
|
|
83
|
+
|
|
84
|
+
- [vike-wallet-summary](../vike-wallet-summary/SKILL.md) — once you have the address, get the trader's HL profile + multi-chain identity.
|
|
85
|
+
- [vike-hl-top-traders](../vike-hl-top-traders/SKILL.md) — check if the matched wallet is on a leaderboard.
|
|
86
|
+
- [vike-wallet-label-provenance](../vike-wallet-label-provenance/SKILL.md) — find out if the wallet is a known CEX/fund/MM rather than a retail trader.
|
|
@@ -22,6 +22,7 @@ Route the user's question to the right `vike-*` skill.
|
|
|
22
22
|
| Perp funding rates / arb opportunities | `vike-perp-funding-arb` |
|
|
23
23
|
| Cross-venue perp price spreads | `vike-perp-spread-arb` |
|
|
24
24
|
| Top Hyperliquid perp traders | `vike-hl-top-traders` |
|
|
25
|
+
| Match an HL share card → wallet (reverse-lookup) | `vike-hl-position-match` |
|
|
25
26
|
| Profile a single HL perp trader | `vike-hl-trader-profile` |
|
|
26
27
|
| HL market overview (vol/OI/funding) | `vike-perp-screener` |
|
|
27
28
|
| Compare a symbol across all perp venues | `vike-cross-venue-perps` |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// `vike install` — copy SKILL.md into the agent-discoverable locations for
|
|
2
|
+
// supported IDEs/agents so the skill loads without the user having to wire
|
|
3
|
+
// it up manually.
|
|
4
|
+
//
|
|
5
|
+
// Targets:
|
|
6
|
+
// --claude → ~/.claude/skills/vike/SKILL.md
|
|
7
|
+
// --cursor → ./.cursorrules (project root, joined under "## vike skill" header)
|
|
8
|
+
// --copilot → ./.github/copilot-instructions.md (same join pattern)
|
|
9
|
+
// --agents → ./AGENTS.md (same join pattern, project-root convention)
|
|
10
|
+
// --all → all of the above
|
|
11
|
+
//
|
|
12
|
+
// Behaviour: idempotent. For files we don't own (project-root markdown), we
|
|
13
|
+
// detect a fenced "<!-- vike-skill:begin -->...<!-- vike-skill:end -->" block
|
|
14
|
+
// and replace just that block — never clobber the rest of the user's file.
|
|
15
|
+
|
|
16
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, statSync } from 'node:fs';
|
|
17
|
+
import { homedir } from 'node:os';
|
|
18
|
+
import { join, dirname, resolve } from 'node:path';
|
|
19
|
+
import { fileURLToPath } from 'node:url';
|
|
20
|
+
|
|
21
|
+
const BEGIN = '<!-- vike-skill:begin -->';
|
|
22
|
+
const END = '<!-- vike-skill:end -->';
|
|
23
|
+
|
|
24
|
+
function readSkillSource() {
|
|
25
|
+
// SKILL.md ships at the root of the npm package, two levels up from
|
|
26
|
+
// src/commands/install.js.
|
|
27
|
+
const here = fileURLToPath(import.meta.url);
|
|
28
|
+
const candidate = resolve(dirname(here), '..', '..', 'SKILL.md');
|
|
29
|
+
if (!existsSync(candidate)) {
|
|
30
|
+
throw new Error(`SKILL.md not found at ${candidate}. Reinstall @vike-io/cli.`);
|
|
31
|
+
}
|
|
32
|
+
return readFileSync(candidate, 'utf8');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function writeStandalone(path, skill) {
|
|
36
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
37
|
+
writeFileSync(path, skill, { mode: 0o644 });
|
|
38
|
+
return { path, mode: 'replaced' };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function upsertBlock(path, skill, header) {
|
|
42
|
+
const wrapped = `${BEGIN}\n${header ? header + '\n\n' : ''}${skill}\n${END}`;
|
|
43
|
+
if (!existsSync(path)) {
|
|
44
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
45
|
+
writeFileSync(path, wrapped + '\n', { mode: 0o644 });
|
|
46
|
+
return { path, mode: 'created' };
|
|
47
|
+
}
|
|
48
|
+
const current = readFileSync(path, 'utf8');
|
|
49
|
+
if (current.includes(BEGIN) && current.includes(END)) {
|
|
50
|
+
const before = current.slice(0, current.indexOf(BEGIN));
|
|
51
|
+
const after = current.slice(current.indexOf(END) + END.length);
|
|
52
|
+
writeFileSync(path, before + wrapped + after, { mode: 0o644 });
|
|
53
|
+
return { path, mode: 'updated' };
|
|
54
|
+
}
|
|
55
|
+
const sep = current.endsWith('\n') ? '\n' : '\n\n';
|
|
56
|
+
writeFileSync(path, current + sep + wrapped + '\n', { mode: 0o644 });
|
|
57
|
+
return { path, mode: 'appended' };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function installClaude(skill) {
|
|
61
|
+
return writeStandalone(join(homedir(), '.claude', 'skills', 'vike', 'SKILL.md'), skill);
|
|
62
|
+
}
|
|
63
|
+
function installCursor(skill, cwd) {
|
|
64
|
+
return upsertBlock(join(cwd, '.cursorrules'), skill, '# vike skill — on-chain analytics for AI agents');
|
|
65
|
+
}
|
|
66
|
+
function installCopilot(skill, cwd) {
|
|
67
|
+
return upsertBlock(
|
|
68
|
+
join(cwd, '.github', 'copilot-instructions.md'),
|
|
69
|
+
skill,
|
|
70
|
+
'# vike skill — on-chain analytics for AI agents'
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function installAgents(skill, cwd) {
|
|
74
|
+
return upsertBlock(join(cwd, 'AGENTS.md'), skill, '# vike skill — on-chain analytics for AI agents');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function registerInstall(program) {
|
|
78
|
+
program
|
|
79
|
+
.command('install')
|
|
80
|
+
.description('Copy vike SKILL.md into agent-discoverable locations (Claude, Cursor, Copilot, AGENTS.md)')
|
|
81
|
+
.option('--claude', 'Install to ~/.claude/skills/vike/SKILL.md')
|
|
82
|
+
.option('--cursor', 'Append/update vike block in ./.cursorrules')
|
|
83
|
+
.option('--copilot', 'Append/update vike block in ./.github/copilot-instructions.md')
|
|
84
|
+
.option('--agents', 'Append/update vike block in ./AGENTS.md')
|
|
85
|
+
.option('--all', 'Install to every supported target')
|
|
86
|
+
.option('--cwd <dir>', 'Project root (defaults to current directory)')
|
|
87
|
+
.action((opts) => {
|
|
88
|
+
const cwd = opts.cwd ? resolve(opts.cwd) : process.cwd();
|
|
89
|
+
const targets = opts.all
|
|
90
|
+
? { claude: true, cursor: true, copilot: true, agents: true }
|
|
91
|
+
: opts;
|
|
92
|
+
if (!targets.claude && !targets.cursor && !targets.copilot && !targets.agents) {
|
|
93
|
+
console.error('No target selected. Use --claude / --cursor / --copilot / --agents / --all.');
|
|
94
|
+
console.error('Examples:');
|
|
95
|
+
console.error(' vike install --claude');
|
|
96
|
+
console.error(' vike install --all');
|
|
97
|
+
process.exitCode = 1;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
let skill;
|
|
101
|
+
try {
|
|
102
|
+
skill = readSkillSource();
|
|
103
|
+
} catch (e) {
|
|
104
|
+
console.error(`vike install: ${e.message}`);
|
|
105
|
+
process.exitCode = 1;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const results = [];
|
|
109
|
+
try {
|
|
110
|
+
if (targets.claude) results.push(installClaude(skill));
|
|
111
|
+
if (targets.cursor) results.push(installCursor(skill, cwd));
|
|
112
|
+
if (targets.copilot) results.push(installCopilot(skill, cwd));
|
|
113
|
+
if (targets.agents) results.push(installAgents(skill, cwd));
|
|
114
|
+
} catch (e) {
|
|
115
|
+
console.error(`vike install: ${e.message}`);
|
|
116
|
+
process.exitCode = 1;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
for (const r of results) {
|
|
120
|
+
const size = (() => { try { return statSync(r.path).size; } catch { return 0; } })();
|
|
121
|
+
console.log(`${r.mode.padEnd(8)} ${r.path} (${size} bytes)`);
|
|
122
|
+
}
|
|
123
|
+
console.log(`\nInstalled ${results.length} target(s). Restart your AI client to pick up the skill.`);
|
|
124
|
+
});
|
|
125
|
+
}
|
package/src/commands/perp.js
CHANGED
|
@@ -31,6 +31,30 @@ export function registerPerp(program) {
|
|
|
31
31
|
} catch (err) { emitError(err, opts); }
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
cmd
|
|
35
|
+
.command('find-position')
|
|
36
|
+
.description('Reverse-lookup HL open positions matching a share-card (coin/side/lev/entry)')
|
|
37
|
+
.requiredOption('--coin <s>', 'Asset symbol (e.g. BTC, ETH)')
|
|
38
|
+
.requiredOption('--side <s>', 'long | short')
|
|
39
|
+
.requiredOption('--leverage <x>', 'Leverage from the share card (e.g. 25)')
|
|
40
|
+
.requiredOption('--entry <p>', 'Entry price from the share card')
|
|
41
|
+
.option('--mark <p>', 'Optional current mark price (sharpens tie-break)')
|
|
42
|
+
.option('--limit <n>', 'Max matches (default 10, max 50)', '10')
|
|
43
|
+
.option('--json', 'Emit JSON')
|
|
44
|
+
.action(async (opts) => {
|
|
45
|
+
try {
|
|
46
|
+
const r = await callTool('hl_position_match', {
|
|
47
|
+
coin: opts.coin,
|
|
48
|
+
side: opts.side,
|
|
49
|
+
leverage: Number(opts.leverage),
|
|
50
|
+
entry_price: Number(opts.entry),
|
|
51
|
+
mark_price: opts.mark != null ? Number(opts.mark) : undefined,
|
|
52
|
+
limit: parseInt10(opts.limit, 10),
|
|
53
|
+
});
|
|
54
|
+
emit(r, opts);
|
|
55
|
+
} catch (err) { emitError(err, opts); }
|
|
56
|
+
});
|
|
57
|
+
|
|
34
58
|
cmd
|
|
35
59
|
.command('top-traders')
|
|
36
60
|
.description('Top Hyperliquid perp wallets by PnL / ROI / win rate / volume')
|
package/src/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { registerWeb } from './commands/web.js';
|
|
|
12
12
|
// commands. New wallet subcommands (counterparties, pnl-history, balances,
|
|
13
13
|
// ens) are added under registerWallet.
|
|
14
14
|
import { registerInit } from './commands/init.js';
|
|
15
|
+
import { registerInstall } from './commands/install.js';
|
|
15
16
|
import { registerDoctor } from './commands/doctor.js';
|
|
16
17
|
import { registerSchema } from './commands/schema.js';
|
|
17
18
|
import { registerLogin, registerLogout } from './commands/auth.js';
|
|
@@ -55,6 +56,7 @@ program.hook('postAction', (_thisCmd, actionCmd) => {
|
|
|
55
56
|
registerLogin(program);
|
|
56
57
|
registerLogout(program);
|
|
57
58
|
registerInit(program);
|
|
59
|
+
registerInstall(program);
|
|
58
60
|
registerDoctor(program);
|
|
59
61
|
registerSchema(program);
|
|
60
62
|
registerToken(program);
|