npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alankyshum/slack-cli

v1.3.0

Published

Slack CLI for coding agents — search, read, and draft messages via the Slack Web API using browser-extracted tokens

Readme

npm version PyPI version

slack-cli

A Slack CLI designed for coding agents (Claude Code, Cursor, etc.) that provides structured JSON access to Slack workspaces via the Web API.

It works by extracting authentication tokens from your existing browser session — no Slack app or bot token required.

Install

npm:

npm install -g @alankyshum/slack-cli

pip:

pip install slack-cli-agent

Manual:

git clone https://github.com/alankyshum/slack-cli.git
chmod +x slack-cli/bin/slack-cli
ln -s "$(pwd)/slack-cli/bin/slack-cli" ~/.local/bin/slack-cli

Prerequisites

  • curl and jq (for all commands)
  • python3 (for URL encoding)
  • Node.js + Playwright (only for auth command)
npm install -g playwright
npx playwright install chromium

Quick Start

# 1. Authenticate (opens browser to extract tokens)
slack-cli auth --domain mycompany.slack.com

# 2. Search messages
slack-cli search "from:@alice in:#engineering deployment"

# 3. Read channel history
slack-cli read engineering 10

# 4. Draft a message (saved locally, not sent)
slack-cli draft general "Hey team, the fix for JIRA-123 is ready"

Commands

| Command | Description | |---------|-------------| | auth --domain <dom> | Extract tokens from browser session | | whoami | Show authenticated user | | config | Show current configuration | | search <query> | Search messages (full Slack query syntax) | | read <channel> [count] | Read channel messages | | unreads | Show recent activity | | draft <channel> <msg> | Save draft locally (does not send) | | drafts | List saved drafts | | send <draft_id> | Send a draft (with confirmation prompt) | | channels | List your channels | | dms | List recent DMs | | userinfo <user> | Look up user by ID, email, or name | | presence [user_id|username|email] | Show a user's presence status (active/away). Defaults to self. |

Search Modifiers

Slack's full search syntax is supported:

| Modifier | Example | Description | |----------|---------|-------------| | from: | from:@alice / from:me | Messages from a person | | in: | in:#channel / in:@user | Messages in channel or DM | | before: | before:2025-06-01 | Before a date | | after: | after:2025-01-01 | After a date | | on: | on:2025-03-15 | On exact date | | during: | during:january | During a month or year | | has: | has::eyes: / has:pin | Has reaction or pin | | is: | is:saved / is:thread | Saved or thread messages | | "..." | "exact phrase" | Exact phrase match | | - | -word | Exclude word | | * | deploy* | Wildcard (min 3 chars) |

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | SLACK_CLI_HOME | ~/.slack-cli | Config directory | | SLACK_CLI_CHROME_PROFILE | ~/.slack-cli/chrome-profile | Chrome profile for auth | | SLACK_CLI_COUNT | 20 | Results per page | | SLACK_CLI_SORT | timestamp | Sort: timestamp or score | | SLACK_CLI_SORT_DIR | desc | Direction: asc or desc |

How It Works

  1. auth opens a Chromium browser using your existing Chrome profile (via Playwright), navigates to your Slack workspace, and intercepts the xoxc- API token and xoxd- session cookie from live API requests.

  2. All other commands use direct Slack Web API calls via curl — no browser needed, making them fast and suitable for automation.

  3. Drafts are saved locally to ~/.slack-cli/drafts.json. The send command requires interactive confirmation before posting.

  4. All output is structured JSON, making it easy to parse with jq or consume from AI agents.

Security

  • Credentials are stored at ~/.slack-cli/credentials.json with 600 permissions
  • Tokens are xoxc- client tokens scoped to your user session
  • The send command requires explicit y confirmation
  • No data is sent to any third party

License

MIT