This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the official documentation website for Foundry, a smart contract development toolchain for Ethereum. The documentation is built using Vocs (a React-based documentation framework) and deployed to Cloudflare Pages.
bun install # Install dependencies
bun dev # Start development server (default: http://localhost:5173)
bun build # Build documentation for production
bun preview # Preview production build locally
# From project root - generates auto-generated CLI command outputs
./scripts/gen_output.sh # Requires Foundry tools (forge, cast, anvil, chisel) installed/src/pages/- All documentation content in MDX format, organized by tool:/forge/- Smart contract compilation and testing documentation/cast/- Ethereum RPC client documentation/anvil/- Local Ethereum node documentation/chisel/- Solidity REPL documentation
/public/- Static assets (images, diagrams)/sidebar/- Navigation configuration (sidebar.ts and modular sections)/src/snippets/- Code examples and auto-generated outputs
vocs.config.ts- Main Vocs configuration (theme, navigation, sponsors)sidebar/sidebar.ts- Main sidebar navigation structurepackage.json- Dependencies and scripts
- MDX files support frontmatter for metadata
- Code snippets are pulled from
/src/snippets/projects/test projects - Auto-generated CLI outputs stored in
/src/snippets/output/ - Images and assets organized by topic in
/public/
When adding or modifying documentation:
- Chapters start with second-level headings (
##) - Use "we" not "I" in documentation
- Use auto-generated CLI output where possible (run
./scripts/gen_output.sh) - Include source files from the projects folder rather than inline code
The documentation automatically deploys to Cloudflare Pages via GitHub Actions on push to the main branch. The deployment workflow handles building and publishing to the "foundry-book" Cloudflare Pages project.