From e59aa0c93fa101b815d64463ac522b5970c1a848 Mon Sep 17 00:00:00 2001 From: Jamil Date: Mon, 10 Feb 2025 14:38:31 -0800 Subject: [PATCH] chore: Hide internal commands/flags in headless clients (#8055) These are just noise for the user and only used internally in Firezone. --- rust/headless-client/src/main.rs | 5 +++-- .../src/app/kb/client-apps/linux-client/readme.mdx | 3 --- .../kb/client-apps/windows-headless-client/readme.mdx | 11 ----------- website/src/components/Changelog/Headless.tsx | 7 ++++++- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/rust/headless-client/src/main.rs b/rust/headless-client/src/main.rs index 7ae82eac0..8ecb29660 100644 --- a/rust/headless-client/src/main.rs +++ b/rust/headless-client/src/main.rs @@ -63,13 +63,13 @@ struct Cli { /// /// Returns 1 if the configuration is wrong. Mostly non-destructive but may /// write a device ID to disk if one is not found. - #[arg(long)] + #[arg(long, hide = true)] check: bool, /// Connect to the Firezone network and initialize, then exit /// /// Use this to check how fast you can connect. - #[arg(long)] + #[arg(long, hide = true)] exit: bool, /// Friendly name for this client to display in the UI. @@ -102,6 +102,7 @@ impl Cli { } #[derive(clap::Subcommand, Clone, Copy)] +#[clap(hide = true)] enum Cmd { Standalone, } diff --git a/website/src/app/kb/client-apps/linux-client/readme.mdx b/website/src/app/kb/client-apps/linux-client/readme.mdx index 8ca12d42e..aefb2d9c2 100644 --- a/website/src/app/kb/client-apps/linux-client/readme.mdx +++ b/website/src/app/kb/client-apps/linux-client/readme.mdx @@ -153,12 +153,9 @@ sudo mv /etc/resolv.conf.before-firezone /etc/resolv.conf Usage: firezone-headless-client [OPTIONS] [COMMAND] Commands: - standalone help Print this message or the help of the given subcommand(s) Options: - --check - Check the configuration and return 0 before connecting to the API --token-path A filesystem path where the token can be found [env: FIREZONE_TOKEN_PATH=] [default: /etc/dev.firezone.client/token] --firezone-name diff --git a/website/src/app/kb/client-apps/windows-headless-client/readme.mdx b/website/src/app/kb/client-apps/windows-headless-client/readme.mdx index 54a83f7e6..3b7f098eb 100644 --- a/website/src/app/kb/client-apps/windows-headless-client/readme.mdx +++ b/website/src/app/kb/client-apps/windows-headless-client/readme.mdx @@ -92,7 +92,6 @@ Error: Command-line args for the headless Client Usage: firezone-client-headless-windows_1.4.2_x86_64.exe [OPTIONS] [COMMAND] Commands: - standalone help Print this message or the help of the given subcommand(s) Options: @@ -114,16 +113,6 @@ Options: [env: MAX_PARTITION_TIME=] - --check - Check the configuration and return 0 before connecting to the API - - Returns 1 if the configuration is wrong. Mostly non-destructive but may write a device ID to disk if one is not found. - - --exit - Connect to the Firezone network and initialize, then exit - - Use this to check how fast you can connect. - --firezone-name Friendly name for this client to display in the UI diff --git a/website/src/components/Changelog/Headless.tsx b/website/src/components/Changelog/Headless.tsx index 0a2f7b201..850bcb87e 100644 --- a/website/src/components/Changelog/Headless.tsx +++ b/website/src/components/Changelog/Headless.tsx @@ -31,7 +31,12 @@ export default function Headless({ title }: { title: string }) { return ( {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} - + + + Hides the --check and --exit CLI options + from the help output. These are only used internally. + + Publishes the headless client for Windows.