update cli help text

This commit is contained in:
musi
2025-07-21 15:34:39 +08:00
parent 09c3f0ccc6
commit 194a664f20

View File

@@ -6,7 +6,7 @@ import { cleanupPidFile, isServiceRunning } from "./utils/processCheck";
import { version } from "../package.json"; import { version } from "../package.json";
import { spawn } from "child_process"; import { spawn } from "child_process";
import { PID_FILE, REFERENCE_COUNT_FILE } from "./constants"; import { PID_FILE, REFERENCE_COUNT_FILE } from "./constants";
import { existsSync, readFileSync } from "fs"; import fs, { existsSync, readFileSync } from "fs";
import {join} from "path"; import {join} from "path";
const command = process.argv[2]; const command = process.argv[2];
@@ -15,10 +15,11 @@ const HELP_TEXT = `
Usage: ccr [command] Usage: ccr [command]
Commands: Commands:
start Start service start Start server
stop Stop service stop Stop server
status Show service status restart Restart server
code Execute code command status Show server status
code Execute claude command
-v, version Show version information -v, version Show version information
-h, help Show help information -h, help Show help information
@@ -58,7 +59,7 @@ async function main() {
cleanupPidFile(); cleanupPidFile();
if (existsSync(REFERENCE_COUNT_FILE)) { if (existsSync(REFERENCE_COUNT_FILE)) {
try { try {
require("fs").unlinkSync(REFERENCE_COUNT_FILE); fs.unlinkSync(REFERENCE_COUNT_FILE);
} catch (e) { } catch (e) {
// Ignore cleanup errors // Ignore cleanup errors
} }