Usage
Available commands and workflow examples
Available Commands
| Command | Description |
|---|---|
npm run archive:dry-run | Preview what will be archived (no changes) |
npm run archive | Archive issues to disk only |
npm run archive:delete | Archive and delete from Linear |
npm run archive:force | Re-archive existing issues |
npm run archive:force-delete | Re-archive and delete |
npm run typecheck | Check TypeScript compilation |
Command Line Flags
You can also run the script directly with flags:
npx tsx src/archive.ts --dry-run # Preview
npx tsx src/archive.ts # Archive only
npx tsx src/archive.ts --delete # Archive + Delete
npx tsx src/archive.ts --force # Re-archive existingWorkflow Examples
Weekly Cleanup
# 1. Preview what will be archived
npm run archive:dry-run
# 2. If looks good, archive and delete
npm run archive:delete
# 3. Commit to git
git add data/
git commit -m "chore: weekly archive"
git pushManual Backup Only
# Archive without deleting from Linear
npm run archive
# Commit
git add data/
git commit -m "chore: backup Linear issues"
git pushAutomation
Cron (weekly on Sunday 3am)
0 3 * * 0 cd /path/to/CROP-linear-archive && npm run archive:delete && git add -A && git commit -m "chore: weekly archive" && git pushGitHub Actions
See .github/workflows/archive.yml in the repository.