> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infraudit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# InfraAudit CLI — terminal access to every feature

> The infraudit CLI gives you full access to cloud scanning, drift detection, cost analysis, compliance, and remediation from your terminal or CI pipeline.

The `infraudit` CLI is a single static binary that mirrors everything the web platform offers. You can connect cloud accounts, trigger scans, review findings, approve remediations, and pipe structured output to downstream tools — all without opening a browser.

## What you can do with the CLI

* Log in once and let scripts reuse the stored session token
* Run drift detection, vulnerability scans, and compliance assessments on demand
* Fetch results as `table`, `json`, or `yaml` output
* Integrate security gates into CI/CD pipelines using `--output json` with `jq`
* Manage multiple InfraAudit instances by switching config files or setting `INFRAUDIT_SERVER_URL`

## Command groups

<CardGroup cols={2}>
  <Card title="provider" icon="cloud" href="/cli/commands/provider">
    Connect, sync, and disconnect AWS, GCP, and Azure accounts.
  </Card>

  <Card title="resource" icon="server" href="/cli/commands/resource">
    List and inspect cloud resources discovered by provider syncs.
  </Card>

  <Card title="drift" icon="triangle-exclamation" href="/cli/commands/drift">
    Detect, list, and resolve infrastructure configuration drift.
  </Card>

  <Card title="vulnerability" icon="shield-halved" href="/cli/commands/vulnerability">
    Run vulnerability scans and review CVE findings by severity.
  </Card>

  <Card title="cost" icon="circle-dollar-to-slot" href="/cli/commands/cost">
    View cost trends, forecasts, anomalies, and savings opportunities.
  </Card>

  <Card title="compliance" icon="clipboard-check" href="/cli/commands/compliance">
    Run CIS, SOC2, NIST, PCI-DSS, and HIPAA assessments.
  </Card>

  <Card title="kubernetes" icon="dharmachakra" href="/cli/commands/kubernetes">
    Register clusters and inspect workloads, pods, and services.
  </Card>

  <Card title="iac" icon="file-code" href="/cli/commands/iac">
    Upload Terraform or CloudFormation files and detect IaC drift.
  </Card>

  <Card title="remediation" icon="wrench" href="/cli/commands/remediation">
    Approve, execute, and roll back automated fix actions.
  </Card>

  <Card title="recommendation" icon="lightbulb" href="/cli/commands/recommendation">
    View AI-powered cost, security, and compliance suggestions.
  </Card>

  <Card title="alert" icon="bell" href="/cli/commands/alert">
    List, acknowledge, and resolve security and operational alerts.
  </Card>

  <Card title="webhook" icon="webhook" href="/cli/commands/webhook">
    Register and test outbound webhooks for InfraAudit events.
  </Card>
</CardGroup>

The `auth` and `config` commands are covered in [Authentication](/cli/authentication) and [Configuration](/cli/configuration).

## Global flags

These flags apply to every command:

| Flag         | Short | Default                    | Description                                      |
| ------------ | ----- | -------------------------- | ------------------------------------------------ |
| `--server`   |       | from config                | Override the API server URL for a single request |
| `--output`   | `-o`  | `table`                    | Output format: `table`, `json`, or `yaml`        |
| `--config`   |       | `~/.infraudit/config.yaml` | Path to the config file                          |
| `--no-color` |       | `false`                    | Disable colored terminal output                  |
| `--help`     | `-h`  |                            | Show help for any command                        |

## Output formats

The CLI supports three output formats. Switch between them with `-o`:

**Table** — human-readable columns, suitable for interactive use:

```bash theme={null}
infraudit resource list
```

```
ID  NAME            TYPE     REGION      STATUS
--  ----            ----     ------      ------
1   web-server-01   ec2      us-east-1   active
2   api-gateway     lambda   us-west-2   active
3   data-bucket     s3       us-east-1   active
```

**JSON** — machine-readable, pipe to `jq` for filtering:

```bash theme={null}
infraudit resource list -o json | jq '.[].name'
```

**YAML** — readable alternative to JSON:

```bash theme={null}
infraudit drift get 1 -o yaml
```

<Tip>
  Use `-o json` in CI/CD pipelines so you can parse results with `jq` and fail the build on critical findings.
</Tip>

## Next steps

* [Install the CLI](/cli/installation)
* [Configure the CLI](/cli/configuration)
* [Set up authentication](/cli/authentication)
* [Browse all commands](/cli/commands/overview)
* [Use the CLI in CI/CD](/cli/ci-cd-usage)
* [Common workflow examples](/cli/examples)
