Skip to main content

Install and Use the Codiac CLI

Learn how to install and use the Codiac command-line interface (CLI). This tool is useful for those who prefer not to use the web-based Codiac UI.

tip

The codiac command is automatically aliased to cod to save typing. For example, you can type cod -h instead of codiac -h.

Prerequisites

Install the Codiac CLI

Use npm to install the codiac-cli package:

npm i -g @codiac.io/codiac-cli

Authenticate with the CLI

Before you access Codiac, you need to authenticate your session.

  1. Use codiac login to log into Codiac:
codiac login

The command prompts you to authenticate with your Codiac username and password.

  1. Use codiac csp login to log into your cloud service provider:
codiac csp login

The command prompts you to:

  1. Authenticate with your Codiac username and password.
  2. Select your tenant.
  3. Select the cloud provider for your project.

The CLI then authenticates with your cloud provider.

Update the CLI

Use NPM to update the Codiac CLI:

npm i -g @codiac.io/codiac-cli

Use codiac -v to check the version number:

$ codiac -v
@codiac.io/codiac-cli/1.3.31 linux-x64 node-v20.13.1

CLI Help

Use the -h flag to view the help documentation for the CLI commands. For example:

codiac -h
codiac asset -h
codiac asset view -h

You can also consult the reference list of CLI commands to view the same details in a browser.