Skip to content

Commit c851348

Browse files
committed
chore: prepare release for vpatch
1 parent 0a13fb7 commit c851348

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

cli/commands.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,12 @@ function proxyToOriginal(args) {
252252
// CLI command handler
253253
async function main() {
254254
const [command, ...args] = process.argv.slice(2);
255-
const advancedCommands = ['test', 'benchmark', 'analytics', 'status', 'config', 'health', 'update'];
255+
const advancedCommands = ['test', 'benchmark', 'analytics', 'status', 'config', 'health', 'update', 'help', 'version', '-v', '--version', '--help', '-h'];
256256

257-
// If it's an advanced command or no command is given
258-
if (advancedCommands.includes(command) || !command || command === '--help' || command === '-h') {
257+
// Check if it's an advanced command, help/version flag, or no command at all
258+
const isAdvancedOrHelp = advancedCommands.includes(command) || !command;
259+
260+
if (isAdvancedOrHelp) {
259261
switch (command) {
260262
case 'update':
261263
console.log(chalk.blue('🔄 Checking for updates and updating...'));
@@ -272,6 +274,13 @@ async function main() {
272274
});
273275
break;
274276

277+
case 'version':
278+
case '-v':
279+
case '--version':
280+
const packageJson = require('../package.json');
281+
console.log(chalk.blue(`v${packageJson.version}`));
282+
break;
283+
275284
case 'test':
276285
const provider = args[0];
277286
const model = args[1];
@@ -331,7 +340,8 @@ async function main() {
331340
break;
332341

333342
default:
334-
console.log(chalk.blue('Claude Code Router - Advanced CLI (v1.3.0)'));
343+
// Handles 'help', '--help', '-h' and empty command
344+
console.log(chalk.blue('Claude Code Router - Advanced CLI (v1.3.1)'));
335345
console.log(chalk.gray('─'.repeat(45)));
336346

337347
console.log(chalk.yellow('🚀 Advanced CLI Tools:'));

0 commit comments

Comments
 (0)