Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy
Rust
hide demo command from help
Raine Virta4ef922711d62
diff --git a/src/main.rs b/src/main.rsindex 6ce6794..ed905c5 100644--- a/src/main.rs+++ b/src/main.rs@@ -29,7 +29,9 @@ struct Cli {#[derive(Debug, Subcommand)]enum Commands {+ /// Print version informationVersion,+ /// Start the proxy server and monitorServe {#[arg(long)]port: Option<u16>,@@ -37,23 +39,29 @@ enum Commands {no_monitor: bool,},/// Open the monitor TUI with mock data and no proxy server+ #[command(hide = true)]Demo,+ /// List supported provider modelsModels {#[arg(long)]full: bool,},+ /// Manage Codex authenticationCodex {#[command(subcommand)]command: ProviderGroup,},+ /// Manage Kimi authenticationKimi {#[command(subcommand)]command: ProviderGroup,},+ /// Manage Cursor authenticationCursor {#[command(subcommand)]command: ProviderGroup,},+ /// Manage Grok authenticationGrok {#[command(subcommand)]command: ProviderGroup,diff --git a/tests/cli.rs b/tests/cli.rsindex f3048fb..1cc3e79 100644--- a/tests/cli.rs+++ b/tests/cli.rs@@ -33,13 +33,26 @@ fn models_prints_all_providers() -> Result<(), Box<dyn std::error::Error>> {}#[test]-fn help_discovers_serverless_tui_demo() -> Result<(), Box<dyn std::error::Error>> {- Command::cargo_bin("claude-code-proxy")?- .arg("--help")- .assert()- .success()- .stdout(contains("demo"))- .stdout(contains("mock data and no proxy server"));+fn help_describes_visible_commands_and_hides_demo() -> Result<(), Box<dyn std::error::Error>> {+ let mut cmd = Command::cargo_bin("claude-code-proxy")?;+ cmd.arg("--help");+ let output = cmd.output()?;+ assert!(output.status.success());++ let stdout = String::from_utf8(output.stdout)?;+ for description in [+ "Print version information",+ "Start the proxy server and monitor",+ "List supported provider models",+ "Manage Codex authentication",+ "Manage Kimi authentication",+ "Manage Cursor authentication",+ "Manage Grok authentication",+ ] {+ assert!(stdout.contains(description), "missing: {description}");+ }+ assert!(!stdout.contains("demo"));+ assert!(!stdout.contains("mock data and no proxy server"));Ok(())}