Our future generation platform is in closed beta. During the beta, expect some rough edges, broken windows overlooking blue sky vistas, and regularly scheduled changes.

Already signed up? Great! You can ignore this.
Need to sign up? Apply to join the beta.

Developing locally

As you're developing your Run On Slack app, you can see your changes propagated to your workspace in real-time by using slack run.

Using slack run

When you execute slack run from the root directory of a Run On Slack project, the CLI will start a local development server and create a development version of your app in the workspace that your CLI is logged in to.

To check which workspace your CLI is logged in to, run slack auth list. The workspace with the ACTIVE label next to it is the one where slack run will run your app.

You'll know your development server is started when your terminal says the following:

Connected, awaiting events

Interacting with your app in development mode

Today, you can execute Run On Slack functions from the Global Shortcuts menu.

Search for the title of your function to execute a specific function, or search for the name of your app to show all the Run On Slack functions for your app.

You will know this is a development version of your app because the app name will have (dev) appended to it.

Every time you start a local development server with slack run, a new dev app will be created in the workspace you choose.

To turn off the development server, use Ctrl+C. This uninstalls and removes the dev version of your app in your workspace.

Note that while you're working in local development mode, no one else will be able to see or interact with your app except for you.

Using environment variables

You can use environment variables that are accessible via the env helper in your Run On Slack functions.

When developing locally, environment variables present in a .env file at the root of your project will be made available via the env helper in your Run On Slack functions.

For example, given the following .env file:


We can retrieve the MYCORP_API_TOKEN environment variable in our Run On Slack functions like this:

import type { FunctionHandler } from "deno-slack-sdk/types.ts";

const get_some_info: FunctionHandler<any, any> = async ({ inputs, env }) => {
  const token = env['MYCORP_API_TOKEN']; // Retrieve the environment variable
  // ...

When you are ready to deploy your application to production, use var add to set environment variables; the .env will not be used when you run slack deploy. Environment variables added via the var command are also made available via the env helper in Run On Slack functions.