Skip to content

Commit 0bdad0f

Browse files
Hiksangclaude
andcommitted
fix: replace all hardcoded version + outdated command references
- index.ts: v0.3.7 → dynamic _pkg.version, status→portfolio, arb rates→arb scan - init.ts: status→portfolio - agent.ts: status→portfolio, arb rates→arb scan, arb auto→arb exec - mcp-server.ts: status→portfolio, arb rates→arb scan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 196f288 commit 0bdad0f

4 files changed

Lines changed: 19 additions & 21 deletions

File tree

src/commands/agent.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function registerAgentCommands(
175175
"perp account orders --json",
176176
"perp account history --json",
177177
"perp account trades --json",
178-
"perp status --json",
178+
"perp portfolio --json",
179179
],
180180
description: "Read account state: balances, positions, open orders, trade history",
181181
},
@@ -211,7 +211,7 @@ export function registerAgentCommands(
211211
category: "arbitrage",
212212
commands: [
213213
"perp arb funding --json",
214-
"perp arb rates --json",
214+
"perp arb scan --min 5 --json",
215215
"perp arb scan --json",
216216
"perp arb dex --json",
217217
"perp arb dex-monitor --min 10",
@@ -397,14 +397,12 @@ export function registerAgentCommands(
397397
}
398398
} else if (g.includes("arb") || g.includes("arbitrage") || g.includes("funding")) {
399399
steps.push(
400-
{ step: 1, command: "perp arb rates --json", description: "Compare funding rates across exchanges" },
401-
{ step: 2, command: "perp arb scan --json", description: "Find high-spread opportunities" },
402-
{ step: 3, command: "perp gap show --json", description: "Check price gaps" },
403-
{ step: 4, command: "perp arb auto --dry-run --min-spread 30", description: "Dry-run auto arb bot" },
400+
{ step: 1, command: "perp arb scan --min 5 --json", description: "Scan funding rate arbitrage opportunities" },
401+
{ step: 2, command: "perp arb exec <SYM> <longEx> <shortEx> <$> --leverage 2 --isolated --dry-run --json", description: "Dry-run arb execution" },
404402
);
405403
} else if (g.includes("status") || g.includes("check") || g.includes("overview")) {
406404
steps.push(
407-
{ step: 1, command: "perp status --json", description: "Full account overview" },
405+
{ step: 1, command: "perp portfolio --json", description: "Balances + positions + risk" },
408406
{ step: 2, command: "perp account positions --json", description: "Detailed positions" },
409407
{ step: 3, command: "perp account orders --json", description: "Open orders" },
410408
);
@@ -432,7 +430,7 @@ export function registerAgentCommands(
432430
} else {
433431
steps.push(
434432
{ step: 1, command: "perp agent capabilities", description: "List all available capabilities" },
435-
{ step: 2, command: "perp status --json", description: "Check account status" },
433+
{ step: 2, command: "perp portfolio --json", description: "Check account status" },
436434
);
437435
}
438436

src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function registerInitCommand(program: Command) {
248248
}
249249

250250
console.log(chalk.white.bold("\n Next steps:"));
251-
console.log(` ${chalk.green("perp status")} account overview`);
251+
console.log(` ${chalk.green("perp portfolio")} balances + positions + risk`);
252252
if (selected.includes("hyperliquid")) {
253253
console.log(` ${chalk.green("perp deposit hyperliquid <amt>")} deposit USDC`);
254254
}

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,19 +417,19 @@ if (rawArgs.length === 0 || (!hasSubcommand && !rawArgs.includes("-h") && !rawAr
417417

418418
if (!status.hasWallets && !hasEnvKey && !settings.defaultExchange) {
419419
// Fresh install — onboarding
420-
console.log(chalk.cyan.bold("\n Welcome to perp-cli!") + chalk.gray(" v0.3.7\n"));
420+
console.log(chalk.cyan.bold("\n Welcome to perp-cli!") + chalk.gray(` v${_pkg.version}\n`));
421421
console.log(" Multi-DEX perpetual futures CLI for Pacifica, Hyperliquid, and Lighter.\n");
422-
console.log(` Get started: ${chalk.cyan("perp init")}`);
422+
console.log(` Get started: ${chalk.cyan("perp wallet set <exchange> <key>")}`);
423423
console.log(chalk.gray(`\n Or explore without a wallet:`));
424424
console.log(` ${chalk.green("perp market list")} available markets`);
425425
console.log(` ${chalk.green("perp -e hyperliquid market list")} Hyperliquid markets`);
426-
console.log(` ${chalk.green("perp arb rates")} funding rate comparison`);
426+
console.log(` ${chalk.green("perp arb scan")} funding rate arbitrage`);
427427
console.log(` ${chalk.green("perp --help")} all commands\n`);
428428
} else {
429429
// Configured — show status overview
430430
const defaultEx = settings.defaultExchange || "pacifica";
431431
const activeEntries = Object.entries(status.active);
432-
console.log(chalk.cyan.bold("\n perp-cli") + chalk.gray(" v0.3.7\n"));
432+
console.log(chalk.cyan.bold("\n perp-cli") + chalk.gray(` v${_pkg.version}\n`));
433433
console.log(` Default exchange: ${chalk.cyan(defaultEx)}`);
434434

435435
if (activeEntries.length > 0) {
@@ -460,10 +460,10 @@ if (rawArgs.length === 0 || (!hasSubcommand && !rawArgs.includes("-h") && !rawAr
460460
}
461461

462462
console.log(chalk.white.bold("\n Quick commands:"));
463-
console.log(` ${chalk.green("perp status")} account overview`);
463+
console.log(` ${chalk.green("perp portfolio")} balances + positions + risk`);
464464
console.log(` ${chalk.green("perp market list")} available markets`);
465+
console.log(` ${chalk.green("perp arb scan")} funding rate arbitrage`);
465466
console.log(` ${chalk.green("perp dashboard")} live monitoring`);
466-
console.log(` ${chalk.green("perp arb rates")} funding rate comparison`);
467467
console.log(` ${chalk.green("perp --help")} all commands\n`);
468468
}
469469
} catch {

src/mcp-server.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ server.tool(
461461
);
462462
} else if (g.includes("arb") || g.includes("arbitrage")) {
463463
steps.push(
464-
{ step: 1, command: "perp --json arb rates", description: "Compare funding rates across exchanges" },
464+
{ step: 1, command: "perp --json arb scan --min 5", description: "Scan funding rate arbitrage opportunities" },
465465
{ step: 2, command: "perp --json arb scan", description: "Find high-spread opportunities" },
466466
{ step: 3, command: "perp --json gap show", description: "Check cross-exchange price gaps" },
467467
{ step: 4, command: "perp --json arb dex", description: "HIP-3 cross-dex arb opportunities (Hyperliquid)" },
@@ -923,7 +923,7 @@ server.tool(
923923
parameters: [],
924924
risks: [],
925925
category: "read",
926-
relatedCommands: ["perp status", "perp portfolio"],
926+
relatedCommands: ["perp portfolio", "perp portfolio"],
927927
};
928928
} else if (category === "arb") {
929929
explanation = {
@@ -941,7 +941,7 @@ server.tool(
941941
parameters: [],
942942
risks: ["auto" === sub ? "Auto-executes trades on both exchanges" : ""].filter(Boolean),
943943
category: sub === "auto" || sub === "close" ? "write" : "analysis",
944-
relatedCommands: ["perp arb rates", "perp arb scan", "perp gap show"],
944+
relatedCommands: ["perp arb scan", "perp arb scan", "perp gap show"],
945945
};
946946
} else if (category === "bridge") {
947947
explanation = {
@@ -1037,7 +1037,7 @@ server.tool(
10371037
parameters: [],
10381038
risks: [],
10391039
category: "read",
1040-
relatedCommands: ["perp funding rates", "perp arb rates"],
1040+
relatedCommands: ["perp funding rates", "perp arb scan"],
10411041
};
10421042
} else if (category === "backtest") {
10431043
explanation = {
@@ -1249,7 +1249,7 @@ server.resource(
12491249
arb: {
12501250
description: "Funding rate arbitrage & basis trading",
12511251
subcommands: {
1252-
rates: { usage: "perp arb rates", description: "Compare funding rates" },
1252+
rates: { usage: "perp arb scan", description: "Compare funding rates" },
12531253
scan: { usage: "perp arb scan --min <bps>", description: "Find arb opportunities" },
12541254
funding: { usage: "perp arb funding", description: "Detailed funding analysis" },
12551255
dex: { usage: "perp arb dex", description: "HIP-3 cross-dex arb" },
@@ -1388,7 +1388,7 @@ server.resource(
13881388
deposit: { usage: "perp deposit <exchange> <amount>", description: "Deposit USDC to exchange" },
13891389
withdraw: { usage: "perp withdraw <exchange> <amount>", description: "Withdraw USDC from exchange" },
13901390
portfolio: { usage: "perp portfolio", description: "Cross-exchange portfolio summary" },
1391-
status: { usage: "perp status", description: "Full account overview" },
1391+
status: { usage: "perp portfolio", description: "Full account overview" },
13921392
health: { usage: "perp health", description: "Exchange connectivity check" },
13931393
settings: {
13941394
description: "CLI settings",

0 commit comments

Comments
 (0)