sladm — Slack Admin CLI for humans and AI agents
CLI & Agent Skill for managing Slack Enterprise Grid / Business+ workspaces via admin.* APIs.
日本語版 README
Features
- 73+ admin commands covering 8 API groups: teams, users, conversations, apps, invite-requests, workflows, functions, and token management
- Agent Skill — ships with a Claude Code / Codex skill so AI agents can drive Slack admin tasks using the CLI as a tool
- Bulk operations — archive, delete, or move hundreds of channels at once with
conversations bulk-*
- Output formats — table (human), JSON (programmatic), TSV (pipe-friendly)
- Multi-org support — switch between orgs with
--profile, tokens stored in OS keychain
Note: This CLI is in alpha. Use at your own risk. Only a subset of features have been verified.
Installation
npm install -g sladm-cli
bun install -g sladm-cli
Or run directly without installing:
npx sladm-cli --help
Pre-built Binaries
Standalone binaries (no runtime required) are available on the Releases page:
| macOS (Apple Silicon) | sladm-darwin-arm64 |
| macOS (Intel) | sladm-darwin-x64 |
| Linux (x64) | sladm-linux-x64 |
| Linux (arm64) | sladm-linux-arm64 |
| Windows (x64) | sladm-windows-x64.exe |
curl -L https://github.com/yamitzky/slack-admin-cli/releases/latest/download/sladm-darwin-arm64 -o sladm
chmod +x sladm
sudo mv sladm /usr/local/bin/
Agent Skill
To use this CLI as an agent skill in Claude Code, Cursor, OpenCode, etc.:
npx skills add yamitzky/slack-admin-cli
When the skill is active, agents automatically use sladm commands for Slack admin operations, with per-command-group recipes providing API reference context.
Quick Start
1. Create a Slack App
Create an app at Slack API and grant the required admin.* scopes (see Required Scopes).
2. Register Token
sladm token add default xoxp-your-token-here
3. Verify
sladm token status
sladm teams list
Authentication
Profile Management
sladm token add production xoxp-prod-token
sladm token add staging xoxp-staging-token
sladm token list
sladm token remove staging
Tokens are stored in the OS keychain (macOS Keychain / Linux Secret Service). Falls back to ~/.config/sladm/.token-<name> if keychain is unavailable.
Switching Profiles
sladm --profile production teams list
SLADM_PROFILE=staging sladm teams list
Priority: --profile flag > SLADM_PROFILE env var > default profile
If you only have one profile, --profile is not needed.
Output
All data-returning commands support three output formats:
sladm teams list
sladm teams list --json
sladm teams list --plain
Commands
Token
token add <NAME> <TOKEN> | Add profile |
token list | List profiles |
token remove <NAME> | Remove profile |
token status | Check token status |
Teams
teams create | Create team |
teams list | List teams |
teams admins list | List admins |
teams owners list | List owners |
teams settings info | Get team settings |
teams settings set-name | Set team name |
teams settings set-icon | Set team icon |
teams settings set-description | Set description |
teams settings set-discoverability | Set discoverability |
Users
users list | List users |
users invite | Invite user |
users assign | Assign to team |
users remove | Remove from team |
users set-admin | Promote to admin |
users set-owner | Promote to owner |
users set-regular | Demote to regular user |
users session reset | Reset session |
Conversations
conversations create | Create channel |
conversations delete | Delete channel |
conversations archive | Archive channel |
conversations unarchive | Unarchive channel |
conversations rename | Rename channel |
conversations search | Search channels |
conversations invite | Invite user to channel |
conversations convert-to-private | Convert to private |
conversations convert-to-public | Convert to public |
conversations get-prefs | Get channel preferences |
conversations set-prefs | Set channel preferences |
conversations get-custom-retention | Get retention policy |
conversations set-custom-retention | Set retention policy |
conversations remove-custom-retention | Remove retention policy |
conversations get-teams | List associated teams |
conversations set-teams | Set team associations |
conversations disconnect-shared | Disconnect shared channel |
conversations bulk-archive | Bulk archive |
conversations bulk-delete | Bulk delete |
conversations bulk-move | Bulk move across teams |
conversations lookup | Lookup by criteria |
conversations restrict-access add-group | Add access group |
conversations restrict-access list-groups | List access groups |
conversations restrict-access remove-group | Remove access group |
conversations ekm list-original-connected-channel-info | EKM channel info |
Apps
apps approve | Approve app |
apps restrict | Restrict app |
apps clear-resolution | Clear approval/restriction |
apps uninstall | Uninstall app |
apps activities list | Activity log |
apps approved list | List approved apps |
apps restricted list | List restricted apps |
apps requests list | List requests |
apps requests cancel | Cancel request |
apps config lookup | Lookup app config |
apps config set | Set app config |
Invite Requests
invite-requests approve | Approve request |
invite-requests deny | Deny request |
invite-requests list | List pending requests |
invite-requests approved list | List approved requests |
invite-requests denied list | List denied requests |
Workflows
workflows search | Search workflows |
workflows unpublish | Unpublish workflow |
workflows permissions lookup | Lookup permissions |
workflows collaborators add | Add collaborator |
workflows collaborators remove | Remove collaborator |
Functions
functions list | List functions |
functions permissions lookup | Lookup permissions |
functions permissions set | Set permissions |
Required Scopes
admin.teams:read | List teams, get settings |
admin.teams:write | Create teams, update settings |
admin.users:read | List users |
admin.users:write | Invite users, manage roles |
admin.conversations:read | Search channels, get settings |
admin.conversations:write | Channel operations, bulk actions |
admin.apps:read | List apps, get config |
admin.apps:write | Approve/restrict apps, set config |
admin.invites:read | List invite requests |
admin.invites:write | Approve/deny invite requests |
admin.workflows:read | List workflows and functions |
admin.workflows:write | Manage workflows, set permissions |
Development
git clone https://github.com/mitsuki-ogasahara/slack-admin-cli.git
cd slack-admin-cli
bun install
bun run dev -- <command>
bun test
bun run lint
bun link
Tech Stack
TypeScript / Bun / @slack/web-api / @optique/core
Architecture details: see CLAUDE.md
Related Links
License
MIT