# Get started with CCE

Install the CLI, run a scan from your project root, and explore recipe packs for modernization and CI gates.

## Install

```bash
brew tap stackgenhq/homebrew-stackgen
brew install stackgenhq/homebrew-stackgen/cce
cce -version
```

## First run: `cce quickstart`

One command, zero flags, no account — detects languages, scans, and writes a
shareable artifact set:

```bash
cce quickstart .
```

| Artifact | Purpose |
|----------|---------|
| `cce-results/cce-api-bom.json` | Machine-readable Cloud API BOM (provider / resource / operation + call sites) |
| `cce-results/cce-report.html` | Self-contained human report — share it with reviewers who don't have CCE |
| `cce-results/cce-results.sarif` | GitHub Code Scanning input |
| `cce-results/cce-lens-lock.yaml` | CCE version + rule hashes (built-in catalog and any `-mapper-file` lens) + reproduce command |
| `.github/workflows/cce.yml` | Ready-to-commit CI workflow via `stackgenhq/cce-action` (never overwrites an existing file) |

If `deploy/iam.json`, `iam.json`, or `policy.json` exists (or you pass `--policy`),
you also get `cce-results/cce-iam-drift.json`: code-evidenced AWS operations missing
from that policy. This is **static evidence for review**, not a compliance verdict.

## One-liners

Run from your project root. By default CCE honors `.gitignore` and also skips dependency trees such as tracked `vendor/`.

| Goal | Command |
|------|---------|
| Preview files | `cce plan -folder . -language AUTO` |
| Cloud entitlements | `cce -folder . -language AUTO -filter cloud -format json -output cloud.json` |
| Modernization pack | `cce run -folder . -language AUTO -pack modernization-pack -output pack.json` |
| List recipes | `cce catalog` |
| CI gate | `cce diff baseline.json current.json --fail-new` |
| SARIF for PRs | `cce -folder . -filter cloud -format sarif -output findings.sarif` |
| Backstage catalog YAML | `cce --folder . --language GO --filter cloud --format backstage --output catalog.yaml` |

## What to use where

| You need | Use | Not |
|----------|-----|-----|
| One cloud report | `cce -filter cloud …` | Three separate scans |
| Cloud + SDK + tech-debt | `cce run -pack modernization-pack` | Shell loop of `cce` commands |
| Specific built-in recipes | `cce run -recipes cloud-entitlements,sdk-uplift` | Multiple full re-parses |
| Custom matching rules | `-mapper-file ./my-lens.yaml` + `-filter all` | `-filter cloud` alone |
| Vendored SDK audit | `-include-dependencies` (and `-include-gitignored` if ignored) | Default scan |

## Recipe packs

Parse the repository once, then apply several lenses:

```bash
cce catalog
cce run -folder . -language AUTO -pack modernization-pack -output pack.json
```

Or pick recipes à la carte:

```bash
cce run -folder . -language AUTO -recipes sdk-uplift,tech-debt-inventory -output subset.json
```

## Custom lenses

Pass a local YAML file or any HTTPS URL CCE can fetch. Use `-filter all` for non-cloud providers (tech-debt, CVE, etc.):

```bash
cce -folder . -language AUTO -filter all \
  -mapper-file ./my-lens.yaml \
  -format json -output findings.json
```

## Use case catalog

Browse [all workflows](use-cases/catalog.md) (modernization, security, governance, SRE, AI) with example commands and links to full guides.

List registered recipes:

```bash
cce catalog
cce run -folder . -language AUTO -pack modernization-pack -output pack.json
```

See [Analysis recipes & packs](reference/analysis-recipes.md).

## GitHub Actions

To scan the repo your workflow is running in without hand-rolling install steps, use [`stackgenhq/cce-action`](https://github.com/stackgenhq/cce-action):

```yaml
jobs:
  scan:
    uses: stackgenhq/cce-action/.github/workflows/scan.yml@v1
    with:
      language: AUTO
```

Diagnostics stay off unless you set `diagnostics: true`. Native reusable workflows also cover [PR-ready Cloud API diffs](guides/github-actions.md#pr-review-cloud-api-diff), [IAM access requests](guides/cross-repo-iam-review.md), and [lens Gate 0 verification](guides/enterprise-lenses-and-catalogs.md#7-gate-every-lens-change-on-the-fixture-corpus). See [GitHub Actions](guides/github-actions.md) for the full adoption surface.

## Related docs

| Topic | Page |
|-------|------|
| Changelog | [Release history](changelog.md) |
| GitHub Actions | [Scan the calling repo with `cce-action`](guides/github-actions.md) |
| Custom lens YAML | [Grok rules, prefixes, data tables](reference/custom-lens-yaml.md) |
| Analysis recipes | [Catalog schema, packs, `cce run`, CI policies](reference/analysis-recipes.md) |
| Cloud entitlements | [Built-in PoLP scan](use-cases/guides/cloud-entitlements/index.md) |
| Backstage catalog export | [Scan → Component + API + Resource YAML](guides/backstage-software-catalog.md) |
| Platform adoption | [Direct cloud SDK vs internal platform SDK lens template](use-cases/guides/platform-adoption/index.md) |
| Known limitations | [Facades, languages, static analysis bounds](reference/known-limitations.md) |

Platform engineering and IAM teams:

- [Enterprise lenses & catalogs](guides/enterprise-lenses-and-catalogs.md) — internal IDP libraries, private catalogs
- [Entitlements, operations & IAM](guides/entitlements-operations-and-iam.md) — S3 read/write, PoLP aggregation
