{"id":13835645,"url":"https://github.com/mgleon08/slack_neuralyzer","last_synced_at":"2025-04-30T20:04:49.686Z","repository":{"id":59155901,"uuid":"71143289","full_name":"mgleon08/slack_neuralyzer","owner":"mgleon08","description":"Ruby gem for clean up messages and files on Slack.","archived":false,"fork":false,"pushed_at":"2017-09-09T03:42:48.000Z","size":6969,"stargazers_count":57,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-22T16:16:37.729Z","etag":null,"topics":["cleaner","ruby","rubygems","slack"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgleon08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-17T13:47:56.000Z","updated_at":"2023-02-17T07:53:48.000Z","dependencies_parsed_at":"2022-09-19T07:41:25.747Z","dependency_job_id":null,"html_url":"https://github.com/mgleon08/slack_neuralyzer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgleon08%2Fslack_neuralyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgleon08%2Fslack_neuralyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgleon08%2Fslack_neuralyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgleon08%2Fslack_neuralyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgleon08","download_url":"https://codeload.github.com/mgleon08/slack_neuralyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774817,"owners_count":21641729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleaner","ruby","rubygems","slack"],"created_at":"2024-08-04T14:01:07.354Z","updated_at":"2025-04-30T20:04:49.632Z","avatar_url":"https://github.com/mgleon08.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Slack Neuralyzer\n\n[![Gem Version](https://badge.fury.io/rb/slack_neuralyzer.svg)](https://badge.fury.io/rb/slack_neuralyzer)\n[![Build Status](https://travis-ci.org/mgleon08/slack_neuralyzer.svg?branch=master)](https://travis-ci.org/mgleon08/slack_neuralyzer)\n[![Coverage Status](https://coveralls.io/repos/github/mgleon08/slack_neuralyzer/badge.svg?branch=master)](https://coveralls.io/github/mgleon08/slack_neuralyzer?branch=master)\n[![Code Climate](https://codeclimate.com/github/mgleon08/slack_neuralyzer/badges/gpa.svg)](https://codeclimate.com/github/mgleon08/slack_neuralyzer)\n[![security](https://hakiri.io/github/mgleon08/slack_neuralyzer/master.svg)](https://hakiri.io/github/mgleon08/slack_neuralyzer/master)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mgleon08/slack_neuralyzer/blob/master/LICENSE.txt)\n\nSlack Neuralyzer is a ruby gem for bulk delete messages and files on Slack channels.\n\nThe easiest way to clean up messages and files on Slack.\n\n![](https://media.giphy.com/media/65NO1TrKrJUT6/giphy.gif)\n\n## Installation\n\n```\n$ gem install slack_neuralyzer\n```\n\n## Slack token\n\n\u003ca href='https://api.slack.com/web' target='_blank'\u003e\u003cimg src='screenshots/general_test_token.png' alt='general_test_token' width = '20%' /\u003e\u003c/a\u003e\n\n## Getting Started\n\n![](screenshots/slack_neuralyzer_demo.gif)\n\n### Show all channel names\n\n`slack_neuralyzer -t \u003cTOKEN\u003e -s`\n\n```ruby\nAll user direct:\n  001. leon\n  002. slackbot\n  003. cleanerbot\n\nAll channels (public):\n  001. general\n  002. random\n\nAll groups (private):\n  001. private_channel\n\nAll multiparty direct:\n  001. mpdm-leon--cleanerbot-1\n  002. mpdm-leon--slackbot-1\n```\n\n### Delete message(s)\n\n\u003eRerun below command and use `-e | --execute` to actually delete the message(s).\n\n* Channel\n\n`-C | --channel` `-D | --direct` `-G | --group` `-M | --mpdirect`\n\n```ruby\n# Delete all user messages in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all\n\n# Delete all user messages in leon direct channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -D leon -u all\n\n# Delete all user messages in private_channel groups channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -G private_channel -u all\n\n# Delete all user messages in mpdm-leon--cleanerbot-1 multiparty direct channel\n# (can `use slack_neuralyzer -t \u003cTOKEN\u003e -s` to see mpdirect channle name)\nslack_neuralyzer -t \u003cTOKEN\u003e -m -M mpdm-leon--cleanerbot-1 -u all\n```\n\n* Specific user\n\n`-u | --user`\n\n```ruby\n# Delete leon messages in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u leon\n\n# if you want to specific all users, you can type 'all'\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all\n```\n\n* Specific Bot\n\n`-b | --bot`\n\n```ruby\n# Delete bots messages in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -b cleanerbot\n\n# if you want to specific all bots, you can type 'all' (not bot users)\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -b all\n```\n\n* Delete message(s) between two dates\n\n`-A | --after` `-B | --before`\n\n```ruby\n# Delete all user messages in general channel at 20160101 to 20161212\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all -A 20160101 -B 20161212\n```\n\n* Delete message(s) with specified text\n\n`-R | --regex`\n\n```ruby\n# Delete all user messages with hello string in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all -R hello\n```\n\n### Delete file(s)\n\n\u003e File types: all, spaces, snippets, images, gdocs, docs, zips, pdfs\n\n\u003eRerun below command and use `-e | --execute` to actually delete the message(s).\n\n* Channel\n\n`-C | --channel` `-D | --direct` `-G | --group` `-M | --mpdirect`\n\n```ruby\n# Delete all user upload all type file in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -f all -C general -u all\n\n# Delete leon upload all images file in leon direct channel\nslack_neuralyzer -t \u003cTOKEN\u003e -f images -D leon -u leon\n\n# Delete all user upload all pdfs file in private_channel groups channel\nslack_neuralyzer -t \u003cTOKEN\u003e -f pdfs -G private_channel -u all\n\n# Delete all user upload all zips file in mpdm-leon--cleanerbot-1 multiparty direct channel\n# (can `use slack_neuralyzer -t \u003cTOKEN\u003e -s` to see mpdirect channle name)\nslack_neuralyzer -t \u003cTOKEN\u003e -f zips -M mpdm-leon--cleanerbot-1 -u all\n```\n\n* Specific user and file type\n\n`-u | --user` `-f | --file`\n\n```ruby\n# Delete leon upload images file in general channel\nslack_neuralyzer -t \u003cTOKEN\u003e -f images -C general -u leon\n```\n\n* Delete file between two dates\n\n`-A | --after` `-B | --before`\n\n```ruby\n# Delete all user upload all type file in general channel at 20160101 to 20161212\nslack_neuralyzer -t \u003cTOKEN\u003e -f all -C general -u all -A 20160101 -B 20161212\n```\n\n### Generate log file\n\n`-l | --log`\n\n```ruby\n# Generate a log file in the current directory in ./slack_neuralyzer/YYYY-MM-DDTHH:MM:SS\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all -A 20160101 -B 20161212 -l\n```\n\n\n### Rate\n\n`-r | --rate`\n\n```ruby\n# Delay between API calls in seconds (default:0.05)\nslack_neuralyzer -t \u003cTOKEN\u003e -m -C general -u all -r 0.01\n```\n\n\n### Help\n\n`-h | --help`\n\n```\nusage:\n    slack_neuralyzer [options]\n    See https://github.com/mgleon08/slack_neuralyzer for more information.\n\noptions:\n    -t, --token TOKEN                Slack API token (https://api.slack.com/web)\n    -s, --show                       Show all users, channels, groups and multiparty direct names\n    -m, --message                    Specifies that the delete object is messages\n    -f, --file TYPE                  Specifies that the delete object is files of a certain type (Type: all, spaces, snippets, images, gdocs, docs, zips, pdfs)\n    -C, --channel CHANNEL            Public channel name (e.g., general, random)\n    -D, --direct DIRECT              Direct messages channel name (e.g., leon)\n    -G, --group GROUP                Private groups channel name\n    -M, --mpdirect MPDIRECT          Multiparty direct messages channel name (e.g., mpdm-leon--bot-1 [--show option to see name])\n    -u, --user USER                  Delete messages/files from the specific user (if you want to specific all users, you can type 'all')\n    -b, --bot BOT                    Delete messages from the specific bot (not bot users, if you want to specific all bots, you can type 'all')\n    -A, --after DATE                 Delete messages/files after than this time (YYYYMMDD)\n    -B, --before DATE                Delete messages/files before than this time (YYYYMMDD)\n    -R, --regex TEXT                 Delete messages with specified text (regular expression)\n    -e, --execute                    Execute the delete task\n    -l, --log                        Generate a log file in the current directory\n    -r, --rate RATE                  Delay between API calls in seconds (default:0.1)\n    -v, --version                    Show the SlackNeuralyzer version\n    -h, --help                       Show this message\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [`https://github.com/mgleon08/slack_neuralyzer/pulls`](https://github.com/mgleon08/slack_neuralyzer/pulls)\n\n## Copyright \u0026 License\n\n* Copyright (c) 2016 Leon Ji. See [LICENSE.txt](https://github.com/mgleon08/slack_neuralyzer/blob/master/LICENSE.txt) for further details.\n* The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgleon08%2Fslack_neuralyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgleon08%2Fslack_neuralyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgleon08%2Fslack_neuralyzer/lists"}