@vike-io/cli 0.12.0 → 0.13.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +164 -62
  3. package/package.json +7 -6
  4. package/scripts/postinstall.js +5 -4
  5. package/skills/vike/SKILL.md +76 -85
  6. package/skills/vike-alerts-setup/SKILL.md +11 -11
  7. package/skills/vike-alerts-webhook/SKILL.md +4 -4
  8. package/skills/vike-candles/SKILL.md +9 -9
  9. package/skills/vike-core/SKILL.md +9 -9
  10. package/skills/vike-cross-venue-perps/SKILL.md +2 -2
  11. package/skills/vike-hl-position-match/SKILL.md +5 -5
  12. package/skills/vike-hl-top-traders/SKILL.md +1 -1
  13. package/skills/vike-hl-trader-profile/SKILL.md +5 -5
  14. package/skills/vike-perp-funding-arb/SKILL.md +3 -3
  15. package/skills/vike-perp-screener/SKILL.md +3 -3
  16. package/skills/vike-perp-spread-arb/SKILL.md +2 -2
  17. package/skills/vike-polymarket-market-detail/SKILL.md +4 -4
  18. package/skills/vike-polymarket-markets/SKILL.md +4 -4
  19. package/skills/vike-polymarket-screener/SKILL.md +3 -3
  20. package/skills/vike-polymarket-smart-money/SKILL.md +3 -3
  21. package/skills/vike-polymarket-trader/SKILL.md +3 -3
  22. package/skills/vike-router/SKILL.md +7 -7
  23. package/skills/vike-smart-money-discovery/SKILL.md +4 -4
  24. package/skills/vike-token-holders/SKILL.md +6 -6
  25. package/skills/vike-token-research/SKILL.md +3 -3
  26. package/skills/vike-token-screener/SKILL.md +7 -7
  27. package/skills/vike-token-search/SKILL.md +3 -3
  28. package/skills/vike-token-transfers/SKILL.md +3 -3
  29. package/skills/vike-wallet-balances/SKILL.md +5 -5
  30. package/skills/vike-wallet-batch/SKILL.md +5 -5
  31. package/skills/vike-wallet-compare/SKILL.md +4 -4
  32. package/skills/vike-wallet-counterparties/SKILL.md +6 -6
  33. package/skills/vike-wallet-discover/SKILL.md +3 -3
  34. package/skills/vike-wallet-ens/SKILL.md +5 -5
  35. package/skills/vike-wallet-label-provenance/SKILL.md +3 -3
  36. package/skills/vike-wallet-pnl-history/SKILL.md +4 -4
  37. package/skills/vike-wallet-portfolio/SKILL.md +5 -5
  38. package/skills/vike-wallet-summary/SKILL.md +4 -4
  39. package/skills/vike-wallet-trace/SKILL.md +5 -5
  40. package/skills/vike-wallet-transactions/SKILL.md +8 -8
  41. package/src/auth.js +1 -1
  42. package/src/chains.js +1 -1
  43. package/src/commands/doctor.js +2 -2
  44. package/src/commands/init.js +2 -2
  45. package/src/commands/install.js +5 -5
  46. package/src/commands/labels.js +1 -1
  47. package/src/index.js +1 -1
  48. package/src/mcp-client.js +5 -6
@@ -33,7 +33,7 @@ export function registerInit(program) {
33
33
 
34
34
  console.log('Verifying connection to vike.io/mcp ...');
35
35
  const { status, body } = await ping({ apiKey: key });
36
- if (status !== 200) {
36
+ if (status !== 200 || body?.error) {
37
37
  console.error(`Endpoint returned HTTP ${status}: ${JSON.stringify(body)}`);
38
38
  process.exitCode = 1;
39
39
  return;
@@ -44,7 +44,7 @@ export function registerInit(program) {
44
44
  server: info.name,
45
45
  version: info.version,
46
46
  protocol: body?.result?.protocolVersion,
47
- next: 'Try: vike token search BTC',
47
+ next: 'Try: vike-data token search BTC',
48
48
  });
49
49
  });
50
50
  }
@@ -1,4 +1,4 @@
1
- // `vike install` — copy SKILL.md into the agent-discoverable locations for
1
+ // `vike-data install` — copy SKILL.md into the agent-discoverable locations for
2
2
  // supported IDEs/agents so the skill loads without the user having to wire
3
3
  // it up manually.
4
4
  //
@@ -95,8 +95,8 @@ export function registerInstall(program) {
95
95
  if (!targets.claude && !targets.cursor && !targets.copilot && !targets.agents) {
96
96
  console.error('No target selected. Use --claude / --cursor / --copilot / --agents / --all.');
97
97
  console.error('Examples:');
98
- console.error(' vike install --claude');
99
- console.error(' vike install --all');
98
+ console.error(' vike-data install --claude');
99
+ console.error(' vike-data install --all');
100
100
  process.exitCode = 1;
101
101
  return;
102
102
  }
@@ -104,7 +104,7 @@ export function registerInstall(program) {
104
104
  try {
105
105
  skill = readSkillSource();
106
106
  } catch (e) {
107
- console.error(`vike install: ${e.message}`);
107
+ console.error(`vike-data install: ${e.message}`);
108
108
  process.exitCode = 1;
109
109
  return;
110
110
  }
@@ -115,7 +115,7 @@ export function registerInstall(program) {
115
115
  if (targets.copilot) results.push(installCopilot(skill, cwd));
116
116
  if (targets.agents) results.push(installAgents(skill, cwd));
117
117
  } catch (e) {
118
- console.error(`vike install: ${e.message}`);
118
+ console.error(`vike-data install: ${e.message}`);
119
119
  process.exitCode = 1;
120
120
  return;
121
121
  }
@@ -2,7 +2,7 @@ import { callTool } from '../mcp-client.js';
2
2
  import { emit, emitError } from '../format.js';
3
3
 
4
4
  export function registerLabels(program) {
5
- // `vike labels <address>` — multi-source label provenance for one wallet
5
+ // `vike-data labels <address>` — multi-source label provenance for one wallet
6
6
  program
7
7
  .command('labels <address>')
8
8
  .description('Multi-source label cascade for a wallet (10+ providers + in-house heuristic + consensus view)')
package/src/index.js CHANGED
@@ -34,7 +34,7 @@ if (updateNotice) process.stderr.write(updateNotice);
34
34
  const program = new Command();
35
35
 
36
36
  program
37
- .name('vike')
37
+ .name('vike-data')
38
38
  .description('AI-agent CLI for vike.io on-chain analytics')
39
39
  .version(version, '-v, --version', 'Show CLI version');
40
40
 
package/src/mcp-client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { requireApiKey, getEndpoint, getApiKey } from './auth.js';
1
+ import { requireApiKey, getEndpoint } from './auth.js';
2
2
 
3
3
  let _id = 0;
4
4
  function nextId() { return ++_id; }
@@ -78,14 +78,13 @@ export async function listTools(opts = {}) {
78
78
  }
79
79
 
80
80
  export async function ping(opts = {}) {
81
- // initialize doesn't require auth — useful for `vike doctor`
81
+ // /mcp authenticates every method, initialize included: no key gets a
82
+ // JSON-RPC "Invalid or missing API key" error (soon HTTP 401), so fail early.
82
83
  const endpoint = opts.endpoint ?? getEndpoint();
83
- const apiKey = opts.apiKey ?? getApiKey();
84
- const headers = { 'Content-Type': 'application/json' };
85
- if (apiKey) headers['X-API-KEY'] = apiKey;
84
+ const apiKey = opts.apiKey ?? requireApiKey();
86
85
  const resp = await fetch(endpoint, {
87
86
  method: 'POST',
88
- headers,
87
+ headers: { 'Content-Type': 'application/json', 'X-API-KEY': apiKey },
89
88
  body: JSON.stringify({
90
89
  jsonrpc: '2.0', id: nextId(), method: 'initialize', params: {},
91
90
  }),