TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/buttondown/cli/llms.txt
Use this file to discover all available pages before exploring further.
pull command downloads your newsletter content from Buttondown and saves it to local files, making it easy to work with your content offline or integrate with version control.
How Pull Works
When you runbuttondown pull, the CLI performs a synchronized workflow:
Pull Base Resources
Downloads automations, newsletter settings, and snippets from the Buttondown API and saves them as local files.
Pull and Download Images
Fetches all images from your media library and downloads them to the
media/ directory. The CLI builds a mapping between remote URLs and local file paths.Pull Emails with Image Conversion
Downloads all emails and automatically converts absolute image URLs to relative paths that reference your local
media/ directory.Basic Usage
Pull all content from your newsletter:What Gets Pulled
Emails
Emails are saved as Markdown files with YAML frontmatter:emails/welcome-email.md
Absolute image URLs from Buttondown are automatically converted to relative paths pointing to your local
media/ directory.Media
All images from your Buttondown media library are downloaded tomedia/ with their original filenames:
Automations
Automations are saved as JSON files named by their slugified name:automations/welcome-series.json
Snippets
Snippets are saved as Markdown files with frontmatter:snippets/footer.md
Newsletter Settings
Your newsletter configuration is saved asnewsletter.json:
newsletter.json
Understanding Image Conversion
The pull command intelligently handles images:-
Remote URLs to Local Paths: Images referenced in emails like
https://buttondown.s3.amazonaws.com/images/abc123.pngare converted to relative paths like../media/abc123.png -
Sync State Tracking: The
.buttondown-sync.jsonfile maintains a mapping:
.buttondown-sync.json
- Relative Paths: Email content is updated so you can reference images locally:
Pull Results
After pulling, you’ll see a summary:Working with Pulled Content
Once content is pulled, you can:- Edit emails in your favorite text editor
- Track changes with Git
- Preview Markdown locally
- Search across all content with standard tools
- Automate workflows with scripts
Next Steps
Push Changes
Learn how to push your local changes back to Buttondown
Manage Emails
Create and edit newsletter emails locally