Skip to main content

auth login

Authenticate with OpenCX via browser flow.
opencx auth login
FlagDescription
--token <key>Use API key directly (for CI)
Stores credentials at ~/.opencx/credentials.

content init

Initialize a new content project.
opencx content init
Creates opencx.toml, content directory, and lock file. Idempotent — safe to run multiple times.

content check

Validate content files locally. No API calls.
opencx content check
Checks frontmatter syntax, TOML validity, and directory structure. Exit code 1 on errors.

content diff

Show what would change without pushing. Same as push --dry-run.
opencx content diff
Exit codes: 0 = no changes, 1 = has changes (useful for CI scripts).

content push

Push local content to your help center.
opencx content push [--yes] [--dry-run]
FlagDescription
--yes, -ySkip confirmation prompts (CI mode)
--dry-runShow diff only, do not push
Flow: validate → parse local tree → fetch remote tree → compute diff → display plan → confirm → sync → update lock file.

content pull

Pull published content from your help center to disk.
opencx content pull
Downloads all published articles and topics. Updates the lock file.

content gate

CI gate command — validates content and checks for drift.
opencx content gate
Runs validation and diff checks. Exit code 1 if validation fails or drift is detected. Designed for pull request CI checks.

content dev

Start a local preview server.
opencx content dev [--port <number>]
FlagDescription
--portPort number (default: 3333)