A tool to extract and preserve Trello boards, creating organized folder structures with markdown files and comprehensive metadata preservation.
- ✅ Complete Board Extraction: Cards, lists, metadata, and attachments
- ✅ Authenticated Downloads: Trello API integration for attachment access
- ✅ Organized Structure: Clean folder hierarchy with markdown files
- ✅ Modular Architecture: SOLID principles with separate class files
- ✅ Multiple Auth Methods: Config file, environment variables, or CLI args
- ✅ Error Handling: Graceful fallback with detailed attachment information
- ✅ Rich Metadata: Board info, labels, members, and timestamps
✅ Working: Attachment downloads work reliably when you provide valid Trello API credentials. The tool will:
- Attempt multiple download methods for each attachment
- Use the most reliable API endpoint with OAuth authentication
- Download files with original names and metadata
- Create fallback info files only if downloads fail
- Continue processing all other board content normally
Setup Required: You'll need to set up Trello API credentials (see Authentication Setup below) for attachment downloads to work.
ruby src/trello_extractor.rb exports/your-board.jsonruby src/trello_extractor.rb setupruby src/trello_extractor.rb exports/your-board.jsonNo external dependencies required! Uses only Ruby standard library.
git clone <repository>
cd trello-extractor
ruby src/trello_extractor.rb setup # Optional: for attachment downloadsTo attempt attachment downloads, you need Trello API credentials:
ruby src/trello_extractor.rb setupFollow the prompts to enter your API key and token.
export TRELLO_API_KEY="your_api_key_here"
export TRELLO_TOKEN="your_token_here"ruby src/trello_extractor.rb exports/board.json extracted/board YOUR_API_KEY YOUR_TOKEN- Visit: https://trello.com/app-key
- Copy your API Key
- Click "Token" to generate a read-only token
- Use these in the setup command
# Show help
ruby src/trello_extractor.rb
# Setup authentication
ruby src/trello_extractor.rb setup
# Extract board (basic)
ruby src/trello_extractor.rb exports/board-export.json
# Extract to specific directory
ruby src/trello_extractor.rb exports/board-export.json extracted/my-board
# Extract with inline credentials
ruby src/trello_extractor.rb exports/board-export.json extracted/my-board API_KEY TOKENTo get the JSON file that this tool processes:
- Open your Trello board
- Go to Board Menu → More → Print and Export → Export as JSON
- Save the downloaded JSON file to the
exports/directory - Run the extractor on that file
trello-extractor/
├── exports/ # Source JSON files from Trello export (gitignored)
├── extracted/ # Converted boards output (gitignored)
├── src/ # Tool source code
│ ├── trello_extractor.rb # Main extractor class
│ └── lib/ # Supporting classes
│ ├── card_markdown_builder.rb # Card → Markdown conversion
│ ├── attachment_downloader.rb # Authenticated file downloads
│ ├── readme_builder.rb # Board README generation
│ ├── metadata_builder.rb # Metadata extraction
│ └── trello_config.rb # Configuration management
├── Gemfile # Ruby dependencies
├── .gitignore # Git ignore rules
├── .trello_config.json # API credentials (gitignored)
└── README.md # This file
Each extracted board creates:
extracted/{board-name}/
├── README.md # Board overview with stats
├── lists/ # Cards organized by list
│ ├── {list-name}/
│ │ ├── {card-name}.md # Individual card files
│ │ └── attachments/ # Downloaded files (when successful)
├── attachments/ # Global attachments directory
└── metadata/ # Board configuration
├── board-info.json # Board details
├── labels.json # Label definitions
└── members.json # Member information
Each card is converted to markdown with:
- Header: Card name
- Metadata: List, creation date, due date, labels
- Description: Full card description
- Checklists: With completion status
- Attachments: Links to downloaded files or URLs when download fails
- Comments: Chronological comment history
The tool follows SOLID principles with separate classes for each responsibility:
TrelloExtractor: Main orchestration and file operationsCardMarkdownBuilder: Converts cards to markdown formatAttachmentDownloader: Handles authenticated file downloadsReadmeBuilder: Generates board overviewMetadataBuilder: Extracts board metadataTrelloConfig: Manages API credentials
- ✅ API credentials gitignored - Never committed to version control
- ✅ Read-only tokens - Minimal permissions required
- ✅ Multiple auth methods - Choose what works for you
- ✅ Graceful fallback - Works without authentication
- Command line arguments (highest priority)
- Environment variables (
TRELLO_API_KEY,TRELLO_TOKEN) - Configuration file (
.trello_config.json)
If attachments fail to download:
- Ensure you've set up authentication with
ruby src/trello_extractor.rb setup - Verify your API key and token are correct at https://trello.com/app-key
- Check that your token has read permissions
- The tool will create
attachment_info.mdfiles with URLs for manual download if needed
- Run
ruby src/trello_extractor.rb setupto configure credentials interactively - Verify your API key and token are correct at https://trello.com/app-key
- Check that your token has read permissions
- This is normal for boards with many cards/attachments
- The tool processes sequentially to avoid rate limits
- Progress is shown during extraction
- Ensure you have write permissions to the output directory
- Check that the exports directory contains your JSON files
If automatic download fails for specific attachments:
- Check the
attachment_info.mdfiles in each list's attachments folder - Copy the URLs from these files
- Manually download attachments while logged into Trello
- Save them to the appropriate attachments folders
- Board Archival: Preserve project history and documentation
- Data Migration: Move content between project management tools
- Backup Creation: Create local copies of important boards
- Documentation: Convert Trello boards to readable markdown format
- Analysis: Extract data for reporting or analysis
- Follow SOLID principles
- Keep classes focused and testable
- Add error handling for edge cases
- Update documentation for new features