#plot #slack #log-analysis #chatops

bin+lib slackrs

Provides a CLI and library functions to analyze Slack message data exports (zipped JSONs with a Slack-specific structure) and plot statistics

2 unstable releases

Uses new Rust 2024

0.2.0 Aug 22, 2025
0.1.0 Jul 26, 2025

#257 in Visualization

Apache-2.0

48KB
728 lines

slackrs

A simple CLI to analyze Slack data exports.

Crate Docs Rust

Features

  • Plot number of messages containing a specific string over time (histogram).

  • Plot ratio of messages containing either one of two specific strings (line chart).

  • Export CSV files with the statistics and allow to aggregate over different time scales (daily, monthly, yearly).

  • Simple customization regarding plot colors.

Sample usage

Retrieving the data from Slack

Bulk downloads of (public) messages are available per workspace, but require admin access.

In the 'Slack app', do the following (alternatively, just go to https://[your-workspace].slack.com/services/export in the browser):

  1. Use the dropdown of the workspace, choose Tools & Settings > Admin Tools.
  2. In the Admin Tools go to Data Exports.

Then choose an export range and trigger the export.

Sample task file

The tool processes all messages from the ZIP and then runs a number of tasks, which are defined in JSON:

[
    {
        "metric": {
            "MentionCount": {
                "channel_pattern": "",
                "message_pattern": "@group"
            }
        },
        "resolution": "Daily",
        "output_file_name": "daily-group-mentions-over-time.png"
    }
]    

Running the tool

./slackrs --input-file="my-slack-export.zip" --task-file=my_tasks.json

Sample output

Plots look like this right now:

Sample histogram output visualizing message counts per day

Additionally, all plotted data is also provided as a CSV.

More documentation

To see all command-line arguments, just run:

./slackrs --help

Dependencies

~21MB
~354K SLoC