Skip to content

cli: answer --version and --help instead of starting the server - #74

Merged
CMGS merged 1 commit into
mainfrom
feat/cli-version
Sep 10, 2026
Merged

cli: answer --version and --help instead of starting the server#74
CMGS merged 1 commit into
mainfrom
feat/cli-version

Conversation

@CMGS

@CMGS CMGS commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

gw <anything> used to ignore its arguments and boot with the embedded config, so a version probe became a stray server. The binary now answers --version / -V with gw <version>, --help / -h with the usage line, and refuses any other argument (exit 1, usage on stderr). Nothing in the repo passes arguments to gw (Docker ENTRYPOINT ["/usr/local/bin/gw"], the deploy files and the bench scripts all run it bare), so running behavior is unchanged.

Also in this PR: the README quick start shows the flag, and docs/providers.md notes Moonshot's international endpoint (endpoint: https://api.moonshot.ai; keys are site-specific and kimi-k3 is only served there).

Gates on macOS: cargo fmt --all -- --check clean, cargo clippy --workspace --all-targets -- -D warnings clean, cargo test --workspace 597 passed / 0 failed (two new tests in crates/server/tests/cli.rs drive the built binary through CARGO_BIN_EXE_gw). CI covers Linux.

`gw <anything>` used to ignore its arguments and boot with the embedded
config; a version probe became a stray server. The binary now prints its
version for --version/-V, the usage line for --help/-h, and refuses any
other argument. docs: the Moonshot international endpoint for kimi-k3.
@CMGS
CMGS merged commit f68a20a into main Sep 10, 2026
2 checks passed
@CMGS
CMGS deleted the feat/cli-version branch September 10, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant