New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

sladm-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sladm-cli

Slack Admin CLI for humans and AI agents — manage Enterprise Grid via admin.* APIs

latest
Source
npmnpm
Version
0.5.1
Version published
Maintainers
1
Created
Source

sladm — Slack Admin CLI for humans and AI agents

CLI & Agent Skill for managing Slack Enterprise Grid / Business+ workspaces via admin.* APIs.

日本語版 README

Features

  • 130 commands covering admin.* and standard Slack APIs: teams, users, conversations, apps, invite-requests, workflows, functions, scim-users, scim-groups, auth-policy, barriers, emoji, roles, usergroups, 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

Requires Bun runtime:

npm install -g sladm-cli
# or
bun install -g sladm-cli

Or run directly without installing:

npx sladm-cli --help
# or
bunx sladm-cli --help

Pre-built Binaries

Standalone binaries (no runtime required) are available on the Releases page:

PlatformFile
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
# Example: download and install on macOS (Apple Silicon)
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

Usage Examples

Invite a user

# Invite as a full member
sladm users invite --team-id T024XCDSF --email new-member@example.com \
  --channel-ids C01ABCD2EFG

# Invite as a single-channel guest
sladm users invite --team-id T024XCDSF --email guest@partner.com \
  --channel-ids C01ABCD2EFG --is-ultra-restricted true

Deactivate a user

# Find the user
sladm scim-users list --filter 'email eq "leaving@example.com"'

# Deactivate their account (org-wide, via SCIM API)
sladm scim-users deactivate --id U02T7QBTFGA

Authentication

Profile Management

sladm token add production xoxp-prod-token    # Add profile
sladm token add staging xoxp-staging-token     # Add another
sladm token list                               # List profiles
sladm token remove staging                     # Remove profile

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          # Via flag
SLADM_PROFILE=staging sladm teams list         # Via env var

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                 # Table (default)
sladm teams list --json          # JSON
sladm teams list --plain         # TSV (for scripting)

Commands

Token

CommandDescription
token add <NAME> <TOKEN>Add profile
token listList profiles
token remove <NAME>Remove profile
token statusCheck token status

Teams

CommandDescription
teams createCreate team
teams listList teams
teams admins listList admins
teams owners listList owners
teams settings infoGet team settings
teams settings set-nameSet team name
teams settings set-iconSet team icon
teams settings set-descriptionSet description
teams settings set-discoverabilitySet discoverability
teams settings set-default-channelsSet default channels

Users

CommandDescription
users listList users
users inviteInvite user
users assignAssign to team
users removeRemove from team
users set-adminPromote to admin
users set-ownerPromote to owner
users set-regularDemote to regular user
users set-expirationSet guest account expiration
users unsupported-versions exportExport users on unsupported Slack versions
users session resetReset session
users session listList active sessions
users session invalidateInvalidate a session
users session reset-bulkBulk reset sessions
users session get-settingsGet session settings
users session set-settingsSet session settings
users session clear-settingsClear session settings

Conversations

CommandDescription
conversations createCreate channel
conversations deleteDelete channel
conversations archiveArchive channel
conversations unarchiveUnarchive channel
conversations renameRename channel
conversations searchSearch channels
conversations inviteInvite user to channel
conversations convert-to-privateConvert to private
conversations convert-to-publicConvert to public
conversations get-prefsGet channel preferences
conversations set-prefsSet channel preferences
conversations get-custom-retentionGet retention policy
conversations set-custom-retentionSet retention policy
conversations remove-custom-retentionRemove retention policy
conversations get-teamsList associated teams
conversations set-teamsSet team associations
conversations disconnect-sharedDisconnect shared channel
conversations bulk-archiveBulk archive
conversations bulk-deleteBulk delete
conversations bulk-moveBulk move across teams
conversations lookupLookup by criteria
conversations restrict-access add-groupAdd access group
conversations restrict-access list-groupsList access groups
conversations restrict-access remove-groupRemove access group
conversations ekm list-original-connected-channel-infoEKM channel info

SCIM Users

CommandDescription
scim-users listList users (SCIM)
scim-users getGet user details (SCIM)
scim-users createCreate user (SCIM)
scim-users updateUpdate user attributes (SCIM)
scim-users deactivateDeactivate user (SCIM)

SCIM Groups

CommandDescription
scim-groups listList groups (SCIM)
scim-groups getGet group details (SCIM)
scim-groups createCreate group (SCIM)
scim-groups updateUpdate group (SCIM)
scim-groups deleteDelete group (SCIM)

Apps

CommandDescription
apps approveApprove app
apps restrictRestrict app
apps clear-resolutionClear approval/restriction
apps uninstallUninstall app
apps activities listActivity log
apps approved listList approved apps
apps restricted listList restricted apps
apps requests listList requests
apps requests cancelCancel request
apps config lookupLookup app config
apps config setSet app config

Invite Requests

CommandDescription
invite-requests approveApprove request
invite-requests denyDeny request
invite-requests listList pending requests
invite-requests approved listList approved requests
invite-requests denied listList denied requests

Workflows

CommandDescription
workflows searchSearch workflows
workflows unpublishUnpublish workflow
workflows permissions lookupLookup permissions
workflows collaborators addAdd collaborator
workflows collaborators removeRemove collaborator

Functions

CommandDescription
functions listList functions
functions permissions lookupLookup permissions
functions permissions setSet permissions

Auth Policy

CommandDescription
auth-policy assign-entitiesAssign entities to an auth policy
auth-policy get-entitiesList entities assigned to a policy
auth-policy remove-entitiesRemove entities from a policy

Barriers

CommandDescription
barriers createCreate an information barrier
barriers deleteDelete a barrier
barriers listList barriers
barriers updateUpdate a barrier

Emoji

CommandDescription
emoji addAdd a custom emoji
emoji add-aliasAdd an emoji alias
emoji listList custom emoji
emoji removeRemove an emoji
emoji renameRename an emoji

Roles

CommandDescription
roles add-assignmentsAdd role assignments
roles list-assignmentsList role assignments
roles remove-assignmentsRemove role assignments

Usergroups

CommandDescription
usergroups add-channelsAdd default channels to a usergroup
usergroups add-teamsAdd teams to a usergroup
usergroups list-channelsList default channels of a usergroup
usergroups remove-channelsRemove default channels from a usergroup
usergroups listList usergroups
usergroups createCreate a usergroup
usergroups updateUpdate a usergroup
usergroups enableEnable a usergroup
usergroups disableDisable a usergroup
usergroups users listList members of a usergroup
usergroups users updateUpdate members of a usergroup

Users (non-admin)

CommandDescription
users infoGet user info (users.info)
users lookup-by-emailLook up user by email (users.lookupByEmail)
users get-presenceGet user presence (users.getPresence)
users set-presenceSet user presence (users.setPresence)
users conversationsList user's conversations (users.conversations)
users identityGet caller's identity (users.identity)
users profile getGet user profile (users.profile.get)
users profile setSet user profile fields (users.profile.set)

Conversations (non-admin)

CommandDescription
conversations listList channels (conversations.list)
conversations infoGet channel info (conversations.info)
conversations membersList channel members (conversations.members)

Teams (non-admin)

CommandDescription
teams infoGet team info (team.info)
teams profile getGet team profile (team.profile.get)
teams billable-infoGet billable info per user (team.billableInfo)
teams access-logsGet access logs (team.accessLogs)
teams integration-logsGet integration logs (team.integrationLogs)

Required Scopes

ScopePurpose
admin.teams:readList teams, get settings
admin.teams:writeCreate teams, update settings
admin.users:readList users
admin.users:writeInvite users, manage roles
admin.conversations:readSearch channels, get settings
admin.conversations:writeChannel operations, bulk actions
admin.apps:readList apps, get config
admin.apps:writeApprove/restrict apps, set config
admin.invites:readList invite requests
admin.invites:writeApprove/deny invite requests
admin.workflows:readList workflows and functions
admin.workflows:writeManage workflows, set permissions
adminSCIM user and group management

Non-admin API Scopes

ScopePurpose
users:readUser info, presence, conversations
users:read.emailLook up user by email
users.profile:readRead user profile
users.profile:writeUpdate user profile
channels:readList public channels, get channel info/members
groups:readPrivate channel info/members
mpim:readMulti-party DM info/members
im:readDM info/members
usergroups:readList and read usergroups
usergroups:writeCreate, update, enable, disable usergroups
team:readTeam info and profile
admin (user token)team.accessLogs and team.billableInfo require admin privilege

Development

git clone https://github.com/mitsuki-ogasahara/slack-admin-cli.git
cd slack-admin-cli
bun install

bun run dev -- <command>   # Run in development
bun test                   # Run tests
bun run lint               # Type check (tsc --noEmit)
bun link                   # Link as global command

Tech Stack

TypeScript / Bun / @slack/web-api / @optique/core

Architecture details: see CLAUDE.md

License

MIT

Keywords

slack

FAQs

Package last updated on 22 Apr 2026

Related posts