GitOps CLI
The GitOps CLI binary is gops. It requires Node.js 20 or later and is published as @getgitops/cli.
Install the CLI
Install the latest CLI with the official installer:
curl -fsSL https://getgitops.com/cli/install.sh | sh The installer checks for Node.js 20 and npm, installs @getgitops/cli@latest, and verifies the installation with gops --version.
You can also install the npm package directly:
npm install --global @getgitops/cli
gops --help The installer is also available from the GitOps web repository.
Commands
The CLI currently provides creport for Code Report scans. vault is planned and marked as coming soon.
Code Report
The implemented command is creport scan:
gops creport scan
--api-url https://cloud.example.com/api
--api-key "$GOPS_API_KEY"
--service billing-service
--project core-platform
--git-branch main
--git-repo-url https://github.com/org/repo
--git-author "Dev Name"
--git-version v1.2.0
--git-commit a1b2c3d4
--tags prod critical The scan requests the tools enabled for the project, runs each tool locally, and uploads progress and results to the API. The current tools are Trivy, Syft/SBOM, and Gitleaks when enabled by the server.
Vault
The vault command is coming soon. It is not currently exposed by the CLI package.
Scan flow
The scan command follows this sequence:
The API authenticates the request with Authorization: Bearer <server-key>. The service is identified by --service and the project by --project; the API creates the service when it does not already exist. Each enabled scanner is reported independently with in_progress, completed, or failed status.
Options and environment variables
Every option can also be provided through its uppercase environment-variable name:
| Option | Environment variable | Description |
|---|---|---|
--config-file | CONFIG_FILE | JSON configuration path. The loader is currently disabled in the implementation. |
--api-url | API_URL | API base URL. Required. |
--api-key | API_KEY | Bearer API key. |
--service | SERVICE | Service slug. |
--project | PROJECT | Project slug. |
--git-branch | GIT_BRANCH | Git branch name. |
--git-repo-url | GIT_REPO_URL | Git repository URL. |
--git-author | GIT_AUTHOR | Commit author. |
--git-version | GIT_VERSION | Git tag or version. |
--git-commit | GIT_COMMIT | Git commit hash. |
--tags | TAGS | One or more tags. |
Run gops creport scan --help to see the command options directly from the installed CLI.