The command line interface allows you to interact with your apps via, you guessed it, the command line. Using the main command
slack, you can create, run, and deploy apps, as well as create triggers, query datastores, and more.
✨ To check out more commands, head over to commands page.
The command line interface is meant to make the process of creating new apps, running them, and deploying them easier. Binaries are available for several platforms.
slack CLI is currently at version v1.20.0. See the changelog for details.
The apps that you create with the CLI are Deno projects, so Deno is a prerequisite. If you do not have Deno installed, please do that first.
slack binary in path?
If you happen to 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.
Use the Slack CLI in tandem with our SDK to access our API, additional documentation, and code libraries.
Click here to see version 1.6.0 on GitHub.
After you download the CLI, you'll need to authorize the CLI in your workspace. Follow the Quickstart guide to set up authorization and to begin building your first app.
Once a day, the CLI checks for updates after running any command. When an update is available, a notification will be displayed with a link where you can find and download the new version.
Update notifications can be disabled using a command-line flag or an environment variable. When running any command, you can append the
-s flag. Alternatively, you can set the
SLACK_SKIP_UPDATE environment variable and assign it any value.
⤵️ For more details about how to use flags, read on!
||Slack API host (default:
||Ignore warnings and continue executing command|
||User the local run app created by the run command|
||Use promptless version of command, if supported|
||Project's runtime language:
||Skip checking for the latest version of the CLI|
||Use the Slack Dev API (
||Set to print debug logging. When used with the validate command, you will be prompted to choose an AppID to validate against.|
||Set a specific workspace by domain name|
In addition to being useful for setting up new projects and for local development, the CLI can be integrated into test and deployment pipelines for continuous integration and continuous deployment (CI/CD) and other "headless" automation.
Running in a headless mode first requires authorization using the
--auth flag, and passing along a user token. The token, however, will require implementing logic to continually rotate it, since tokens obtained via
slack login will expire after a certain amount of time. This will generate the authorization credentials required in a
~/.slack directory. Removing this directory will remove the authorization.
Once authorized, any
slack command can be run as normal, and will use the established authorization.
✨ To start creating an app, check out the create or remove an app page.
Have 2 minutes to provide some feedback?
We'd love to hear about your experience building modular Slack apps. Please complete our short survey so we can use your feedback to improve.