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

# Get started here

> Install the reference toolchain, validate .aip specs, and emit SQL, OpenAPI, TypeScript, Go, and the full Preview matrix

# Get started here

Use the **reference toolchain** from the monorepo today. Packages are not on the public npm registry yet — clone the repo and run the CLI locally.

Requirements: **Node.js 20+**, Git.

***

## 1. Clone and install

```bash theme={null}
git clone https://github.com/eudameron/aiparlance.git
cd aiparlance
npm ci
npm run build
```

This builds `@aiparlance/parser`, `validator`, `cli`, and the Preview emitters (`sql`, `openapi`, `typescript`, `go`, `mysql`, `workers`, `python`, `php`, `docs`, `tests`).

***

## 2. Run the CLI

The binary lives at `packages/cli/dist/cli.js` after build:

```bash theme={null}
node packages/cli/dist/cli.js --help
```

| Command                          | What it does                                                      |
| -------------------------------- | ----------------------------------------------------------------- |
| `aip parse <file.aip>`           | Print the AST as JSON                                             |
| `aip validate <file.aip>`        | Semantic checks (MUST rules) — Core + Infra + Security + Behavior |
| `aip emit sql <file.aip>`        | PostgreSQL DDL (+ indexes / seeds when present)                   |
| `aip emit openapi <file.aip>`    | OpenAPI 3.0.3 JSON                                                |
| `aip emit typescript <file.aip>` | TypeScript interfaces + type guards                               |
| `aip emit go <file.aip>`         | Go structs + thin handlers + auth middleware                      |
| `aip emit mysql <file.aip>`      | MySQL DDL (`database mysql`)                                      |
| `aip emit workers <file.aip>`    | Jobs / queues stubs                                               |
| `aip emit python <file.aip>`     | Python dataclasses                                                |
| `aip emit php <file.aip>`        | PHP classes                                                       |
| `aip emit docs <file.aip>`       | Markdown API reference                                            |
| `aip emit tests <file.aip>`      | CRUD test fixtures                                                |

### Try the minimal example

```bash theme={null}
node packages/cli/dist/cli.js validate examples/minimal.aip
node packages/cli/dist/cli.js emit sql examples/minimal.aip
node packages/cli/dist/cli.js emit openapi examples/minimal.aip
node packages/cli/dist/cli.js emit typescript examples/minimal.aip
node packages/cli/dist/cli.js emit go examples/minimal.aip
```

Write output to a file:

```bash theme={null}
node packages/cli/dist/cli.js emit sql examples/minimal.aip > /tmp/minimal.sql
node packages/cli/dist/cli.js emit openapi examples/minimal.aip > /tmp/minimal.openapi.json
node packages/cli/dist/cli.js emit typescript examples/minimal.aip > /tmp/minimal.ts
node packages/cli/dist/cli.js emit go examples/minimal.aip > /tmp/minimal.go
```

Full CRUD walkthrough (entities, policies, API, seeds, emit): [CRUD walkthrough](/en/crud-walkthrough).

***

## 3. Write your own `.aip`

Every v0.1 spec needs one `app` block first, then `entity` / `crud` / `validation` (Core). See [Syntax](/en/syntax) and [examples/](https://github.com/eudameron/aiparlance/tree/main/examples).

```aip theme={null}
app Demo @0.1 {
  database postgres
}

entity User {
  name: string required
  email: email required unique
}

crud User
```

Save as `my-app.aip`, then:

```bash theme={null}
node packages/cli/dist/cli.js validate my-app.aip
node packages/cli/dist/cli.js emit sql my-app.aip
```

<Note>
  Richer examples (`blog-crud.aip`, `crm-reference.aip`, `ops-reference.aip`, `inventory-crud.aip`) include Infra / Security / Behavior and **parse + validate** with the full v0.1 toolchain. Use `mysql-minimal.aip` for `aip emit mysql`.
</Note>

***

## 4. Run the test suite

From the repo root:

```bash theme={null}
npm test
```

This typechecks/builds workspaces and runs Vitest (parser, validator, emitters, CLI, and [examples CI](https://github.com/eudameron/aiparlance/blob/main/scripts/examples.test.ts)).

Examples-only:

```bash theme={null}
npm run check:examples
```

Typecheck without tests:

```bash theme={null}
npm run typecheck
```

***

## 5. What ships vs what is preview

| Status                    | Targets                                                                             |
| ------------------------- | ----------------------------------------------------------------------------------- |
| **Preview** (in monorepo) | PostgreSQL, MySQL, OpenAPI 3, TypeScript, Go, Python, PHP, Workers, Docs, Tests     |
| **Phase D focus**         | Deepen TypeScript, OpenAPI, PostgreSQL → runnable happy path; then playground + npm |
| **Illustrative only**     | Marketing site [playground](https://aiparlance.org) — not the official packages     |

Read more: [First emitters](/en/first-transpiler) · [CRUD walkthrough](/en/crud-walkthrough) · [Examples](/en/examples) · [Specification § Transpiler matrix](/en/specification#transpiler-matrix) · [ROADMAP](https://github.com/eudameron/aiparlance/blob/main/ROADMAP.md) · [CONTRIBUTING](https://github.com/eudameron/aiparlance/blob/main/CONTRIBUTING.md)

***

## Optional: docs and site locally

```bash theme={null}
# Docs (Mintlify)
cd docs && npx mintlify dev

# Marketing site
cd site && npm ci && npm run build:prod
```
