Command Line Interface

cloudguard CLI

The CloudGuardian command-line tool for cloud cost management, infrastructure scanning, and MCP server integration.

curl -fsSL https://cloudguard.dev/install.sh | bash

Installs to /usr/local/bin by default. No sudo required if directory is writable. View manual install options →

macOS
Intel & Apple Silicon
Linux
x86_64, ARM64, ARM
Windows
x86_64, ARM64
Verify Your Install

Installation Verification

Run these commands to verify your CLI is installed correctly.

1
cloudguard version
Check installed version
2
cloudguard --help
View all commands
3
cloudguard auth login
Sign in to CloudGuardian
4
cloudguard org list
List your organizations
Terminal
$ cloudguard version

CloudGuardian CLI
  version:  0.1.0
  commit:   abc123
  built:    2026-04-04
  platform: darwin/arm64
  go:       go1.26.0

$ cloudguard --help
Cloud Guardian CLI -- multi-cloud cost protection

Usage:
  cloudguard [command]

Available Commands:
  auth         Authentication commands
  org          Organization management
  scan         Infrastructure scanning
  cost         Cost management
  quality      Code quality scanning
  mcp          Start MCP server
  update       Update CLI to latest version
  version      Print version information

Flags:
  -h, --help         help for cloudguard
      --api-url string   API server URL

Get started:
  cloudguard auth login     Sign in with Google
  cloudguard org list       List organizations

Why use the CLI?

Everything you can do in the UI, plus powerful features for developers.

Unified CLI Experience

Scan infrastructure, manage costs, trigger remediations, and view reports—all from your terminal.

MCP Server Built-In

Run cloudguard mcp to start a Model Context Protocol server for AI assistants like Claude Code.

Quality Gates

Built-in code quality scanning for TypeScript, Go, and Python. Track coverage, tests, and violations.

Self-Updating

cloudguard update checks the latest version and installs it automatically. No package manager needed.

MCP Server

AI-Native Cloud Management

The CloudGuardian CLI includes a built-in MCP (Model Context Protocol) server. Connect Claude Code, Cursor, or any MCP-compatible AI assistant directly to your cloud infrastructure.

  • Query costs and resources in natural language
  • Trigger scans and remediations via AI
  • Get AI-powered optimization recommendations
  • Generate reports and summaries automatically
mcp.json
{
  "mcpServers": {
    "cloudguard": {
      "command": "cloudguard",
      "args": ["mcp"],
      "env": {
        "CLOUD_GUARDIAN_API_URL": "https://api.cloudguard.dev"
      }
    }
  }
}

Manual Installation

Prefer to install manually? Download the binary directly from GitHub releases.

PlatformArchitectureDownload
macOSARM64 (Apple Silicon)cloudguard_darwin_arm64
macOSx86_64 (Intel)cloudguard_darwin_amd64
LinuxARM64cloudguard_linux_arm64
Linuxx86_64cloudguard_linux_amd64
LinuxARMv7cloudguard_linux_arm
Windowsx86_64cloudguard_windows_amd64.exe

Manual Install Steps

  1. 1. Download the appropriate binary for your platform from the table above
  2. 2. Make it executable: chmod +x cloudguard_*
  3. 3. Move to your PATH: mv cloudguard_* /usr/local/bin/cloudguard
  4. 4. Verify: cloudguard version
Troubleshooting

Common Issues

Permission denied

The installer will use sudo if needed. To avoid sudo, ensure /usr/local/bin is writable by your user:

sudo chown $(whoami) /usr/local/bin

Command not found after install

Add the install directory to your PATH:

export PATH="/usr/local/bin:$PATH" # Add to ~/.zshrc or ~/.bashrc to persist

SSL certificate error

Update your CA certificates or use the -k flag with curl (not recommended for production):

brew install ca-certificates # macOS sudo apt-get update ca-certificates # Ubuntu/Debian

Binary verification fails

Download the checksum file and verify:

curl -fsSL https://github.com/skunkworq/cloud-guardian/releases/latest/download/cloudguard_darwin_arm64.sha256 sha256sum -c cloudguard_darwin_arm64.sha256

Command Reference

auth
Login, logout, and manage credentialsCore
org
List and manage organizationsCore
scan
Trigger infrastructure scansCore
cost
View costs and breakdownsCore
alert
Manage cost alertsCore
remediation
View and execute remediationsCore
connector
Manage cloud connectorsCore
quality
Code quality scanningDev
mcp
Start MCP serverAI
update
Self-update the CLIUtility
version
Show version informationUtility
Testing & Development

Test Your Installation

Run these quick tests to ensure everything is working correctly.

Quick Test Suite

Version check
cloudguard version
Auth status
cloudguard auth whoami
Update check
cloudguard version --check
Quality scan (dry-run)
cloudguard quality scan --dry-run

CI/CD Integration

Add version checks to your CI pipeline to ensure teams are using the latest CLI.

# .github/workflows/ci.yml
- name: Check CloudGuardian CLI
  run: |
    # Install if not present
    if ! command -v cloudguard &> /dev/null; then
      curl -fsSL https://cloudguard.dev/install.sh | bash
    fi
    
    # Verify version
    cloudguard version --check
    
    # Run quality scan
    cloudguard quality scan --publish

Ready to get started?

Install the CLI and run your first scan in under a minute.