CLI
The Queuebase CLI (@queuebase/cli) provides commands for local development and production deployment.
queuebase dev
Section titled “queuebase dev”Starts the local development server.
npx queuebase dev [options]| Flag | Description | Default |
|---|---|---|
--port <port> | Server port | 3847 |
--callback <url> | Callback URL for job execution | http://localhost:3000/api/queuebase |
On startup the dev server:
- Initializes a local SQLite database at
.queuebase/dev.db - Reads the manifest at
.queuebase/queuebase.manifest.json(if it exists) - Syncs any scheduled jobs from the manifest into the database
- Starts the HTTP API and job executor
queuebase generate
Section titled “queuebase generate”Discovers your job router, extracts schedule metadata, and writes a manifest file.
npx queuebase generateThe command:
- Looks for your job router using convention paths or a config file
- Loads the router module and extracts job definitions
- Builds a manifest with job names and resolved schedule configs
- Writes the manifest to
.queuebase/queuebase.manifest.json
Router discovery
Section titled “Router discovery”The CLI looks for your router in the following order:
Convention paths (checked first):
src/jobs/index.tssrc/jobs/index.jsjobs/index.tsjobs/index.js
Config file (fallback):
If no convention path matches, the CLI looks for queuebase.config.ts or queuebase.config.js in the project root:
export default { routerPath: "./src/jobs/index.ts",};Manifest format
Section titled “Manifest format”The generated manifest looks like this:
{ "version": 1, "generatedAt": "2026-03-16T12:00:00.000Z", "jobs": { "sendEmail": {}, "dailyReport": { "schedule": { "cronExpression": "0 9 * * *", "timezone": "UTC", "enabled": true, "overlap": "skip" } } }}queuebase sync
Section titled “queuebase sync”Syncs schedule definitions from the manifest to the production API.
npx queuebase sync [options]| Flag | Description | Default |
|---|---|---|
--api-url <url> | Production API URL | https://api.queuebase.com |
--dry-run | Preview changes without applying | false |
The command:
- Reads the manifest at
.queuebase/queuebase.manifest.json - Extracts jobs that have a
scheduleproperty - Posts the schedule definitions to the production API
- The API diffs against the database: new schedules are inserted, changed ones are updated, and removed ones are soft-deleted
Environment variables
Section titled “Environment variables”| Variable | Description | Required |
|---|---|---|
QUEUEBASE_API_KEY | API key for authentication | Yes |
QUEUEBASE_API_URL | Override the API URL (lower priority than --api-url flag) | No |
Dry run
Section titled “Dry run”Use --dry-run to preview what the sync would do without making changes:
npx queuebase sync --dry-runThe output shows a diff of what would be inserted (+), updated (~), or deleted (-):
Dry run — no changes applied
+ dailyReport (0 9 * * *, UTC) ~ weeklyDigest cronExpression: "0 9 * * 1" → "0 10 * * 1" - oldCleanup (will be soft-deleted)
1 to insert, 1 to update, 1 to deleteCI/CD usage
Section titled “CI/CD usage”Add queuebase sync as a deploy step after building your app:
npx queuebase generatenpx queuebase syncThe sync is idempotent — running it multiple times with the same manifest produces the same result. The command exits with code 0 on success and 1 on any failure.