Skip to content

Developers

CLI

Command-line interface for execution, configuration, and pipeline integration.

Overview

The Zof CLI provides terminal access to authentication, project initialization, run execution, and report export, ideal for local developer workflows and CI/CD steps without custom HTTP code.

Install globally via npm and authenticate once per machine or CI runner. Configuration persists in zof.config.js at project root and environment variables for secrets.

Who should read this

  • QA engineers, SREs, platform teams, and developers operating Zof Console and APIs.

Prerequisites

  • Node.js 18+
  • npm, pnpm, or yarn
  • Organization API key or interactive login for CI

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

Install

npm install -g @zof-ai/cli

Verify: zof --version

Authenticate

zof auth login, opens browser for SSO or OTP.

For CI: export ZOF_API_KEY from secrets.

Initialize project

cd your-repo && zof init

Edit zof.config.js with project ID and environment.

Run validation

zof run --env staging

zof run --suite smoke, for named suite

Key concepts

Organization scope
All Zof Console and API operations are isolated to your authenticated tenant.
Governed execution
Agent output and remediation follow policy packs with human approval when configured.

Best practices

  • Validate changes in staging before applying release gates to production.
  • Include run IDs and timestamps when escalating issues to support or auditors.
  • Align internal runbook terminology with Zof Console UI labels for clarity.

zof.config.js

module.exports = {
  projectId: 'proj_abc123',
  defaultEnvironment: 'staging',
  failOnError: true,
};

Was this page helpful?

CLI | Zof AI Documentation