Skip to main content

Developing locally using the Slack CLI

The Slack CLI provides some features, and customization of said features, to streamline developing apps locally using slack run. This guide details those features.

Configuring file watching and auto-restart

The Slack CLI automatically watches your app files and restarts the server when they change. It also watches manifest.json and reinstalls the app when the manifest changes.

For Bolt for Python projects, the Slack CLI watches all .py files from the root directory.

For Bolt for JavaScript projects, the Slack CLI watches all .js files from the root directory.

View the hooks reference for detailed configuration options.

Customizing watch paths

You can override the default watch paths in .slack/hooks.json if so desired.

For example, if you want to watch for changes to JavaScript files in an src directory but not scripts use the following:

{
"config": {
"watch": {
"manifest": {
"paths": ["manifest.json"]
},
"app": {
"paths": ["src/"]
}
}
}
}

A restart clears application state. This is usually desired! Just be aware of this if you're testing workflows that require data to persist across multiple user interactions.

Using a remote manifest

By default, the Slack CLI uses your local manifest and reinstalls the app if it changes. If you manage your manifest in App Settings, however, you'll have manifest.source set to remote in .slack/config.json and will need to update the manifest in App Settings.