Chat 1

Slack CLI x Slack API – Your Interface for the Future

Slack_CLI_Slack_API-Your_Interface_for_the_Future

Share

The Slack CLI is a complimentary tool to the Slack API, making it easier to build, test, update, and maintain apps on the Slack Platform. Using both these interfaces gives me the capability to innovate quickly without getting stuck in the plumbing of configuration and setup.  

A while ago, I wrote a blog post about how to use the Slack CLI to code apps, mentioning that using the CLI makes my work easier. I also said that using it was a gift from past me to future me. Consider that post a gift from past me to current you. Now you’re back here, ready to create a new app. 

Let’s do a review: Using the Slack CLI helps me create more sophisticated and durable apps. It also provides me with out of the box capabilities for updates and maintenance requirements. This tool makes the entire process easier from the beginning through the entire development lifecycle. 

I can make ongoing updates as I work and make it so that I can focus on the innovating parts, not the configuration parts. It also makes it easier to test, deploy, and iterate rapidly with access to a diverse array of APIs. Additionally, since the future is now, using the CLI also helps me create apps with AI integrations that are interactive, context-aware, and sophisticated. Again, more innovating, less configuring. 

Now that you’re invested in using the CLI, let’s get started. First, you’ll need to have created a sandbox environment with the Slack API. This sandbox environment will be where you’ll authenticate your app via the CLI and where you’ll test your app before shipping to production. If you haven’t done this already, here’s a walkthrough of the process. 

To get started, go to your terminal and install the Slack CLI via either MacOS / Linux or Windows. You can see for yourself how easy it is to set up a new Slack app and if you’re a visual learner, here is a demo video

Note, for you Windows users out there: PowerShell is required for installing the Slack CLI on Windows machines; an alternative shell will not work.

Now you’re set up to combine the powers of the Slack CLI and Slack API. In your terminal, run `slack login` for your sandbox org. This will give you the process for authorizing your app in your terminal via your Slack workspace. And that’s it! 

It took you longer to read this post than it does to set up a Slack development environment. But I’m glad you read it!

What’s next? Check out our post about going “From Zero to Bolt” in creating your own app with the Bolt framework. If you’re interested in adding your app to the Slack Marketplace, guides to doing that can be found here. And, as always, the developer docs are here to help!

More Reads