CLI Reference

The bullrun CLI manages your project from the terminal.

bullrun init

Initialize a new BullRun project in the current directory.

npx bullrun init

Creates bullrun.config.ts and an example task file. Prompts for your project ID.

bullrun login

Authenticate with your BullRun account.

# Interactive login
npx bullrun login

# Token-based (CI/CD)
npx bullrun login --token br_...

bullrun dev

Start a local development server with hot reload.

npx bullrun dev
npx bullrun dev --tasks ./src/jobs --redis-url redis://localhost:6379

Watches your task files for changes and restarts the worker automatically. Requires a local Redis instance (or use the one from docker compose up).

bullrun deploy

Deploy task definitions to BullRun.

npx bullrun deploy

bullrun status

Show queue health and stats.

npx bullrun status
npx bullrun status --project proj_abc123

bullrun logs

View logs for a specific job.

npx bullrun logs <jobId>
npx bullrun logs <jobId> --follow     # Poll for new logs
npx bullrun logs <jobId> --limit 500  # More lines

bullrun migrate

Scan existing BullMQ code and generate BullRun task definitions.

npx bullrun migrate
npx bullrun migrate --dir ./src --out ./tasks
npx bullrun migrate --dry-run

Scans your codebase for BullMQ Worker/Queue usage, extracts queue names and job names, and generates defineTask() wrappers with TODO comments pointing to the original source files.