{"library":"slack-cloudflare-workers","title":"Slack App Framework for Cloudflare Workers","description":"slack-cloudflare-workers is an opinionated framework for building Slack applications designed specifically for Cloudflare Workers, leveraging their serverless environment. Inspired by Slack's popular Bolt framework but not strictly following its blueprint, it distinguishes itself with a strong TypeScript focus, built-in lazy listener capabilities (similar to bolt-python), and a commitment to zero additional runtime dependencies beyond its foundational `slack-edge` module. The current stable version is 1.3.9. This library caters to developers seeking highly performant, type-safe, and lightweight Slack integrations on the Cloudflare Workers platform, providing a streamlined experience compared to general-purpose Node.js frameworks. While release cadence isn't explicitly stated, the active development and frequent updates to the `slack-edge` ecosystem suggest a responsive maintenance schedule.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install slack-cloudflare-workers"],"cli":null},"imports":["import { App } from 'slack-cloudflare-workers';","import type { Context } from 'slack-cloudflare-workers';","import type { SlackAPIClient } from 'slack-cloudflare-workers';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { App } from 'slack-cloudflare-workers';\n\ninterface Env {\n  SLACK_SIGNING_SECRET: string;\n  SLACK_BOT_TOKEN: string;\n}\n\nconst app = new App({\n  signingSecret: process.env.SLACK_SIGNING_SECRET ?? 'your-signing-secret-if-not-env',\n  token: process.env.SLACK_BOT_TOKEN ?? 'your-bot-token-if-not-env',\n});\n\n// Listen for a 'hello' message\napp.message('hello', async ({ say, payload }) => {\n  await say(`Hello, <@${payload.user}>! How can I help you?`);\n});\n\n// Respond to a slash command\napp.command('/echo', async ({ command, ack, respond }) => {\n  await ack(); // Acknowledge the command immediately\n  await respond(`You said: ${command.text}`);\n});\n\nexport default {\n  async fetch(\n    request: Request,\n    env: Env,\n    ctx: ExecutionContext\n  ): Promise<Response> {\n    // Ensure the app instance uses the environment variables from the Worker's context\n    // This is crucial for local development vs. deployed Worker\n    app.oauth = undefined; // Reset OAuth for each request to use correct env\n    app.receiver.signingSecret = env.SLACK_SIGNING_SECRET;\n    app.client.token = env.SLACK_BOT_TOKEN;\n    \n    return app.fetch(request, env, ctx);\n  },\n};\n","lang":"typescript","description":"Sets up a basic Cloudflare Worker handling Slack 'hello' messages and '/echo' slash commands, demonstrating app initialization and event listeners.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}