slackctl

module
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT

README

slackctl

A fast, single-binary Slack CLI for AI agents and humans. Written in Go.

Features

  • Single binary — no Node.js, no runtime dependencies
  • Auto-auth — extracts tokens from Slack Desktop, Chrome, Brave, Firefox
  • Browser auth — works with xoxc + xoxd cookie (no bot token required)
  • AI-friendly — JSON output, designed for agent tool use
  • Full Slack API — messages, channels, users, search, canvas, reactions

Install

Homebrew (macOS / Linux)
brew tap cluas/tap
brew install slackctl
Go install
go install github.com/cluas/slackctl/cmd/slackctl@latest
From source
git clone https://github.com/cluas/slackctl.git
cd slackctl
make build
# binary at ./slackctl

Quick start

# Import credentials from Slack Desktop
slackctl auth import-desktop

# Or from browser
slackctl auth import-chrome
slackctl auth import-firefox
slackctl auth import-brave

# Or add manually
slackctl auth add --workspace-url https://myteam.slack.com --xoxc xoxc-... --xoxd xoxd-...

# Verify
slackctl auth test

Usage

slackctl
├── auth
│   ├── whoami              # Show configured workspaces
│   ├── test                # Verify credentials (auth.test)
│   ├── add                 # Add token or xoxc/xoxd manually
│   ├── import-desktop      # Extract from Slack Desktop app
│   ├── import-chrome       # Extract from Chrome (macOS)
│   ├── import-brave        # Extract from Brave (macOS)
│   ├── import-firefox      # Extract from Firefox
│   ├── parse-curl          # Extract from cURL command (stdin)
│   ├── set-default         # Set default workspace
│   └── remove              # Remove a workspace
├── message
│   ├── get <target> [ts]   # Fetch a single message
│   ├── list <target>       # List channel history or thread
│   ├── send <target> <text># Post a message
│   ├── edit <target> <ts>  # Edit a message
│   ├── delete <target> [ts]# Delete a message
│   └── react add|remove    # Manage reactions
├── canvas
│   └── get <url-or-id>     # Fetch canvas as Markdown
├── search
│   ├── messages <query>    # Search messages
│   └── files <query>       # Search files
├── user
│   ├── list                # List workspace users
│   └── get <id-or-handle>  # Get user info
└── channel
    ├── list                # List conversations
    ├── new <name>          # Create a channel
    ├── invite <ch> <users> # Invite users
    └── mark <ch> <ts>      # Mark as read

Environment variables

Variable Description
SLACK_TOKEN Slack token (xoxb-/xoxp-/xoxc-)
SLACK_COOKIE_D Browser cookie d value (required for xoxc tokens)
SLACK_WORKSPACE_URL Workspace URL (required for browser auth)

Environment variables take precedence over stored credentials.

Agent skill

This repo ships an agent skill at skills/slackctl/ compatible with Claude Code, Codex, Gemini CLI, etc.

# Recommended (via skills.sh)
npx skills add cluas/slackctl -g
Manual installation
git clone https://github.com/cluas/slackctl.git
bash slackctl/scripts/install-skill.sh

This installs the skill to ~/.claude/skills/ and ~/.agents/skills/. Restart your agent session to activate.

Credentials storage

Credentials are stored in ~/.config/agent-slack/credentials.json (compatible with agent-slack).

Acknowledgements

This project is a Go rewrite of agent-slack by stablyai. Thanks to the original authors for the excellent design and architecture that made this port straightforward.

License

MIT

Directories

Path Synopsis
cmd
slackctl command
internal
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL