{"id":19964601,"url":"https://github.com/wearefine/slack-archive-bot","last_synced_at":"2025-08-08T17:35:59.346Z","repository":{"id":25904312,"uuid":"105672398","full_name":"wearefine/slack-archive-bot","owner":"wearefine","description":"A Node cli to archive Slack channels that meet certain criteria.","archived":false,"fork":false,"pushed_at":"2022-07-07T07:13:38.000Z","size":152,"stargazers_count":11,"open_issues_count":8,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T00:38:49.377Z","etag":null,"topics":["archive","bot","cli","nodejs","slack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/wearefine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-03T16:03:23.000Z","updated_at":"2024-07-17T15:33:30.000Z","dependencies_parsed_at":"2022-08-07T11:16:09.224Z","dependency_job_id":null,"html_url":"https://github.com/wearefine/slack-archive-bot","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearefine%2Fslack-archive-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearefine%2Fslack-archive-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearefine%2Fslack-archive-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearefine%2Fslack-archive-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearefine","download_url":"https://codeload.github.com/wearefine/slack-archive-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252269026,"owners_count":21721239,"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":["archive","bot","cli","nodejs","slack"],"created_at":"2024-11-13T02:24:28.930Z","updated_at":"2025-05-03T23:30:32.789Z","avatar_url":"https://github.com/wearefine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Slack archive bot\n================\n\n## Summary\n\nThis is a Nodejs cli to archive Slack channels that meet certain criteria.\n\n## Install\n\nThis project is setup to use Yarn but NPM also works.\n\nyarn:\n```sh\nyarn global add slack-archivebot\n```\nnpm:\n```sh\nnpm install -g slack-archivebot\n```\n\n## Usage\n\n```\nUsage: slack-archivebot [options]\n\n  Options:\n\n    -V, --version               output the version number\n    -t, --token \u003cstring\u003e        Slack API bot token. You should probably use ARCHIVEBOT_SLACK_TOKEN as an ENV VAR.\n    -d, --days [n]              Number of days of inactivity. Default: 30\n    -m, --members [n]           Maximum number of members in the channel. Default: 1\n    -n, --never-archive [list]  List of channels to never archive.\n    -b, --basic                 Only prints basic log messages. For use with cron or task runners. Default: false\n    -h, --help                  output usage information\n```\nYou can provide the values as arguments or env vars (listed below). The cli arguments take precedence. It is highly recommended that you put the token into an environment variable. It is setup to run anytime with a recommended run of once a day or less. \n\n## Environment Variables\nARCHIVEBOT_SLACK_TOKEN=The super secret bot [OAuth token](https://api.slack.com/apps)\n\nARCHIVEBOT_MEMBERS=The minimum number of members a channel can have to archive\n\nARCHIVEBOT_DAYS=The number of days of inactivity\n\nARCHIVEBOT_NEVER_ARCHIVE=Comma delimited list of channels to never archive\n\nARCHIVEBOT_BASIC=true || false\n\n## Rate limits\n\nDue to Slack's strict rate limit and given that several requests need to be made per channel. The script will run each request at a rate of 1 request per 2 seconds. This will help avoid the rate limit that Slack imposes of roughly 1 req/s. Don’t run the cli more than once every hour to avoid rate limits.\n\n## Docker\n\nThere is now a Dockerfile that can be used to build a container to run the cli.\n\nUsing environment variables\n```bash\ndocker run --rm -d \\\n-e ARCHIVEBOT_NEVER_ARCHIVE=$ARCHIVEBOT_NEVER_ARCHIVE \\\n-e ARCHIVEBOT_SLACK_TOKEN=$ARCHIVEBOT_SLACK_TOKEN \\\n-e ARCHIVEBOT_INACTIVITY_DAYS=$ARCHIVEBOT_INACTIVITY_DAYS \\\nslack-archivebot\n```\n\nUsing flags\n```bash\ndocker run --rm -d \\\nslack-archivebot -n \"test\" -t abc123 -d 60\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearefine%2Fslack-archive-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearefine%2Fslack-archive-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearefine%2Fslack-archive-bot/lists"}