# Foundation bundle validator — CLI

Validate open landscape data standard v1 project bundles locally or in CI. No network access required; no data is sent to Landscape Archive servers.

## Commands

From the `la-frontend` repository root:

```bash
# Validate all example bundles (structural)
npm run federation:validate

# Validate a single bundle file
npm run federation:validate:bundle -- federation/examples/nsw-coastal-schoolyard.bundle.json

# Include Foundation Approved badge criteria
npm run federation:validate:bundle -- path/to/bundle.json --badge

# Machine-readable report (JSON on stdout)
npm run federation:validate:bundle -- path/to/bundle.json --badge --json
```

Exit code `0` when validation passes; `1` when it fails.

## Options

| Flag | Description |
|------|-------------|
| `--badge` | Evaluate Foundation Approved badge criteria (see `BADGE_CRITERIA_v1.md`) |
| `--json` | Emit JSON result instead of human-readable lines |

## Integration

The reference rules live in `federation/lib/validate-bundle-v1.mjs`. The schema portal and this CLI share the same module so results stay aligned.

For JSON Schema validation against `schema/bundle/v1.schema.json`, use any Draft 2020-12 validator (e.g. `ajv-cli`) in addition to this structural checker.
