Docs

CLI Reference

Command-line options for uploading Terraform state with the Cora CLI.

The Cora CLI is a single static binary that uploads Terraform state to your Cora organization. It works on macOS, Linux, Windows, and in CI environments.

Installation

Download the latest release for your platform from the Cora CLI releases page.

For detailed installation instructions, see the CLI repository README.

Verify the installation:

bash
cora version

Authentication

Set the CORA_TOKEN environment variable with a token from Settings → Tokens:

bash
export CORA_TOKEN="cora_..."

You can also pass the token directly with --token.

Commands

cora upload

Upload Terraform state to a workspace.

bash
terraform state pull | cora upload --workspace my-app

Flags:

FlagDescription
--workspaceTarget workspace name (required)
--tokenAPI token (overrides CORA_TOKEN)
--api-urlOverride the Cora API base URL

cora version

Print the installed CLI version.

bash
cora version

CI usage

For CI pipelines, store your token as a secret and export it before running the upload:

.github/workflows/terraform.yml
- name: Upload state to Cora
env:
  CORA_TOKEN: ${{ secrets.CORA_TOKEN }}
run: |
  terraform state pull | cora upload --workspace production

Releases

Download binaries and view changelogs at github.com/TheCoraApp/cora-cli/releases.