@openpets/slack-app-manager
v1.0.0
Published
Comprehensive Slack app lifecycle management - create apps, configure manifests, manage installations, handle tokens, and deploy to workspaces. Built on the official Slack Node.js SDK.
Downloads
78
Maintainers
Readme
Slack App Manager
Comprehensive Slack app lifecycle management for the OpenPets ecosystem. Create, configure, manage, and deploy Slack applications from your terminal.
Built on the official Slack Node.js SDK.
Features
- App Creation & Management - Create new Slack apps, list existing apps, get app details, delete apps
- Manifest Management - Export, generate, and update app manifests (YAML/JSON configuration)
- Permissions & Scopes - View and update OAuth scopes for bot and user tokens
- Installation Management - Generate install URLs, manage OAuth flows
- Event Configuration - Set up event subscriptions and socket mode
- Slash Commands - Add and configure slash commands
- Bot User Configuration - Configure bot display names and presence
- Token Management - Rotate tokens, exchange OAuth codes, validate permissions
- Read-Only Mode - Safe operations mode that disables all write operations
Installation
# Using pets CLI
pets add slack-app-manager
# Or install from npm
bun add @openpets/slack-app-managerConfiguration
Required Environment Variables
| Variable | Description | How to Get |
|----------|-------------|------------|
| SLACK_APP_CONFIGURATION_ACCESS_TOKEN | App-level token for managing apps | api.slack.com/apps > Your App > Basic Information > App-Level Tokens |
Optional Environment Variables
| Variable | Description |
|----------|-------------|
| SLACK_CLIENT_ID | OAuth Client ID for app distribution |
| SLACK_CLIENT_SECRET | OAuth Client Secret for app distribution |
| SLACK_SIGNING_SECRET | Signing secret for request verification |
| SLACK_APP_MANAGER_READ_ONLY | Set to true to disable write operations |
Getting Your App Configuration Token
- Go to api.slack.com/apps
- Select your app (or create a new one)
- Navigate to Basic Information > App-Level Tokens
- Click Generate Token and Scopes
- Add the following scopes:
connections:writeapp_configurations:write
- Generate and copy the token (starts with
xapp-) - Set it as
SLACK_APP_CONFIGURATION_ACCESS_TOKENin your.envfile
Quick Start
# Test your connection
opencode run "test slack connection"
# List available scopes
opencode run "list available slack scopes"
# Create a new app
opencode run "create a new slack app called MyBot"
# Generate a manifest template
opencode run "generate a manifest template for a bot app called HelperBot"
# Export an existing app's manifest
opencode run "export manifest for app A1234567890"Available Tools
Connection & Validation
| Tool | Description |
|------|-------------|
| slack-test-connection | Test API connection and validate configuration |
| slack-validate-token | Validate current token and check permissions |
App Management
| Tool | Description |
|------|-------------|
| slack-list-apps | List all Slack apps you have access to |
| slack-get-app-info | Get detailed info about a specific app |
| slack-create-app | Create a new Slack app with basic config |
| slack-create-app-from-manifest | Create app from complete manifest JSON |
| slack-delete-app | Permanently delete a Slack app |
Manifest Management
| Tool | Description |
|------|-------------|
| slack-export-manifest | Export app configuration as manifest |
| slack-generate-manifest-template | Generate manifest for specific app types |
| slack-update-manifest | Update app from manifest JSON |
Permissions & Scopes
| Tool | Description |
|------|-------------|
| slack-get-app-permissions | View current OAuth scopes |
| slack-update-app-permissions | Update OAuth scopes |
| slack-list-available-scopes | List all available Slack scopes |
Features Configuration
| Tool | Description |
|------|-------------|
| slack-configure-events | Set up event subscriptions |
| slack-configure-slash-command | Add/update slash commands |
| slack-configure-bot-user | Configure bot user settings |
Installation & OAuth
| Tool | Description |
|------|-------------|
| slack-list-app-installations | List workspaces where app is installed |
| slack-generate-install-url | Generate OAuth installation URL |
| slack-exchange-code-for-token | Exchange OAuth code for tokens |
| slack-revoke-tokens | Revoke current authentication |
| slack-rotate-tokens | Rotate OAuth tokens |
Workspace & Distribution
| Tool | Description |
|------|-------------|
| slack-get-team-info | Get current workspace info |
| slack-get-distribution-info | Get app distribution settings |
Read-Only Mode
Enable read-only mode to prevent accidental modifications:
# Via environment variable
export SLACK_APP_MANAGER_READ_ONLY=true
# Via pets CLI
pets read-only slack-app-manager onIn read-only mode, the following operations are disabled:
create- App creationupdate- Manifest/permission updatesdelete- App deletionrotate- Token rotationrevoke- Token revocationinstall/uninstall- Installation changes
Example Workflows
Create and Configure a Bot
# 1. Create the app
opencode run "create a slack app called CustomerBot with description 'Customer support bot'"
# 2. Add more permissions
opencode run "update app A123456 permissions to add channels:read,channels:history"
# 3. Configure events
opencode run "configure events for app A123456 with bot events message.channels,app_mention using socket mode"
# 4. Add a slash command
opencode run "add slash command /support to app A123456 with description 'Get support'"Backup and Migrate an App
# 1. Export the manifest
opencode run "export manifest for app A123456"
# 2. Save the manifest (copy from output)
# 3. Create new app from manifest
opencode run "create app from manifest {paste_manifest_json}"Generate Installation URL
# Generate install URL with specific scopes
opencode run "generate install url with scopes chat:write,users:read"Troubleshooting
"not_authed" Error
- Verify your
SLACK_APP_CONFIGURATION_ACCESS_TOKENis set correctly - Ensure the token hasn't expired
- Check that the token has required scopes
"missing_scope" Error
- The operation requires additional scopes
- Regenerate your app-level token with the required scopes
"invalid_app_id" Error
- Verify the app ID format (should be like
A1234567890) - Ensure you have access to manage this app
Can't Create Apps
- Verify your token has
app_configurations:writescope - Check workspace restrictions for app creation
API Reference
This pet uses the following Slack APIs:
License
MIT
