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:

OptionEnvironment variableDescription
--config-fileCONFIG_FILEJSON configuration path. The loader is currently disabled in the implementation.
--api-urlAPI_URLAPI base URL. Required.
--api-keyAPI_KEYBearer API key.
--serviceSERVICEService slug.
--projectPROJECTProject slug.
--git-branchGIT_BRANCHGit branch name.
--git-repo-urlGIT_REPO_URLGit repository URL.
--git-authorGIT_AUTHORCommit author.
--git-versionGIT_VERSIONGit tag or version.
--git-commitGIT_COMMITGit commit hash.
--tagsTAGSOne or more tags.

Run gops creport scan --help to see the command options directly from the installed CLI.