From be1efa426509a701fd2c222de4fbf1f6edd2a76d Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Thu, 21 May 2026 15:13:59 -0700 Subject: [PATCH 1/4] docs: clarify update check behavior in non-interactive environments Document that `slack upgrade` runs the update check but skips the auto-update prompt when no TTY is attached, and that --skip-update / SLACK_SKIP_UPDATE fully suppress checks on other commands. Adds a non-TTY note to the upgrade command's long description, expands the "Version update notifications" section, and links a new "Disabling update checks" subsection from the CI/CD guide. --- cmd/upgrade/upgrade.go | 5 +++++ docs/guides/authorizing-the-slack-cli.md | 4 ++++ docs/guides/setting-up-ci-cd-with-the-slack-cli.md | 4 ++++ docs/reference/commands/slack_upgrade.md | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/cmd/upgrade/upgrade.go b/cmd/upgrade/upgrade.go index 325fdad9..adf9a584 100644 --- a/cmd/upgrade/upgrade.go +++ b/cmd/upgrade/upgrade.go @@ -40,6 +40,11 @@ func NewCommand(clients *shared.ClientFactory) *cobra.Command { "", "If there are any, then you will be prompted to upgrade", "", + "In non-interactive environments (CI/CD, scripts, piped output),", + "update checks still run but the auto-update prompt is skipped.", + "To suppress update checks entirely on other commands, use", + "--skip-update or set SLACK_SKIP_UPDATE.", + "", fmt.Sprintf(`The changelog can be found at {{LinkText "%s"}}`, changelogURL), }, "\n"), Example: style.ExampleCommandsf([]style.ExampleCommand{ diff --git a/docs/guides/authorizing-the-slack-cli.md b/docs/guides/authorizing-the-slack-cli.md index a49a9aeb..47e8f226 100644 --- a/docs/guides/authorizing-the-slack-cli.md +++ b/docs/guides/authorizing-the-slack-cli.md @@ -63,6 +63,10 @@ Once a day, the Slack CLI checks for updates after running any command. When an Update notifications can be disabled using a command-line flag or an environment variable. When running any command, you can append the `--skip-update` or `-s` flag. Alternatively, you can set the `SLACK_SKIP_UPDATE` environment variable and assign it any value. +When the CLI runs in a non-interactive environment (no TTY) - for example, inside a CI/CD pipeline or when output is piped - the update check still runs but the auto-update confirmation prompt is skipped. Notification text may still appear in command output. To keep automation output clean, suppress the check entirely with `--skip-update` or `SLACK_SKIP_UPDATE`. + +Note: `--skip-update` and `SLACK_SKIP_UPDATE` are intentionally ignored when running `slack upgrade` directly, since that command's purpose is to check for updates. + ## CI/CD authorization {#ci-cd} Setting up a CI/CD pipeline requires authorization using a service token. Service tokens are **long-lived, non-rotatable user tokens** — they won't expire, so they can be used to perform any Slack CLI action without the need to refresh tokens. diff --git a/docs/guides/setting-up-ci-cd-with-the-slack-cli.md b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md index c5c194d9..3e1ab74c 100644 --- a/docs/guides/setting-up-ci-cd-with-the-slack-cli.md +++ b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md @@ -58,6 +58,10 @@ You'll also need to accommodate requests from your network to a variety of hosts In addition, you'll need to obtain a service token to authorize your CI/CD setup. Refer to [CI/CD authorization](/tools/slack-cli/guides/authorizing-the-slack-cli#ci-cd) for more details about obtaining, using, and revoking service tokens. +### Disabling update checks {#disable-updates} + +In CI/CD pipelines, set `SLACK_SKIP_UPDATE=1` (or pass `--skip-update` on each command) to prevent the CLI from checking for new versions on every run. See [Version update notifications](/tools/slack-cli/guides/authorizing-the-slack-cli#version-updates) for details. + Once you've done those things, you're ready to get started! Let's walk through an example. Let's take a look at the [Virtual Running Buddies sample app](https://github.com/slack-samples/deno-virtual-running-buddies). diff --git a/docs/reference/commands/slack_upgrade.md b/docs/reference/commands/slack_upgrade.md index 19b0bec7..7f1d8753 100644 --- a/docs/reference/commands/slack_upgrade.md +++ b/docs/reference/commands/slack_upgrade.md @@ -8,6 +8,11 @@ Checks for available updates to the CLI or the SDKs of a project If there are any, then you will be prompted to upgrade +In non-interactive environments (CI/CD, scripts, piped output), +update checks still run but the auto-update prompt is skipped. +To suppress update checks entirely on other commands, use +--skip-update or set SLACK_SKIP_UPDATE. + The changelog can be found at [https://docs.slack.dev/changelog](https://docs.slack.dev/changelog) ``` From 214884c78d48159ec914094aa131e097e15004f7 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Thu, 21 May 2026 15:28:07 -0700 Subject: [PATCH 2/4] Update docs/guides/authorizing-the-slack-cli.md Co-authored-by: Luke Russell <31357343+lukegalbraithrussell@users.noreply.github.com> --- docs/guides/authorizing-the-slack-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/authorizing-the-slack-cli.md b/docs/guides/authorizing-the-slack-cli.md index 47e8f226..91a07eaa 100644 --- a/docs/guides/authorizing-the-slack-cli.md +++ b/docs/guides/authorizing-the-slack-cli.md @@ -63,7 +63,7 @@ Once a day, the Slack CLI checks for updates after running any command. When an Update notifications can be disabled using a command-line flag or an environment variable. When running any command, you can append the `--skip-update` or `-s` flag. Alternatively, you can set the `SLACK_SKIP_UPDATE` environment variable and assign it any value. -When the CLI runs in a non-interactive environment (no TTY) - for example, inside a CI/CD pipeline or when output is piped - the update check still runs but the auto-update confirmation prompt is skipped. Notification text may still appear in command output. To keep automation output clean, suppress the check entirely with `--skip-update` or `SLACK_SKIP_UPDATE`. +When the CLI runs in a non-interactive environment, such as inside a CI/CD pipeline or when the output is piped, the update check runs without the auto-update confirmation prompt. The notification text may still appear in command output, however. You can suppress the check entirely with the `--skip-update` flag or `SLACK_SKIP_UPDATE` environment variable to keep the automation output clean. Note: `--skip-update` and `SLACK_SKIP_UPDATE` are intentionally ignored when running `slack upgrade` directly, since that command's purpose is to check for updates. From 00b9ba9c9f363daaf1fce004c579b91ec77197e3 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Thu, 21 May 2026 15:28:46 -0700 Subject: [PATCH 3/4] Update docs/guides/authorizing-the-slack-cli.md Co-authored-by: Luke Russell <31357343+lukegalbraithrussell@users.noreply.github.com> --- docs/guides/authorizing-the-slack-cli.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/authorizing-the-slack-cli.md b/docs/guides/authorizing-the-slack-cli.md index 91a07eaa..0490b62b 100644 --- a/docs/guides/authorizing-the-slack-cli.md +++ b/docs/guides/authorizing-the-slack-cli.md @@ -65,7 +65,8 @@ Update notifications can be disabled using a command-line flag or an environment When the CLI runs in a non-interactive environment, such as inside a CI/CD pipeline or when the output is piped, the update check runs without the auto-update confirmation prompt. The notification text may still appear in command output, however. You can suppress the check entirely with the `--skip-update` flag or `SLACK_SKIP_UPDATE` environment variable to keep the automation output clean. -Note: `--skip-update` and `SLACK_SKIP_UPDATE` are intentionally ignored when running `slack upgrade` directly, since that command's purpose is to check for updates. +:::info[The `--skip-update` flag and the `SLACK_SKIP_UPDATE` environment variable are intentionally ignored when running the `slack upgrade` command directly, since that command's purpose is to check for updates. +::: ## CI/CD authorization {#ci-cd} From db0ad1b84a93008c7df731716fa5479033940fac Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Thu, 21 May 2026 15:29:16 -0700 Subject: [PATCH 4/4] Update docs/guides/setting-up-ci-cd-with-the-slack-cli.md Co-authored-by: Luke Russell <31357343+lukegalbraithrussell@users.noreply.github.com> --- docs/guides/setting-up-ci-cd-with-the-slack-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/setting-up-ci-cd-with-the-slack-cli.md b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md index 3e1ab74c..664bd704 100644 --- a/docs/guides/setting-up-ci-cd-with-the-slack-cli.md +++ b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md @@ -60,7 +60,7 @@ In addition, you'll need to obtain a service token to authorize your CI/CD setup ### Disabling update checks {#disable-updates} -In CI/CD pipelines, set `SLACK_SKIP_UPDATE=1` (or pass `--skip-update` on each command) to prevent the CLI from checking for new versions on every run. See [Version update notifications](/tools/slack-cli/guides/authorizing-the-slack-cli#version-updates) for details. +In CI/CD pipelines, set a `SLACK_SKIP_UPDATE` environment variable to `1` (or pass `--skip-update` on each command) to prevent the CLI from checking for new versions on every run. See [Version update notifications](/tools/slack-cli/guides/authorizing-the-slack-cli#version-updates) for details. Once you've done those things, you're ready to get started! Let's walk through an example.