Skip to content

Project Structure

Running chant init creates a project layout designed to keep your resource definitions, type information, and configuration cleanly separated.

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
└── .gitignore

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".

Project-level settings for linting, lexicon declarations, and evaluation:

chant.config.ts
export default {
lexicons: ["aws"],
};

See Config File Reference for all fields.

Standard TypeScript configuration. You generally don’t need to edit this file. See TypeScript Configuration for details.