Skip to content

CLI entrypoint: bun run linear:sync command #83

@mateicanavra

Description

@mateicanavra

TL;DR

Create the CLI entrypoint script and package.json command for running the Linear sync, with options for project filtering, dry-run mode, and verbose output.

Deliverables

  • scripts/linear-sync/cli.ts main entrypoint
  • package.json script: "linear:sync": "bun run scripts/linear-sync/cli.ts"
  • --project <slug> flag to filter by project
  • --dry-run flag to preview without syncing
  • --verbose flag for detailed logging
  • --help flag with usage documentation
  • Config file support (linear-sync.config.ts or similar)

Acceptance Criteria

  • bun run linear:sync syncs all projects
  • bun run linear:sync --project engine-refactor-v1 syncs single project
  • bun run linear:sync --dry-run shows what would change without API calls
  • Exit code 0 on success, non-zero on errors
  • Summary output: X created, Y updated, Z skipped, N errors
  • Environment variable LINEAR_API_KEY required (error if missing)

Testing / Verification

# Show help
bun run linear:sync --help

# Dry run all projects
bun run linear:sync --dry-run

# Sync specific project
bun run linear:sync --project engine-refactor-v1

# Verbose output
bun run linear:sync --project engine-refactor-v1 --verbose

Dependencies / Notes

  • Depends on: Parser, Lookup, Sync modules
  • Blocks: Post-tool hook (needs working CLI to trigger)
  • Pattern: Use process.argv or lightweight arg parser (avoid heavy CLI frameworks)
  • Config: Team ID, default workspace, glob patterns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions