CLI Guide (Open Source)

The free, open-source engine of IaCConsole.

The `iacconsole-cli` is a powerful wrapper around OpenTofu/Terraform. It handles the complexity of injecting variables from the inventory and managing state backends seamlessly. It is completely open-source and free to use.

Installation

Install using Go:

go install github.com/alt-dima/iacconsole-cli@latest

Or download the latest pre-built binary for your platform (Linux/macOS) from:

GitHub Releases

Core Commands

  • iacconsole-cli init: Initializes a new working directory with a default structure and .iacconsolerc file.
  • iacconsole-cli exec -o org -u unit -d dim:val -- plan: Executes a plan by synthesizing your code and configuration in a temporary environment.
  • iacconsole-cli exec -o org -u unit -d dim:val -- apply: Applies changes to your infrastructure using the synthesized environment.

Agent Mode

The Agent Mode allows you to trigger deployments directly from the IaCConsole Web Dashboard while executing locally on your machine.

1. Set your API credentials:

export IACCONSOLE_API_URL='https://accountid:password@api.iacconsole.com'

2. Start the agent:

iacconsole-cli agent

Local Mode

You can also use the CLI in standalone mode with local JSON files as your inventory by setting the inventory_path in your .iacconsolerc or using flags.

iacconsole-cli exec -o demo-org -d env:local -u vpc -- plan