Skip to main content

Installing the Slack CLI for Mac & Linux

The Slack CLI is a useful tool for building Slack apps. This is your one-stop shop for installing this tool.

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 configure the command.

Runtime installations are left to the developer and depend on the app being built. For more information and next steps, review the quickstart guides:

Optional: use an alias for the Slack CLI binary

If you have another CLI tool in your path called slack, you can rename this slack binary to a different name to avoid errors during installation. The Slack CLI won't overwrite the existing one!

To do this, pass the -s argument and an alias to the automated installer:

curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s <your-preferred-alias>

The alias you use should come after any flags used in the installer. For example, if you use the version flag your installation script might look like this:

curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -v 2.1.0 <your-preferred-alias>
Optional: download a specific version

The latest Slack CLI version is installed by default, but a particular version can be pinned using the -v flag:

curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -v 2.1.0
Troubleshooting: command not found

After running the Slack CLI installation script the slack command might not be available in the current shell. The download has often succeeded but a symbolic link to the command needs to be added to your path.

Determine which shell you're using then update your shell profile with the following commands:

basename "$SHELL"
  • bash:

    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
  • fish:

    mkdir -p $HOME/.config/fish
    echo 'fish_add_path $HOME/.local/bin' >> $HOME/.config/fish/config.fish
    source $HOME/.config/fish/config.fish
  • zsh:

    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc

Once the profile is sourced, or a new shell is opened, the slack command should be available.