CROP

Usage

Available commands and workflow examples

Available Commands

CommandDescription
npm run archive:dry-runPreview what will be archived (no changes)
npm run archiveArchive issues to disk only
npm run archive:deleteArchive and delete from Linear
npm run archive:forceRe-archive existing issues
npm run archive:force-deleteRe-archive and delete
npm run typecheckCheck 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 existing

Workflow 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 push

Manual Backup Only

# Archive without deleting from Linear
npm run archive

# Commit
git add data/
git commit -m "chore: backup Linear issues"
git push

Automation

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 push

GitHub Actions

See .github/workflows/archive.yml in the repository.

On this page