This project uses Bun - a fast all-in-one JavaScript runtime and toolkit.
# Install dependencies
bun install
# Start development server
bun run start
bun run start
- Start development serverbun run build
- Build for productionbun run serve
- Preview production buildbun run test
- Run testsbun run typecheck
- Check TypeScript typesbun run format
- Format all files with Prettierbun run format:check
- Check if files need formattingbun run update-snippets
- Update or check extractable code snippets (use --help for options)bun run validate:python
- Runs typechecking and linting on extracted Python snippets
This project uses husky and lint-staged to automatically:
- Format staged files with Prettier
- Run TypeScript type checking
These checks run automatically when you attempt to commit changes, helping maintain code quality and consistency.
The documentation contains Python code snippets that are automatically extracted to create runnable example files. These examples are stored in the repository and verified by CI to ensure they stay in sync with the documentation.
- In
src/docs/_meta.ts
, docs with extractable snippets are marked withhasExtractableSnippets: true
- The extraction system pulls Python code blocks from these MDX files
- For each provider (OpenAI, Anthropic), it generates runnable example files with substituted variables
- Examples are stored in
public/extracted-snippets/
with an organized directory structure
bun run update-snippets
- Update all extractable snippets for all providersbun run update-snippets -- --check
- Check if snippets are up-to-datebun run update-snippets -- --path=<file-path>
- Update snippets only for a specific filebun run update-snippets -- --check --path=<file-path>
- Check if snippets for a specific file are up-to-date
A GitHub workflow automatically verifies that all extracted snippets are up-to-date with the source documentation. If you modify a document with code snippets, make sure to run bun run update-snippets
and commit the updated snippets.
Everything in this repository is licensed under the MIT License except for "Williams-Handwriting-Regular-v1.tff", which is a closed license font and not available for use without express permission.