---
title: Automation and CI
description: Run the Sift CLI with structured output and headless credentials.
product: cli
lifecycle: stable
appliesTo: "@sift-wiki/cli@0.1.10"
sourceArtifact: "@sift-wiki/cli@0.1.10"
owner: CLI owner
raw: /raw/cli/automation.md
---

Pin the package and request JSON:

```bash
npx -y @sift-wiki/cli@0.1.10 context assemble "release risks" --json
```

Exit code `0` means the command completed; non-zero means auth, permission, validation, availability, conflict, or upstream failure. Parse the structured error code instead of matching human prose.

For headless auth, use only the service/scoped credential mechanism exposed by your Sift workspace. Store it in the CI secret manager, scope capabilities and workspace narrowly, never echo it, and revoke it after the job or incident. Browser profile credentials are for interactive use.

Run `sift doctor --json` as a preflight. Do not call write commands from retry loops without idempotency and explicit intent.
