Development Workflow
This guide walks you through the development workflow for the docs-mcp project, covering everything from setting up your local environment to running tests and leveraging automation tools. Whether you’re building features or generating documentation, this guide provides the essential commands and patterns to work efficiently.
Local Development
Section titled “Local Development”To start developing locally, ensure you have Bun installed as the project runtime. Begin by installing dependencies:
bun installThe project uses Bun as its primary runtime and includes a development mode accessible through npm scripts. To run the development server:
bun run devYou can also pass arguments directly to the development command:
bun run dev -- [arguments]The bunli.config.ts file configures the development environment with watch mode and inspector enabled, allowing real-time reloading as you make changes to your code. The CLI framework automatically discovers commands from the ./src/commands directory, making it easy to add new features without manual registration.
Running Tests
Section titled “Running Tests”The project includes comprehensive testing support through Bun’s built-in test runner and TypeScript type checking:
bun testFor type safety, run the TypeScript compiler in no-emit mode:
bun run typecheckTests are configured in bunli.config.ts to match files named *.test.ts or *.spec.ts, with coverage enabled by default. This ensures your code changes are validated automatically as part of your development workflow.
Using the Justfile
Section titled “Using the Justfile”The justfile provides convenient shortcuts for common development tasks. The primary commands include:
just run [args] # Run the dev server with optional argumentsjust chat [args] # Run the chat commandjust install-completions # Install Fish shell completionsjust fmt-mdx # Format MDX files (delegates to parent justfile)Fish Shell Integration
Section titled “Fish Shell Integration”The justfile includes built-in support for Fish shell development:
just fishThis launches an interactive Fish shell environment with the project context loaded. Install shell completions for the docs-mcp CLI:
just install-completionsThis generates and installs completions to ~/.config/fish/completions/docs-mcp.fish, providing tab-completion support for all CLI commands in your Fish shell.