Skip to content

Commit d78a886

Browse files
go
1 parent 5ee9e10 commit d78a886

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
sidebar_label: Developing locally
3+
slug: /tools/slack-cli/guides/slack-cli-local-development
4+
---
5+
6+
# Developing locally using the Slack CLI
7+
8+
The Slack CLI provides some features, and customization of said features, to streamline developing apps locally. This guide details those features.
9+
10+
## Configuring file watching and auto-restart
11+
12+
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.
13+
14+
For Bolt for Python projects, the Slack CLI watches all `.py` files in the root directory. For Bolt for JavaScript projects, the Slack CLI watches all `.js` files in the root directory.
15+
16+
For detailed configuration options, see the [hooks reference](/tools/slack-cli/reference/hooks#watch-configurations).
17+
18+
### Customizing watch paths
19+
20+
You can override the default watch paths in `.slack/hooks.json` if needed.
21+
22+
For example, if you're building an agent you'll likely want to include your system prompt and tool definitions:
23+
24+
```json
25+
{
26+
"config": {
27+
"watch": {
28+
"manifest": {
29+
"paths": ["manifest.json"]
30+
},
31+
"app": {
32+
"paths": ["app.js", "system-prompt.md", "tools/"],
33+
"filter-regex": "\\.(ts|js|md)$"
34+
}
35+
}
36+
}
37+
}
38+
```
39+
40+
This Bolt for JS example watches the following files and paths, while filtering out any files that aren't `.ts`, `.js`, and `.md` files within those paths:
41+
42+
- `app.js`, which is your main app file,
43+
- `system-prompt.md`, which is your agent's system prompt, and
44+
- `tools/`, which is your tool definition directory.
45+
46+
47+
A restart _clears application state_. This is usually desired! For example, when you update your agent's system prompt, you don't want it to remember the old behavior. Just be aware of this if you're testing workflows that require data to persist across multiple user interactions.
48+
49+
### Using a remote manifest
50+
51+
By default, the Slack CLI uses your local manifest and reinstalls the app if it changes. If you've created your manifest in App Settings, however, you'll have `manifest.source` set to `remote` in `.slack/config.json` and will need to manually reinstall the app if you change the manifest.

0 commit comments

Comments
 (0)