PolicyCortex CLI Reference: Complete Cloud Governance Commands

Complete command-line interface reference for PolicyCortex CLI tools

Cross-PlatformFull API AccessAutomation ReadyOpen Source

Installation

macOS

Homebrew

$ brew tap policycortex/tap
$ brew install policycortex

Direct Download

$ curl -L https://releases.policycortex.com/cli/latest/macos/policycortex -o policycortex
$ chmod +x policycortex
$ sudo mv policycortex /usr/local/bin/

Linux

Package Manager

$ curl -fsSL https://packages.policycortex.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/policycortex.gpg
$ echo "deb [signed-by=/usr/share/keyrings/policycortex.gpg] https://packages.policycortex.com/linux stable main" | sudo tee /etc/apt/sources.list.d/policycortex.list
$ sudo apt update
$ sudo apt install policycortex

Direct Download

$ curl -L https://releases.policycortex.com/cli/latest/linux/policycortex -o policycortex
$ chmod +x policycortex
$ sudo mv policycortex /usr/local/bin/

Windows

Chocolatey

$ choco install policycortex

PowerShell

$ Invoke-WebRequest -Uri https://releases.policycortex.com/cli/latest/windows/policycortex.exe -OutFile policycortex.exe
$ Move-Item policycortex.exe C:\Windows\System32\

Global Options

--help, -h
Show help information
--version, -v
Show CLI version
--verbose
Enable verbose output
--quiet, -q
Suppress output except errors
--config
Path to config file
Example: ~/.policycortex/config.yaml
--no-color
Disable colored output
--json
Output in JSON format

Commands

login

Authenticate with PolicyCortex platform

policycortex login [options]

Options

--api-key
Use API key for authentication
Example:
pc_api_key_...
--region
Specify region endpoint
Example:
us-east-1, eu-west-1
--profile
Use named profile
Example:
production, staging

Examples

Login using API key
$ policycortex login --api-key pc_api_key_abcd1234
Login using saved profile
$ policycortex login --profile production