From 2160c66e209b7c40b19ebcf739af40dd2a4e08f2 Mon Sep 17 00:00:00 2001 From: Grraahaam <72856427+Grraahaam@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:15:19 +0200 Subject: [PATCH] doc(cli): improve --plain example + add --silent notice --- docs/cli/commands/secrets.mdx | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/cli/commands/secrets.mdx b/docs/cli/commands/secrets.mdx index 7428a84a1..03ebde1c0 100644 --- a/docs/cli/commands/secrets.mdx +++ b/docs/cli/commands/secrets.mdx @@ -93,11 +93,23 @@ $ infisical secrets ```bash # Example - infisical secrets --plain + infisical secrets --plain --silent ``` + + The `--silent` flag disables output of tip/info messages. Useful when running in scripts or CI/CD pipelines. + + ```bash + # Example + infisical secrets --silent + ``` + + Can be used inline to replace `INFISICAL_DISABLE_UPDATE_CHECK` + + + @@ -132,16 +144,30 @@ $ infisical secrets get DOMAIN PORT infisical secrets get FOO BAR --plain # Fetch a single value and assign it to a variable - API_KEY=$(infisical secrets get FOO --plain) + API_KEY=$(infisical secrets get FOO --plain --silent) ``` - When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK` env to `true`. This will help hide any CLI update messages and only show the secret value. + When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK=true` or add the `--silent` flag. This will help hide any CLI info/debug output and only show the secret value. + + The `--silent` flag disables output of tip/info messages. Useful when running in scripts or CI/CD pipelines. + + ```bash + # Example + infisical secrets get FOO --plain --silent + ``` + + Can be used inline to replace `INFISICAL_DISABLE_UPDATE_CHECK` + + + + Use `--plain` instead, as it supports single and multiple secrets. + Used to print the plain value of a single requested secret without any table style. Default value: `false` @@ -149,7 +175,7 @@ $ infisical secrets get DOMAIN PORT Example: `infisical secrets get DOMAIN --raw-value` - When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK` env to `true`. This will help hide any CLI update messages and only show the secret value. + When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK=true` or add the `--silent` flag. This will help hide any CLI info/debug output and only show the secret value.