Installing the Slack CLI for Mac & Linux
The Slack CLI is a set of tools critical to building workflow apps. This is your one-stop shop for those tools.
✨ If you've not used the Slack CLI before, we recommend following our Deno Slack SDK getting started guide instead. We'll still get your wagon loaded up before you depart for the trail, but we'll also give you some additional guidance.
⤵️ If you need to authorize the Slack CLI, go here.
The minimum required Slack CLI version for Enterprise Grid as of September 19th, 2023 is v2.9.0
. If you attempt to log in with an older version, you'll receive a cli_update_required
error from the Slack API. Run slack upgrade
to get the latest version.
- Automated Installation
- Manual Installation
Run the automated installer from your terminal window:
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
This will install the Slack CLI and all required dependencies, including Deno, the runtime environment for workflow apps. If you have VSCode installed, the VSCode Deno extension will be installed.
Optional: Use an alias for the Slack CLI binary
Optional: customize installation using flags
Troubleshooting
1. Download and install Deno. Refer to Install Deno for more details.
2. Verify that Deno is installed and in your path.
The minimum version of Deno runtime required is currently version 1.37.0.
$ deno --version
deno 1.46.2* (release, x86_64-apple-darwin)
v8 10.*
typescript 4.*
3. Download and install
Git, a
dependency of the slack
CLI.
4. Download the slack
CLI installer for your environment.
5. Add the slack
CLI to your path.
Existing slack
binary in path?
If you have another CLI tool in your path called slack
, we recommend renaming our slack binary to a different name before adding it to your path. See the Automated installation tab for more details.
6. Verify that slack
is installed and in your path.
$ slack version
Using slack v3.1.0
7. Verify that all dependencies have been installed.
Run the following command:
$ slack doctor
A few notes about hooks
If you have upgraded your CLI version but your deno-slack-hooks
version is less than v1.3.0
, when running slack doctor
, you will see the following near the end of the output:
✔ Configurations (your project's CLI settings)
Project ID: 1a2b3c4d-ef5g-67hi-8j9k1l2m3n4o
✘ Runtime (foundations for the application)
Error: The `doctor` hook was not found (sdk_hook_not_found)
Suggestion: Ensure this hook is implemented in your `slack.json`
✔ Dependencies (requisites for development)
deno_slack_hooks: 1.2.3 → 1.3.0 (supported version)
In addition, if you attempt to run the slack run
command without this dependency installed, you will see a similar error in your console:
🚫 The `start` script was not found (sdk_hook_not_found)
💡 Suggestion
Hook scripts are defined in the Slack configuration file ('slack.json').
Every app requires a 'slack.json' file and you can find a working example at:
https://github.com/slack-samples/deno-starter-template/blob/main/slack.json
Ensure that deno-slack-hooks
is installed at the project level and that the version is not less than v1.3.0
.
8. Install the VSCode extension for Deno (recommended).