---
title: "complyform policy-gen"
description: "Generate policy-as-code artifacts for Checkov, OPA, and GitHub Actions."
---

Generate policy-as-code artifacts from compliance assessments.

## Usage

```bash
complyform policy-gen [options]
```

## Options

| Flag | Type | Default | Description |
|---|---|---|---|
| `--format` | `checkov\|opa\|github-action\|all` | — | Policy format to generate. Checkov/GitHub Action = Pro+. OPA/Rego = Team+. |
| `--output` | path | `./policies` | Output directory |
| `--overwrite` | bool | `false` | Overwrite existing files |

## Examples

Generate Checkov policies (Pro+):

```bash
complyform policy-gen --format=checkov
```

Generate OPA/Rego bundle (Team+):

```bash
complyform policy-gen --format=opa
```

Generate GitHub Action workflow (Pro+):

```bash
complyform policy-gen --format=github-action
```

Generate all formats (Team+):

```bash
complyform policy-gen --format=all --output=./policies
```

## Related Commands

- [`assess`](/cli-reference/assess/) — Run assessment before generating policies
- [`validate`](/cli-reference/validate/) — Validate compliance after applying policies
