Create or remove an app

Verify workspace authentication

Before you can create (or remove) an app, ensure your CLI is authenticated into the workspace you want to develop in. You can do so with the slack auth list command:

$ slack auth list 

ACTIVE  myworkspace (Team ID: T123456789)
User ID: U123456789
Last update: 2022-03-24 18:20:47 -07:00

To change your active workspace authorization run slack login

Look for the ACTIVE label next to your desired workspace. In the above example, myworkspace is ready to be used.

Create an app

With your CLI authenticated into the workspace you want to develop in, the next step is to scaffold an app with the slack create command:

$ slack create my-app

The above command will scaffold a new app called my-app in a directory with the same name. If you don't pass an app name, slack will scaffold an app with a random alphanumeric name.

You will be presented with three options to build from:

If you'd like to build from a specific sample app, see Create an app from a template below.
? Select a template to build from: [Use arrows to move]

> Issue submission (default sample)
  Basic app that demonstrates an issue submission workflow

  Scaffolded project
  Solid foundation that includes a Slack datastore

  Blank project
  A, well.. blank project

  View more samples

  Guided tutorials can be found at api.slack.com/automation/samples

Once you select an option the Slack CLI will get you set up for success.

$ slack create my-app

βš™οΈ  Creating a new Slack app in ~/programming/my-app

πŸ“¦ Installed project dependencies

✨ my-app successfully created

🧭 Explore the documentation to learn more
   Read the README.md or peruse the docs over at api.slack.com/automation
   Find available commands and usage info with `slack help`

πŸ“‹ Follow the steps below to begin development
   Change into your project directory with `cd my-app`
   Develop locally and see changes in real-time with `slack run`
   When you're ready to deploy for production use `slack deploy`
   Create a trigger to invoke your workflows `slack trigger create`

After creating an app, don't forget to cd into your app project's directory.

➑️ To keep building your own app, learn about your app's manifest in the manifest section.

‡️ To use a sample app as a template instead, read on!

Create an app from a template

We have a collection of sample apps containing a bevy of use cases. Find one particularly suited for your needs? Great! You can use it as a template to build from.

Create an app from a template by using the create command with the --template (or -t) flag and passing the link to the template's Github repo.

For example, the following command creates an app using our Welcome Bot app as a template:

slack create my-welcome-bot-app -t https://github.com/slack-samples/deno-welcome-bot

Create an app from a specific branch

Use a specific branch of a template repo by using the --branch (or -b) flag and passing the name of a branch:

slack create my-welcome-bot-app -t https://github.com/slack-samples/deno-welcome-bot -b main

Remove an app

Uninstall an app from your workspace

All good things must come to an end. You can uninstall your app if you need to remove an app from a workspace, change app permissions, or delete the app in its entirety. To uninstall an app using the CLI, use the slack uninstall command. Then, choose the workspace you want to remove the app from.

Uninstalling your app permanently deletes all of its data
Your app's related workflows, functions, and datastores will also be deleted. This decision is final and cannot be undone.
Choose a workspace  my-workspace T123ABC456
   my-app U123ABC456

❗ Danger zone! Uninstalling your app will also delete:
  - the app, workflows, and functions from this workspace
  - all app data and datastores from this workspace

❓ Are you sure you want to uninstall? Yes

🏠 Workspace uninstall
   Uninstalled the app "my-app" from workspace "workspace"

πŸ“š App Manifest
   Deleted the app manifest for "my-app" from workspace "workspace"

🏘️ Installed Workspaces
   There are no workspaces with the app installed

Onward

Your wish is our command! For information about other actions you can perform from the CLI, refer to the CLI quick reference and Commands.

Check out more about how to configure your app via the manifest. You can also start building functions to perform some logic, chain them together in workflows, and create triggers to invoke those workflows.

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.