Download your Stripe data to a SQLite database
You can have all your Stripe data as SQLite tables in under a minute with the Table Dog CLI:
Create a config file
Save this to a file called config.json
:
{
"cmd": {
"fn": "download",
"args": {
"from": {
"stripe": {
"secret_key": "sk_test_... download at https://dashboard.stripe.com/apikeys"
}
},
"to": {
"sqlite": {
"file": "/absolute/path/db.sqlite"
}
},
"options": {
"watch": true
}
}
},
"log": "info"
}
Note: This TypeScript file documents all possible CLI options.
Install the tdog
CLI
# macOS:
curl -L --output /usr/local/bin/tdog https://github.com/tabledog/tdog-cli/releases/latest/download/tdog-x86_64-apple-darwin
chmod +x /usr/local/bin/tdog
- For other OS's: https://github.com/tabledog/tdog-cli
Run tdog
to download all of your tables
This will also poll the Stripe /events
API and apply changes with less than a second delay.
tdog --json-file config.json