Project Structure
Running chant init creates a project layout designed to keep your resource definitions, type information, and configuration cleanly separated.
Top-Level Layout
Section titled “Top-Level Layout”my-infra/├── src/│ └── main.ts # Resource definitions├── .chant/│ ├── types/ # Generated type definitions (gitignored)│ ├── meta/ # Lexicon metadata cache (gitignored)│ └── rules/ # Lexicon lint rules (gitignored)├── skills/ # Lexicon skill files (gitignored)├── chant.config.ts # Project configuration├── tsconfig.json # TypeScript config with chant path mappings├── package.json└── .gitignoreSource Directory (src/)
Section titled “Source Directory (src/)”This is where your resource definitions live. Every .ts file that exports values contributes resources to the evaluated output.
src/config.ts defines shared configuration using typed sub-resource constructors. These are imported directly by resource files via import { ... } from "./config".
Configuration Files
Section titled “Configuration Files”chant.config.ts
Section titled “chant.config.ts”Project-level settings for linting, lexicon declarations, and evaluation:
export default { lexicons: ["aws"],};See Config File Reference for all fields.
tsconfig.json
Section titled “tsconfig.json”Standard TypeScript configuration. You generally don’t need to edit this file. See TypeScript Configuration for details.
Examples to learn from
Section titled “Examples to learn from”The repository ships examples in three tiers — a golden teaching example to start from, small feature examples per lexicon, and full reference deployments. The getting-started example is the place to begin. See Examples — Tiers and Layout for the full map.