Skip to main content

Slack transport plugin for Takopi.

Project description

takopi-slack-plugin

slack transport plugin for takopi. socket mode only, replies in threads, and stores per-thread context + resume tokens.

features

  • socket mode only; listens in a single channel or dm
  • thread sessions (context + resume tokens) stored at ~/.takopi/slack_thread_sessions_state.json
  • slash commands + message shortcuts for overrides and plugin commands
  • cancel button on progress messages
  • message overflow: split or trim long responses

requirements

  • python 3.14+
  • takopi >=0.20.0
  • slack bot token with chat:write, commands, app_mentions:read, and the matching history scopes for your channel type (channels:history, groups:history, im:history, mpim:history)
  • slack app token (xapp-) with connections:write

install

install into the same python environment as takopi.

uv tool install -U takopi --with takopi-slack-plugin

or, with a virtualenv:

pip install takopi-slack-plugin

setup

create a slack app and enable socket mode.

  1. create an app-level token with connections:write
  2. add the bot scopes listed above and install the app
  3. enable events for app_mention plus the right message.* event for your channel type
  4. enable interactivity & shortcuts, create a slash command (for example /takopi), and optionally add dedicated commands like /takopi-preview for common plugins plus message shortcuts with callback id takopi:<plugin_id>
  5. invite the bot to the target channel

add to ~/.takopi/takopi.toml:

transport = "slack"

[transports.slack]
bot_token = "xoxb-..."
app_token = "xapp-..."
channel_id = "C12345678"
message_overflow = "split"

set message_overflow = "trim" if you prefer truncation instead of followups.

if you use a plugin allowlist, enable this distribution:

[plugins]
enabled = ["takopi-slack-plugin"]

usage

takopi --transport slack

if you already set transport = "slack", takopi is enough.

directives are optional. use /project and @branch in the first line to target a project or worktree; otherwise the run uses the default takopi context.

inline command mode: if the remaining prompt includes a /command that matches a registered command plugin, the slack bridge dispatches it instead of running the engine.

example (inline command):

@takopi /zkp2p-clients @feat/login /preview start 3000 --dev "pnpm --filter @zkp2p/web dev -- --host 127.0.0.1 --port {port}"

example (worktree):

@takopi /zkp2p-clients @feat/web/monad-usdt0 add a retry to the api call

thread replies reuse stored context, so you can reply without repeating directives.

slash command built-ins (via /takopi <command> or /takopi-<command>):

/takopi status
/takopi engine <engine|clear>
/takopi model <engine> <model|clear>
/takopi reasoning <engine> <level|clear>
/takopi session clear

message shortcuts pass the selected message text as arguments to the plugin command identified by takopi:<plugin_id>.

progress messages include a cancel button; enable interactivity & shortcuts so clicks are delivered in socket mode.

for opinionated gating, see docs/AGENTS.example.md and docs/GATING_README.md, and customize ~/.codex/AGENTS.md.

license

mit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

takopi_slack_plugin-0.1.2.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

takopi_slack_plugin-0.1.2-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file takopi_slack_plugin-0.1.2.tar.gz.

File metadata

  • Download URL: takopi_slack_plugin-0.1.2.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for takopi_slack_plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f1a6a214760d21f89f1c227cbe9b2ee0b65fb8cb5246c04054fd38be76232129
MD5 c2ab4c3647528ead47b9f2436a92fc0a
BLAKE2b-256 f84ee61b6902d462f8ff7c369421403a36f1c2a393538161d5dedfcc0e8f77f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for takopi_slack_plugin-0.1.2.tar.gz:

Publisher: workflow.yml on richardliang/takopi-slack-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file takopi_slack_plugin-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for takopi_slack_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d79d0d1f2d05bf5d1fbc4dc4476427fcb0dc6a7d6b07de3699000ce2c77f742
MD5 99f9bf21a4dd19894f015a1f819d9ceb
BLAKE2b-256 bb79051058fdc02120624bc2213bd7287f5cf149da69791a3c4c8cd56818d835

See more details on using hashes here.

Provenance

The following attestation bundles were made for takopi_slack_plugin-0.1.2-py3-none-any.whl:

Publisher: workflow.yml on richardliang/takopi-slack-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page