{"id":15714266,"url":"https://github.com/slackapi/python-slack-hooks","last_synced_at":"2025-09-10T04:06:01.268Z","repository":{"id":221046731,"uuid":"725668373","full_name":"slackapi/python-slack-hooks","owner":"slackapi","description":"Helper library implementing the contract between the Slack CLI and Bolt for Python","archived":false,"fork":false,"pushed_at":"2024-12-02T01:55:39.000Z","size":87,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-30T14:22:42.132Z","etag":null,"topics":["bolt","cli","python","python3","slack","slack-api","slack-cli"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/slack-cli-hooks/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slackapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T16:15:12.000Z","updated_at":"2024-12-02T01:55:42.000Z","dependencies_parsed_at":"2024-05-01T07:49:32.427Z","dependency_job_id":"0ee9e175-54ff-4972-a7a2-cb0719f3f0e4","html_url":"https://github.com/slackapi/python-slack-hooks","commit_stats":null,"previous_names":["slackapi/python-slack-hooks"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/python-slack-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261557,"owners_count":19281260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bolt","cli","python","python3","slack","slack-api","slack-cli"],"created_at":"2024-10-03T21:35:47.354Z","updated_at":"2025-08-09T20:24:21.097Z","avatar_url":"https://github.com/slackapi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePython Slack Hooks\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/slack-cli-hooks/\"\u003e\n        \u003cimg alt=\"Pypi - Badge\" src=\"https://img.shields.io/badge/pypi-slack--cli--hooks-green\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/slack-cli-hooks/\"\u003e\n        \u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/slack-cli-hooks\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/slackapi/python-slack-hooks\"\u003e\n        \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/gh/slackapi/python-slack-hooks\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://pypi.org/project/slack-cli-hooks/\"\u003e\n        \u003cimg alt=\"Python Versions\" src=\"https://img.shields.io/pypi/pyversions/slack-cli-hooks.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis library defines the contract between the\n[Slack CLI](https://tools.slack.dev/slack-cli/) and\n[Bolt for Python](https://slack.dev/bolt-python/).\n\n## Overview\n\nThis library enables inter-process communication between the [Slack CLI](https://tools.slack.dev/slack-cli/) and applications built with Bolt for Python.\n\nWhen used together, the CLI delegates various tasks to the Bolt application by invoking processes (\"hooks\") and then making use of the responses provided by each hook's `stdout`.\n\nFor a complete list of available hooks, read the [Supported Hooks](#supported-hooks) section.\n\n## Requirements\n\nThe latest minor version of [Bolt v1](https://pypi.org/project/slack-bolt/) is recommended.\n\n## Usage\n\nA Slack CLI-compatible Slack application includes a `./slack.json` file that contains hooks specific to that project. Each hook is associated with commands that are available in the Slack CLI. By default, `get-hooks` retrieves all of the [supported hooks](#supported-hooks) and their corresponding scripts as defined in this library.\n\nThe CLI will always use the version of the `python-slack-hooks` that is specified in the project's `requirements.txt`.\n\n### Supported Hooks\n\nThe hooks currently supported for use within the Slack CLI include `check-update`, `doctor`, `get-hooks`, `get-manifest`, and `start`:\n\n| Hook Name  | CLI Command  | File  |  Description  |\n| --- | --- | --- | --- |\n| `check-update` | `slack update` | [check_update.py](./slack_cli_hooks/hooks/check_update.py) | Checks the project's Slack dependencies to determine whether or not any libraries need to be updated. |\n| `doctor` | `slack doctor` | [doctor.py](./slack_cli_hooks/hooks/doctor.py) | Returns runtime versions and other system dependencies required by the application. |\n| `get-hooks` | All | [get_hooks.py](./slack_cli_hooks/hooks/get_hooks.py) | Fetches the list of available hooks for the CLI from this repository. |\n| `get-manifest` | `slack manifest` | [get_manifest.py](./slack_cli_hooks/hooks/get_manifest.py) | Converts a `manifest.json` file into a valid manifest JSON payload. |\n| `start` | `slack run` | [start.py](./slack_cli_hooks/hooks/start.py) | While developing locally, the CLI manages a socket connection with Slack's backend and utilizes this hook for events received via this connection. |\n\n### Overriding Hooks\n\nTo customize the behavior of a hook, add the hook to your application's `/slack.json` file, and provide a corresponding script to be executed.\n\nWhen commands are run, the Slack CLI will look to the project's hook definitions and use those instead of what's defined in this library, if provided.\n\nBelow is an example `/slack.json` file that overrides the default `start`:\n\n```json\n{\n  \"hooks\": {\n    \"get-hooks\": \"python3 -m slack_cli_hooks.hooks.get_hooks\",\n    \"start\": \"python3 app.py\"\n  }\n}\n```\n\n## Contributing\n\nContributions are always welcome! Please review the\n[contributing guidelines](https://github.com/slackapi/python-slack-hooks/blob/main/.github/CONTRIBUTING.md)\nfor more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fpython-slack-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslackapi%2Fpython-slack-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fpython-slack-hooks/lists"}