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

@samkawsarani/slack-cli

v1.1.0

Published

Slack API integration — messages, channels, users, and threads with CLI

Downloads

116

Readme

slack-cli

npm License: MIT

[!IMPORTANT] Disclaimer: This is an unofficial, open-source community project and is not affiliated with, endorsed by, or connected to Slack Technologies, LLC (the company behind Slack.com). Slack is a registered trademark of Slack Technologies, LLC. This CLI is an independent tool that uses the publicly available Slack API to provide command-line access to your own slack data.

[!NOTE] This tool has only been tested on macOS. It may work on Windows and Linux, but this has not been verified.

Read-only Slack API client with CLI. Built for use by LLM agents and humans.

Installation

npm install -g @samkawsarani/slack-cli
# or
bun install -g @samkawsarani/slack-cli

Quick Start

# Interactive setup 
slack init

# Search
slack search-messages --query "bug report"
slack search-files --query "design doc"

# Channels
slack list-channels
slack get-channel --channel C12345678
slack resolve-channel --channel general

# Threads — paste a Slack message URL directly (right-click message → Copy link)
slack get-thread --thread-ts "https://workspace.slack.com/archives/C12345678/p1700000000000123"
# Or provide channel + timestamp explicitly
slack get-thread --channel C12345678 --thread-ts 1700000000.000123
slack get-thread --channel C12345678 --thread-ts 1700000000.000123 --all

# Find unanswered messages
slack find-unanswered --channel C12345678 --hours 48 --resolve-users

Library Usage

import {
  searchMessages,
  listChannels,
  resolveChannel,
  getThreadReplies,
  getChannelDaySummary,
} from "@samkawsarani/slack-cli";

// Search messages
const results = await searchMessages({ query: "bug report" });

// List channels
const { channels } = await listChannels({ limit: 50 });

// Resolve channel by name
const resolved = await resolveChannel("general");

// Get thread replies
const thread = await getThreadReplies({
  channel: "C12345678",
  threadTs: "1700000000.000123",
});

// Get a day's activity in a channel
const summary = await getChannelDaySummary({ channel: "general" });
console.log(summary.messageCount, summary.topParticipants);

Available Functions

| Category | Functions | |----------|-----------| | Messages | listMessages, findUnansweredMessages | | Channels | listChannels, getChannelInfo, resolveChannel | | Search | searchMessages, searchFiles | | Users | getUser, listUsers, findUserByHandle, getUserDisplayName | | Threads | getThreadReplies, getAllThreadReplies | | URLs | parseSlackMessageLink, buildSlackMessageUrl, isSlackUrl | | Summary | getChannelDaySummary | | Caching | loadMappings, saveMappings, getChannelId, setChannelMapping, getUserId, setUserMapping, clearMappings |

Configuration

Config is stored at ~/.config/slack/.env — works globally from any directory. A .env in the current working directory overrides the global config.

| Variable | Required | Default | Description | |---|---|---|---| | SLACK_USER_TOKEN | Yes | — | Slack User OAuth token (xoxp-...). Get one at api.slack.com/apps | | SLACK_CACHE_MAPPINGS | No | true | Cache channel/user ID↔name mappings in ~/.config/slack/mappings.json. Set to false to disable |

License

MIT — Copyright (c) 2026 Sam Kawsarani