Metadata-Version: 2.4
Name: iltero-cli
Version: 0.3.5
Summary: Iltero CLI - Infrastructure compliance scanning and management
Project-URL: Homepage, https://iltero.io
Project-URL: Documentation, https://docs.iltero.io
Project-URL: Repository, https://github.com/ilterohq/iltero-cli
Project-URL: Issues, https://github.com/ilterohq/iltero-cli/issues
Project-URL: Changelog, https://github.com/ilterohq/iltero-cli/blob/main/CHANGELOG.md
Author: Iltero Team
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: compliance,iac,infrastructure,policy,scanning,security,terraform
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: attrs>=25.4.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: keyring>=25.0.0
Requires-Dist: pydantic-settings>=2.4.0
Requires-Dist: pydantic>=2.8.0
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7.0
Requires-Dist: typer[all]>=0.12.0
Provides-Extra: dev
Requires-Dist: mypy>=1.11.0; extra == 'dev'
Requires-Dist: openapi-python-client>=0.27.1; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Provides-Extra: scanners
Requires-Dist: checkov>=3.2.0; extra == 'scanners'
Requires-Dist: requests>=2.32.0; extra == 'scanners'
Description-Content-Type: text/markdown

# Iltero CLI

Infrastructure compliance scanning and management from the command line.

[![PyPI version](https://img.shields.io/pypi/v/iltero-cli)](https://pypi.org/project/iltero-cli/)
[![Python versions](https://img.shields.io/pypi/pyversions/iltero-cli)](https://pypi.org/project/iltero-cli/)
[![License](https://img.shields.io/pypi/l/iltero-cli)](https://github.com/ilterohq/iltero-cli/blob/main/LICENSE)

## Features

- **Compliance Scanning** — Static analysis, plan evaluation, and runtime monitoring for Terraform
- **Policy Enforcement** — OPA and Checkov policy evaluation with multi-framework support
- **Stack Management** — Create, configure, and manage infrastructure stacks
- **Workspace & Environment Management** — Organize stacks across workspaces and environments
- **Compliance Posture** — Query scans, violations, trends, and generate reports
- **Token Management** — Create and manage API authentication tokens
- **CI/CD Integration** — Auto-detects GitHub Actions, GitLab CI, CircleCI, and Jenkins

## Installation

```bash
pip install iltero-cli

# With scanner support (Checkov, OPA)
pip install iltero-cli[scanners]
```

Requires Python 3.11+.

## Quick Start

### 1. Authenticate

```bash
# Set your API token
export ILTERO_TOKEN=your_token_here

# Verify authentication
iltero auth status
```

### 2. Initialize a Project

```bash
# Set up .iltero/config.yml with stack registration and compliance frameworks
iltero init
```

### 3. Run a Scan

```bash
# Static analysis of Terraform code
iltero scan static --path ./terraform \
  --stack-id stack-123 \
  --environment production

# Evaluate a Terraform plan
iltero scan evaluation tfplan.json \
  --stack-id stack-123 \
  --environment production
```

## Commands

### Auth

| Command | Description |
|---------|-------------|
| `iltero auth status` | Show authentication status and token type |

### Init

| Command | Description |
|---------|-------------|
| `iltero init` | Initialize Iltero project configuration for a repository |

### Scan

| Command | Description |
|---------|-------------|
| `iltero scan static [path]` | Static analysis of Terraform source code (Checkov + OPA) |
| `iltero scan evaluation <plan_file>` | Evaluate Terraform plan JSON against compliance policies |
| `iltero scan runtime <policy_path>` | Runtime compliance monitoring of cloud resources |
| `iltero scan submit-results <scan_id> <results_file>` | Submit pre-generated scan results to the backend |
| `iltero scan generate-source-map` | Generate resource source map from `.tf` files |

### Scanner

| Command | Description |
|---------|-------------|
| `iltero scanner check` | Check if required scanners are installed and available |

### Token

| Command | Description |
|---------|-------------|
| `iltero token create` | Create a new API token (personal, service, or pipeline) |
| `iltero token list` | List all API tokens |
| `iltero token revoke <token_id>` | Revoke an API token |

### Stack

| Command | Description |
|---------|-------------|
| `iltero stack list` | List all stacks in the current workspace |
| `iltero stack create <name>` | Create a new stack |
| `iltero stack show <stack_id>` | Show stack details |
| `iltero stack update <stack_id>` | Update stack settings |
| `iltero stack delete <stack_id>` | Delete a stack |

### Workspace

| Command | Description |
|---------|-------------|
| `iltero workspace list` | List all workspaces |
| `iltero workspace create <name>` | Create a new workspace |
| `iltero workspace show <workspace_id>` | Show workspace details |
| `iltero workspace update <workspace_id>` | Update workspace settings |
| `iltero workspace delete <workspace_id>` | Delete a workspace |

### Environment

| Command | Description |
|---------|-------------|
| `iltero environment list` | List all environments |
| `iltero environment create <name>` | Create a new environment |
| `iltero environment show <environment_id>` | Show environment details |
| `iltero environment update <environment_id>` | Update environment settings |
| `iltero environment delete <environment_id>` | Delete an environment |

### Compliance

| Command | Description |
|---------|-------------|
| `iltero compliance summary` | Get compliance dashboard summary |
| `iltero compliance trends` | Get violation trend data over time |
| `iltero compliance scans list` | List compliance scans |
| `iltero compliance scans get <scan_id>` | Get scan details |
| `iltero compliance violations list` | List compliance violations |
| `iltero compliance violations get <violation_id>` | Get violation details |
| `iltero compliance reports list <stack_id>` | List compliance reports for a stack |
| `iltero compliance reports generate <stack_id>` | Generate a compliance report |

### Config

| Command | Description |
|---------|-------------|
| `iltero config get [key]` | Get a configuration value |
| `iltero config set <key> <value>` | Set a configuration value |
| `iltero config list` | List all configuration settings |

Run `iltero <command> --help` for detailed usage information.

## Configuration

Configure via environment variables or config file (`~/.iltero/config.yaml`):

| Variable | Description | Default |
|----------|-------------|---------|
| `ILTERO_TOKEN` | API authentication token | Required |
| `ILTERO_API_URL` | Backend API URL | `https://api.iltero.io` |
| `ILTERO_WORKSPACE` | Default workspace slug | — |
| `ILTERO_OUTPUT_FORMAT` | Output format: `table`, `json`, `yaml` | `table` |
| `ILTERO_DEBUG` | Enable debug logging | `false` |
| `ILTERO_NO_COLOR` | Disable colored output | `false` |

## License

Apache License 2.0 — see [LICENSE](LICENSE) for details.
