Planton logoPlanton

Loading...

CLI

The planton CLI is a single binary that handles the full deployment lifecycle: manifest loading, validation, module resolution, provisioner execution, and state management across Pulumi, OpenTofu, and Terraform.

Installation

# macOS (Homebrew)
brew install plantonhq/tap/planton

# Verify
planton version

For other platforms, download the binary from GitHub Releases.

You also need at least one IaC engine installed:

# Pulumi
brew install pulumi

# OpenTofu
brew install opentofu

# Terraform
brew install terraform

Shell Completion

Enable tab-completion for all commands, subcommands, and flags. This is a one-time setup per machine.

Zsh (default on macOS):

Add this line to your ~/.zshrc:

source <(planton completion zsh)

Bash:

Add this line to your ~/.bashrc:

source <(planton completion bash)

Bash completion requires the bash-completion package. On macOS: brew install bash-completion@2.

Fish:

planton completion fish > ~/.config/fish/completions/planton.fish

PowerShell:

Add this line to your PowerShell profile:

planton completion powershell | Out-String | Invoke-Expression

After setup, open a new terminal and type planton <Tab> to see available commands.

How the CLI Works

Every deployment follows the same sequence regardless of which engine you choose:

  1. Load a manifest from a file, clipboard, kustomize build, or stack input
  2. Validate the manifest against its Protocol Buffer schema
  3. Resolve the IaC module for the component kind
  4. Execute the operation through the selected provisioner

You can let the CLI detect the provisioner automatically from the manifest's planton.dev/provisioner label using unified commands, or choose explicitly with planton pulumi, planton tofu, or planton terraform.

In This Section

  • CLI Reference — Complete command tree, all flags organized by group, exit codes, and file system paths. The single source of truth for flag names and behavior.

  • Unified Commands — Provisioner-agnostic commands (apply, plan, init, destroy, refresh) that auto-detect the IaC engine from your manifest.

  • Pulumi Commands — Pulumi-specific subcommands: init, preview, update/up, destroy, delete/rm, cancel, refresh.

  • OpenTofu Commands — OpenTofu-specific subcommands: init, plan, apply, destroy, refresh, generate-variables, load-tfvars.

  • Terraform Commands — Terraform-specific subcommands: init, plan, apply, destroy, refresh. Shares the same HCL modules and execution engine as OpenTofu.

  • Module Management — Module resolution chain, the staging area, version pinning with checkout and pull, and CLI version management with upgrade and downgrade.

  • Configuration & Utilities — CLI configuration (config set/get/list), manifest validation (validate), manifest loading (load), and version checking.

Quick Start

# Validate a manifest
planton validate -f database.yaml

# Deploy with automatic provisioner detection
planton apply -f database.yaml

# Preview changes before applying
planton plan -f database.yaml

# Tear down
planton destroy -f database.yaml

Or use a specific engine directly:

# Pulumi
planton pulumi up --manifest database.yaml --yes

# OpenTofu
planton tofu init --manifest database.yaml
planton tofu apply --manifest database.yaml --auto-approve

# Terraform
planton terraform init --manifest database.yaml
planton terraform apply --manifest database.yaml --auto-approve

Getting Help

planton --help
planton apply --help
planton pulumi --help
planton tofu init --help

Every command and subcommand supports --help.

Next article

CLI Reference

CLI Reference This page is the single authoritative reference for every command, flag, and option in the planton CLI. Other CLI documentation pages link here for flag details. Command Tree The complete command tree, verified against source. Commands are grouped by purpose. Global Flags These flags are inherited by every subcommand. Flag Reference All flags below are organized by the group they belong to. The "Used by" column shows which commands accept each flag. Manifest Source Flags These...
Read next article