Skip to content

slackstat/menubar

Repository files navigation

SlackStat

Slack unread counts in your macOS menu bar.

SlackStat is a native macOS menu bar app that shows your Slack unread message counts at a glance. It reads your Slack desktop app's authentication tokens locally and polls the Slack API to display conversations grouped by your sidebar sections.

Features

  • Menu bar counts — See unread DMs, mentions, threads, and channel messages with relative timestamps: 💬 4 (3m) @ 2 (1h) 🧵 1 # 15 (45m)
  • Sidebar grouping — Conversations organized by your actual Slack sidebar sections (Starred, custom sections, etc.)
  • Deep links — Click any conversation to open it directly in Slack (threads open Slack without navigating to a specific view)
  • Launch at login — Start automatically with macOS
  • Zero dependencies — Pure Swift Package Manager project, no external libraries
  • Privacy-first — All data stays on your machine. No telemetry, no analytics, no third-party services.

Requirements

Install

From source (recommended)

git clone https://github.com/slackstat/menubar.git
cd menubar
swift build -c release
cp .build/release/SlackStat /usr/local/bin/

Then run SlackStat from Terminal, or move the binary wherever you prefer.

From GitHub Releases

Download the latest .app bundle from Releases.

Important: macOS will show a warning that SlackStat "is damaged and can't be opened." This is normal — it happens because the app is not signed with an Apple Developer certificate. To fix it, run this command in Terminal before opening the app:

xattr -cr /path/to/SlackStat.app

Then open SlackStat normally. You only need to do this once.

How It Works

SlackStat reads authentication tokens directly from the Slack desktop app's local storage on your machine:

  1. Token extraction — Reads xoxc- tokens from Slack's LevelDB files in ~/Library/Application Support/Slack/
  2. Cookie decryption — Decrypts the xoxd- session cookie from Slack's Cookies database using the Keychain password (via /usr/bin/security)
  3. API polling — Polls client.counts every 30 seconds (configurable) for unread counts, and client.userBoot every 5 minutes for sidebar sections
  4. Display — Shows aggregated counts in the menu bar with a dropdown menu of conversations

No OAuth flow, no bot tokens, no Slack app installation required.

Privacy & Security

  • Tokens never leave your machine — Authentication tokens are held in memory only and are never written to disk by SlackStat
  • No network calls except to Slack — The only HTTP requests go to *.slack.com/api/ endpoints
  • No telemetry or analytics — Zero tracking, zero data collection
  • Temporary files cleaned up — A copy of Slack's Cookies database is made to /tmp/ for reading and immediately deleted
  • Open source — Full source code available for audit

See SECURITY.md for details on what SlackStat accesses and responsible disclosure.

Limitations

  • Single workspace only — SlackStat works with one Slack workspace at a time (the first one found in your Slack app). Enterprise Grid setups with multiple workspaces are not supported.
  • Unsigned binary — The app is not signed with an Apple Developer certificate, so Gatekeeper will block it on first launch (see install instructions above).
  • Requires Slack desktop app — SlackStat reads tokens from the Slack desktop app (both direct download and Mac App Store versions are supported). It does not work with Slack in a browser.
  • Threads have limited support — Slack's API does not provide a timestamp for the most recent thread reply, so threads show an unread count without a relative time (e.g., 🧵 3 instead of 🧵 3 (5m)). Additionally, Slack has no deep link URI for the Threads view, so clicking Threads in the dropdown opens Slack but cannot navigate directly to your threads.

Configuration

Settings are stored in ~/.config/slackstat/config.json. You can also configure via the Preferences window (click the menu bar icon → Preferences).

  • Poll interval — How often to check for new messages (10–120 seconds, default 30)
  • Launch at login — Start SlackStat when you log in to macOS

Development

# Build
swift build

# Run
.build/debug/SlackStat

# Test
swift test

# Release build
swift build -c release

License

MIT

About

Slack unread counts in your macOS menu bar

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages