Syntax
Description
Theexport command writes the current state of the SQLite database to JSONL (JSON Lines) files. This creates machine-readable, line-delimited JSON files that serve as the source of truth for sudocode projects.
Exported files:
specs.jsonl- All specificationsissues.jsonl- All issuesrelationships.jsonl- All relationships (optional)
export to:
- Create backups
- Prepare for migration
- Generate data for external tools
- Manually inspect database state
- Share project state
Arguments
--output /backup/sudocode-exportDirectory will be created if it doesn’t exist. Existing files will be overwritten.Examples
Basic Export
Export to default location (.sudocode/):
Expected output
Expected output
.sudocode/specs.jsonl.sudocode/issues.jsonl
Export to Backup Directory
Create a dated backup:Expected output
Expected output
Export for External Processing
Export to temporary directory for analysis:Expected output
Expected output
JSON Output
Get machine-readable output:JSON output
JSON output
JSONL Format
JSONL (JSON Lines) format stores one JSON object per line:specs.jsonl
issues.jsonl
Common Workflows
Daily Backup
Create automated backups:Pre-Migration Export
Before major changes:Export current state
Verify export
Perform migration
Keep backup
Share Project State
Export for team member or external tool:Export to clean directory
Package
Share
sudocode-export.tar.gz to collaboratorRecipient imports
Data Analysis
Export for external analysis:Scripting Examples
Incremental Backup
Keep incremental backups:Export Statistics
Generate report from export:Export to CSV
Convert JSONL to CSV for spreadsheet:Understanding Export
What Gets Exported
Specs:- All spec fields (id, uuid, title, content, priority, etc.)
- Archived specs included
- Parent relationships included
- All issue fields (id, uuid, title, content, status, priority, etc.)
- Archived issues included
- Parent relationships included
- Relationships (separate file if needed)
- Tags (embedded in entity data)
- Feedback (embedded in entity data)
- Database-only computed views
Export is Source of Truth
JSONL files are the canonical representation:- Git-friendly (line-by-line diffs)
- Human-readable (one object per line)
- Easy to process (standard JSON)
- Complete (all entity data)
Comparison with Sync
export
- One direction
- Overwrites JSONL files
- No markdown involved
- Raw data export
sync
- Auto-detects direction
- Handles markdown too
- Complete workflow
- Normal operations
- Creating backups
- Manual data extraction
- Preparing for import elsewhere
- Normal development workflow
- After git pull
- After manual edits
Common Questions
Do I need to export manually?
Do I need to export manually?
- Creating backups
- Snapshots before major changes
- Exporting to external tools
What's the difference between export and sync?
What's the difference between export and sync?
- export: Database → JSONL only, one direction
- sync: Bidirectional, handles markdown too, auto-detects direction
sync for normal operations, export for manual data extraction.Can I export specific entities?
Can I export specific entities?
Are relationships exported?
Are relationships exported?
relationships field. A separate relationships.jsonl is not currently created by default.Can export overwrite existing files?
Can export overwrite existing files?
What format is the timestamp?
What format is the timestamp?
2025-10-29T10:00:00ZTroubleshooting
Export fails with permission error
Export fails with permission error
- Check directory permissions
- Create directory manually:
Exported files are empty
Exported files are empty
Export creates files but they're corrupted
Export creates files but they're corrupted
- Check disk space:
df -h - Verify file integrity:
- Re-export if needed
Export doesn't include recent changes
Export doesn't include recent changes
Related Commands
import
sync
status
Next Steps
Export current state
Verify export
Store safely
Automate

