- Windows, macOS, or Linux
- Node.js 22 or newer
- npm 10 or newer
Repository CI is configured to run the full quality suite on Node.js 22 and 24 across Windows and Ubuntu.
The project uses TypeScript 7's native compiler for tsc. The TypeScript 6
compatibility package remains installed under the typescript dependency name
because typescript-eslint still consumes the compiler API that TypeScript 7
does not expose.
For repository use:
npm install --save-dev content-contract-engine
npx content-contract init . --source "docs/**/*.{md,mdx}"
npx content-contract verifyFor contribution work from a clone:
npm ciThe library is ESM-only.
npm run qaThe quality command checks formatting, lint rules, TypeScript types, coverage, the production build, the included example, the npm executable, package contents, and installation into a clean temporary project.
| Command | Purpose |
|---|---|
npm run test |
Run the test suite once |
npm run test:coverage |
Run tests with enforced coverage thresholds |
npm run typecheck |
Check TypeScript without emitting files |
npm run lint |
Run ESLint |
npm run format |
Apply Prettier formatting |
npm run build |
Compile the library and CLI |
npm run verify:self |
Validate the repository documentation |
npm run verify:example |
Verify the included example |
npm run render:example |
Render the included example |
npm run qa |
Run the complete release-quality validation sequence |
No hosted service, database, or account is required.
npm run build
node dist/bin.js init .\scratch
node dist/bin.js verify --config .\scratch\content-contract.config.json
node dist/bin.js render --config .\scratch\content-contract.config.jsonThe initialized project includes a schema, fact catalog, two linked documents,
and a separate render directory. Use --source to configure existing content
without creating sample source documents.
The implementation uses Node.js file-system and path APIs. The full suite has been run on Windows and Debian Linux with Node.js 22 and 24. Repository CI is configured for Windows and Ubuntu. macOS is intended to be supported but is not currently part of the automated matrix.
Link validation checks path casing explicitly so a link that works accidentally on Windows does not fail after deployment to Linux.