CLI Reference
zof auth
Authenticate CLI sessions.
Overview
Authenticate CLI sessions with your organization.
Install the CLI globally with npm install -g @zof-ai/cli or use npx for CI pipelines without global install. Requires Node.js 18+ and ZOF_API_KEY or interactive auth.
Who should read this
- Developers and CI pipelines invoking Zof from terminal environments.
Prerequisites
- Node.js 18+
- ZOF_API_KEY in environment or completed zof auth login
When to use this workflow
- Onboarding new team members to Zof terminology and workflows
- Authoring internal runbooks aligned with Console labels
- Designing CI/CD or webhook integrations against documented behavior
Step-by-step procedure
Verify install
Run zof version to confirm CLI availability.
Run zof auth whoami to confirm organization context.
Run command
$ zof auth login
$ zof auth logout
$ zof auth whoami
Interpret exit code
0: success.
1: invalid flags or local error.
2: auth failure.
3: API error; check message and X-Request-Id.
Key concepts
- Usage
- zof auth login [--browser]
- Exit codes
- 0 success; 1 command error; 2 authentication failure; 3 API error.
Best practices
- Use --wait on zof run in CI to block until terminal status
- Pin CLI version in pipelines: npm install -g @zof-ai/cli@<version>
- Prefer ZOF_API_KEY over interactive login in automation
Examples
$ zof auth login $ zof auth logout $ zof auth whoami
Was this page helpful?