Skip to content

Project Structure

llms.txt lists every page for an agent

chant init creates a project that keeps resource definitions, type information and configuration in separate places.

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 for your editor and tsc
├── package.json
└── .gitignore

This is where your resource definitions live. Every .ts file that exports values adds resources to the build 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 for your editor and tsc. This is the file chant init writes.

{
"compilerOptions": {
"target": "ES2022",
"module": "esnext",
"moduleResolution": "bundler",
"types": ["node"],
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

bundler resolution lets ./config stay extensionless, which is how chant resolves it. See TypeScript Configuration for details.

The repository ships examples in three tiers: a golden teaching example to start from, small feature examples per lexicon, and full reference deployments. Start with the getting-started example. See Examples — Tiers and Layout for the full map.

chant