From 21b83e590728914205cfc1c2a2a274a440b3246b Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Thu, 16 Jul 2026 00:00:51 -0700 Subject: [PATCH] chore: add Slack CLI support Add the Slack CLI hooks config and a "Using Slack CLI" README section so this sample can be created and run with `slack create` / `slack run`, matching the other CLI-enabled Bolt samples. Co-Authored-By: Claude --- .slack/.gitignore | 2 ++ .slack/hooks.json | 5 +++++ README.md | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .slack/.gitignore create mode 100644 .slack/hooks.json diff --git a/.slack/.gitignore b/.slack/.gitignore new file mode 100644 index 0000000..973ba60 --- /dev/null +++ b/.slack/.gitignore @@ -0,0 +1,2 @@ +apps.dev.json +cache/ diff --git a/.slack/hooks.json b/.slack/hooks.json new file mode 100644 index 0000000..ce474c9 --- /dev/null +++ b/.slack/hooks.json @@ -0,0 +1,5 @@ +{ + "hooks": { + "get-hooks": "python3 -m slack_cli_hooks.hooks.get_hooks" + } +} diff --git a/README.md b/README.md index 4c97d4b..6a1b8ca 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,35 @@ Inspired by [ChatGPT-in-Slack](https://github.com/seratch/ChatGPT-in-Slack/tree/ Before getting started, make sure you have a development workspace where you have permissions to install apps. If you don’t have one setup, go ahead and [create one](https://slack.com/create). ## Installation +### Using Slack CLI + +Install the latest version of the Slack CLI for your operating system: + +- [Slack CLI for macOS & Linux](https://docs.slack.dev/tools/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux/) +- [Slack CLI for Windows](https://docs.slack.dev/tools/slack-cli/guides/installing-the-slack-cli-for-windows/) + +You'll also need to log in if this is your first time using the Slack CLI. + +```sh +slack login +``` + +#### Initializing the project + +```sh +slack create bolt-python-ai-chatbot --template slack-samples/bolt-python-ai-chatbot +cd bolt-python-ai-chatbot +``` + +#### Running the app + +```sh +slack run +``` + +
+

Using Terminal

+ #### Prerequisites * To use the OpenAI and Anthropic models, you must have an account with sufficient credits. * To use the Vertex models, you must have [a Google Cloud Provider project](https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal#expandable-1) with sufficient credits. @@ -77,7 +106,7 @@ Unlock the OpenAI models from your OpenAI account dashboard by clicking [create export OPENAI_API_KEY= ``` -### Setup Your Local Project +#### Setup Your Local Project ```zsh # Clone this project onto your machine git clone https://github.com/slack-samples/bolt-python-ai-chatbot.git @@ -105,6 +134,8 @@ ruff check . ruff format . ``` +
+ ## Project Structure ### `manifest.json`