@crawldrift/cli
v1.0.2
Published
Official CrawlDrift deployment notification CLI
Readme
@crawldrift/cli
The official one-shot client for notifying CrawlDrift after a deployment.
npx @crawldrift/cli deployment notify \
--project "$CRAWLDRIFT_PROJECT_ID" \
--version "$APP_VERSION" \
--build "$BUILD_NUMBER" \
--commit "$COMMIT_SHA" \
--environment production \
--trigger-crawlAt least one of --version, --build, or --commit is required. The API key is sent only as a Bearer token. Arguments override their corresponding environment variables.
| Environment variable | CLI override | Purpose |
| --- | --- | --- |
| CRAWLDRIFT_API_KEY | --api-key | Project-scoped deployment key |
| CRAWLDRIFT_PROJECT_ID | --project | Project public ID |
| CRAWLDRIFT_VERSION | --version | Release version, maximum 100 characters |
| CRAWLDRIFT_BUILD_NUMBER | --build | Build number, maximum 100 characters |
| CRAWLDRIFT_COMMIT_SHA | --commit | Commit SHA, maximum 100 characters |
| CRAWLDRIFT_ENVIRONMENT | --environment | Environment, maximum 50 characters |
| CRAWLDRIFT_EXTERNAL_DEPLOYMENT_ID | --external-deployment-id | Stable provider deployment ID, maximum 200 characters |
| CRAWLDRIFT_TRIGGER_CRAWL | --trigger-crawl | true or false |
| CRAWLDRIFT_ROLLOUT_DELAY_SECONDS | --rollout-delay-seconds | Integer from 0 through 3600 |
The external deployment ID is used as the idempotency key when it is a valid header value; otherwise the CLI uses its stable hash. Without an external ID, the CLI generates a key. The resolved value is reused for every retry in the invocation.
Use --json for a machine-readable result. Requests have a 10-second timeout and at most three attempts. Only network failures, connection resets, timeouts, and HTTP 502, 503, or 504 responses are retried, with bounded exponential backoff and jitter.
Exit codes are stable:
| Code | Meaning |
| --- | --- |
| 0 | Success |
| 1 | Unexpected client or API response error |
| 2 | Invalid arguments |
| 3 | Authentication or authorization failure |
| 4 | API validation failure |
| 5 | Transport timeout or failure |
| 6 | Server unavailable |
