Converts the "Total Email List" and "Subscribers" CSV exports from Substack to a CSV compatible with Ghost.
npm install @tryghost/mg-substack-members-csvConverts the "Total Email List" and "Subscribers" CSV exports from Substack to a CSV compatible with Ghost.
To install the CLI, which is required for the Usage commands below:
``sh`
npm install --global @tryghost/migrate
To use this package in your own project:
npm install @tryghost/mg-substack-members-csv --save
or
yarn add @tryghost/mg-substack-members-csv
To run a Substack CSV migration, the required command is:
`sh`
migrate substack-members --pathToFile /path/to/emails.csv
To convert paid subscriptions, add --subs with a second file path:
`sh`
migrate substack-members --pathToFile /path/to/emails.csv --subs /path/to/members.csv
It's possible to pass more options, in order to achieve a better migration file for Ghost:
- --pathToFile (required)
- Path to the signups CSV file as generated by Substack ("Total Email List").
- string - default: null-V
- --verbosefalse
- Show verbose output
- bool - default: -s
- --subsnull
- Path to the subscribers CSV file (paid, comp, gift) as generated by Substack ("Subscribers")
- string - default: -l
- --limit5000
- Define the batch limit for import files
- int - default: --comp
- YY|YYYYMMDD:none|free
- Provide two values in the format . YY is the threshold in years or YYYYMMDD as the exact date after which Substack comp members should receive a complimentary plan depending on the expiry date. none|free the option how to import members before this threshold, e. g. 5:free0:free
- string - default: YY:none
- Choices: , YY:free, YYYYMMDD:none, YYYYMMDD:free--compLabel
- comp
- Provide a label for Substack subscriberssubstack-comp
- string - default: --gift
- YY|YYYYMMDD:none|free
- Provide two values in the format . YY is the threshold in years or YYYYMMDD as the exact date after which Substack gift members should receive a complimentary plan depending on the expiry date. none|free the option how to import members before this threshold, e. g. 5:free0:free
- string - default: YY:none
- Choices: , YY:free, YYYYMMDD:none, YYYYMMDD:free--giftLabel
- gift
- Provide a label for Substack subscriberssubstack-gift
- string - default: --freeLabel
- free
- Provide a label for Substack subscriberssubstack-free
- string - default: --paidLabel
- paid
- Provide a label for Substack subscriberssubstack-paid
- string - default: --cache
- --zip
- Persist local cache after migration is complete (Only if is true)true
- bool - default:
A more complex migration command that accounts for Stripe data could look like this:
`sh`
migrate substack-members --pathToFile /path/to/emails.csv --subs /path/to/members.csv --giftLabel Gifted --freeLabel Free --paidLabel Supporter --compLabel 'Try It Out'
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
1. git clone this repo & cd into it as usualyarn
2. Run to install top-level dependencies.
To run a local development copy, cd into this directory, and use yarn dev instead of migrate like so:
`sh`
yarn dev substack-members --pathToFile /path/to/emails.csv
- yarn lint run just eslintyarn test` run lint and tests
-
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.