Skip to main content

Install the Codiac CLI

Learn how to install and use the Codiac command-line interface (CLI).

tip

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

Windows

Windows

Install

  1. Use a package manager like Node.js to install npm on your system if you don't have it already.

  2. Open PowerShell then use npm to install the codiac-cli package:

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

Authenticate

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

  1. Use npm to update the Codiac CLI:
npm i -g @codiac.io/codiac-cli
  1. Use codiac -v to check the version number:
$ codiac -v
@codiac.io/codiac-cli/1.3.31 linux-x64 node-v20.13.1

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 use the CLI command reference page.

macOS

macOS

Install

  1. Use a package manager like Node.js to install npm on your system if you don't have it already.

  2. Open a Terminal window then use npm to install the codiac-cli package:

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

Authenticate

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

  1. Use npm to update the Codiac CLI:
npm i -g @codiac.io/codiac-cli
  1. Use codiac -v to check the version number:
$ codiac -v
@codiac.io/codiac-cli/1.3.31 linux-x64 node-v20.13.1

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 use the CLI command reference page.

Linux

Linux

Install

  1. Use a package manager like Node.js to install npm on your system if you don't have it already.

  2. Use npm to install the codiac-cli package:

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

Authenticate

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

  1. Use npm to update the Codiac CLI:
npm i -g @codiac.io/codiac-cli
  1. Use codiac -v to check the version number:
$ codiac -v
@codiac.io/codiac-cli/1.3.31 linux-x64 node-v20.13.1

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 use the CLI command reference page.