{"id":31737400,"url":"https://github.com/cattte/reddit-migrate","last_synced_at":"2025-10-09T09:12:35.805Z","repository":{"id":55559745,"uuid":"290585248","full_name":"cAttte/reddit-migrate","owner":"cAttte","description":"A command-line tool to migrate, export, import, and purge reddit account data!","archived":false,"fork":false,"pushed_at":"2023-12-25T16:05:06.000Z","size":233,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-25T18:04:51.068Z","etag":null,"topics":["data","export","import","migrate","reddit"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cAttte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-26T19:22:09.000Z","updated_at":"2023-12-25T16:05:10.000Z","dependencies_parsed_at":"2022-08-15T03:10:51.507Z","dependency_job_id":null,"html_url":"https://github.com/cAttte/reddit-migrate","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"purl":"pkg:github/cAttte/reddit-migrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cAttte%2Freddit-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cAttte%2Freddit-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cAttte%2Freddit-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cAttte%2Freddit-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cAttte","download_url":"https://codeload.github.com/cAttte/reddit-migrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cAttte%2Freddit-migrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001123,"owners_count":26083021,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data","export","import","migrate","reddit"],"created_at":"2025-10-09T09:09:56.112Z","updated_at":"2025-10-09T09:12:35.798Z","avatar_url":"https://github.com/cAttte.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reddit-migrate\n\nA command-line tool to migrate, export, import, and purge reddit account data!\n\n\u003cdetails\u003e\u003csummary\u003eDemo\u003c/summary\u003e\n\n![][term-migrate]\n\n\u003c/details\u003e\n\nIt migrates/exports/imports subscribed subreddits, followed users, friends, blocked users, multireddits, profile settings, and account preferences. It can also purge (mass-delete) your comments and submissions.\n\n## Installation\n\n    npm i -g cAttte/reddit-migrate\n\n## Usage\n\n    reddit-migrate [command] [options]\n\n### Commands\n\n#### help\n\nDisplay command help.\n\n#### migrate\n\nMigrate to a new reddit account.\n\n**Options:**\n\n-   `-e \u003cpath\u003e`, `--env-file \u003cpath\u003e`: Path of the .env file to load credentials from.\n-   `-? \u003clist\u003e`, `--which \u003clist\u003e`: A comma-separated list of attributes to migrate, or 'all'.\n\n#### import\n\nImport data to a reddit account.\n\n**Options:**\n\n-   `-e \u003cpath\u003e`, `--env-file \u003cpath\u003e`: Path of the .env file to load credentials from.\n-   `-i \u003cpath\u003e`, `--input \u003cpath\u003e`: Path of the input file. **(required)**\n-   `-? \u003clist\u003e`, `--which \u003clist\u003e`: A comma-separated list of attributes to import, or 'all'.\n\n#### export\n\nExport data from a reddit account.\n\n**Options:**\n\n-   `-e \u003cpath\u003e`, `--env-file \u003cpath\u003e`: Path of the .env file to load credentials from.\n-   `-o \u003cpath\u003e`, `--output \u003cpath\u003e`: Path of the output file. **(required)**\n-   `-p`, `--pretty`: Whether to prettify the output JSON.\n-   `-w`, `--overwrite`: Avoid the 'overwrite?' prompt if file already exists.\n-   `-? \u003clist\u003e`, `--which \u003clist\u003e`: A comma-separated list of attributes to export, or 'all'.\n\n#### purge\n\nMass-delete reddit account content.\n\n**Options:**\n\n-   `-e \u003cpath\u003e`, `--env-file \u003cpath\u003e`: Path of the .env file to load credentials from.\n-   `-d \u003ctext\u003e`, `--edit \u003ctext\u003e`: Text to edit messages and posts to before deleting.\n-   `-? \u003ctype\u003e`, `--which \u003ctype\u003e`: Submission type to delete; 'posts', 'comments', or 'all'.\n\n### Credentials\n\nAs seen in the command options, you can pass the path/filename of a `.env` file, containing the credentials of the reddit account(s). However, if it's not provided (or the credentials are not included in the file), the CLI will prompt you to enter them:\n\n![][term-credentials]\n\nCheck out [**example.env**][example-env] to find out how the file should look for each command.\n\n#### Obtaining CLIENT_ID and CLIENT_SECRET\n\n-   Head over to the [**Apps**][apps] section of your reddit account preferences.\n-   Click on the **create app** button.\n-   Type whatever in the **name** and **redirect URI** fields. Make sure to select the **script** app type.\n-   Your client ID will be shown below the app name and type. The secret, next to the other app info.\n\n## License\n\nThis project uses the [**MIT License**][mit-license]. [Check it out][license-md] for more info.\n\n## TODO\n\n-   [ ] Migrate/import profile picture and banner; these are not imported correctly with the URLs.\n-   [x] Add an option to specify which data should be imported/exported/migrated.\n-   [ ] Add a feature to \"clear\" data; unsubscribe from all subreddits, unfollow everyone, etc.\n-   [x] Add a feature to mass delete comments and posts, optionally editing them before.\n-   [ ] Move to a reddit API wrapper that doesn't suck ass (ie, not snoowrap).\n\n\u003c!-- References --\u003e\n\n[example-env]: https://github.com/cAttte/reddit-migrate/blob/master/example.env\n[apps]: https://www.reddit.com/prefs/apps\n[mit-license]: https://en.wikipedia.org/wiki/MIT_License\n[license-md]: https://github.com/cAttte/reddit-migrate/blob/master/LICENSE.md\n[term-migrate]: https://raw.githubusercontent.com/cAttte/reddit-migrate/master/terminal/migrate.svg\n[term-credentials]: https://raw.githubusercontent.com/cAttte/reddit-migrate/master/terminal/credentials.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcattte%2Freddit-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcattte%2Freddit-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcattte%2Freddit-migrate/lists"}