···1617## Commands
1819-### `gen-inferred`
20-21-Generate type-inferred TypeScript code from JSON lexicon schemas.
22-23-**Usage:**
24-25-```bash
26-prototypey gen-inferred <outdir> <schemas...>
27-```
28-29-**Arguments:**
30-31-- `outdir` - Output directory for generated TypeScript files
32-- `schemas...` - One or more glob patterns matching lexicon JSON schema files
33-34-**Example:**
35-36-```bash
37-prototypey gen-inferred ./generated/inferred ./lexicons/**/*.json
38-```
39-40-**What it does:**
41-42-- Reads ATProto lexicon JSON schemas
43-- Generates TypeScript types that match the schema structure
44-- Organizes output files by namespace (e.g., `app.bsky.feed.post` → `app/bsky/feed/post.ts`)
45-- Provides typescript definitions of the lexicons for inference and later: validation
46-47### `gen-emit`
4849Emit JSON lexicon schemas from authored TypeScript files.
···78791. **Author lexicons in TypeScript** using the `prototypey` library
802. **Emit to JSON** with `gen-emit` for runtime validation and API contracts
81-3. **Generate inferred types** with `gen-inferred` for consuming code
8283```bash
84# Write your lexicons in TypeScript
···8687# Emit JSON schemas
88prototypey gen-emit ./schemas ./src/lexicons/**/*.ts
89-90-# Generate TypeScript types from schemas
91-prototypey gen-inferred ./generated ./schemas/**/*.json
92```
9394## Requirements
···1617## Commands
18000000000000000000000000000019### `gen-emit`
2021Emit JSON lexicon schemas from authored TypeScript files.
···50511. **Author lexicons in TypeScript** using the `prototypey` library
522. **Emit to JSON** with `gen-emit` for runtime validation and API contracts
05354```bash
55# Write your lexicons in TypeScript
···5758# Emit JSON schemas
59prototypey gen-emit ./schemas ./src/lexicons/**/*.ts
00060```
6162## Requirements
···6465The `prototypey` package includes a CLI with two main commands:
6667-#### `gen-inferred` - Generate TypeScript from JSON schemas
68-69-```bash
70-prototypey gen-inferred <outdir> <schemas...>
71-```
72-73-Reads ATProto lexicon JSON schemas and generates TypeScript types.
74-75-**Example:**
76-77-```bash
78-prototypey gen-inferred ./generated/inferred ./lexicons/**/*.json
79-```
80-81#### `gen-emit` - Emit JSON schemas from TypeScript
8283```bash
···6465The `prototypey` package includes a CLI with two main commands:
660000000000000067#### `gen-emit` - Emit JSON schemas from TypeScript
6869```bash