Skip to main content

Installing the Slack CLI for Windows

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

PowerShell is required for installing the Slack CLI on Windows machines; an alternative shell will not work.

Run the automated installer from Windows PowerShell:

irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 | iex

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, use the -Alias flag as described within the Optional: Customize installation using flags section.

Optional: customize installation using flags

There are several flags available to customize the installation. Since flags cannot be passed to remote scripts, you must first download the automated installer to a local file:

irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -outfile 'install-windows.ps1'

The available flags are:

FlagDescriptionExample
-AliasInstalls the Slack CLI as the provided alias-Alias slackcli will create a binary named slackcli.exe and add it to your path
-VersionInstalls a specific version of the Slack CLI-Version 2.1.0 installs version 2.1.0 of the Slack CLI
-SkipGitIf true, will not attempt to install Git when Git is not present-SkipGit $true skips installing git if Git is not found

You can also see all available flags by passing -? to the automated installer:

.\install-windows.ps1 -?

Here's an example invocation using every flag:

.\install-windows.ps1 -Version 2.1.0 -Alias slackcli -SkipGit $true
Troubleshooting

Errors

Error: Not working? You may need to update your session's Language Mode.

Solution: For the installer to work correctly, your PowerShell session's language mode will need to be set to FullLanguage. To check your session's language mode, run the following in your PowerShell window: ps $ExecutionContext.SessionState.LanguageMode. To run the installer, your session's language mode will need to be FullLanguage. If it's not, you can set your session's language mode to FullLanguage with the following command: ps $ExecutionContext.SessionState.LanguageMode = "FullLanguage"

Installing PowerShell

Run the following command to install PowerShell 7 on your machine:

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"

The following articles may also be helpful should you run into any issues: