Skip to content

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.

To start developing locally, ensure you have Bun installed as the project runtime. Begin by installing dependencies:

Terminal window
bun install

The project uses Bun as its primary runtime and includes a development mode accessible through npm scripts. To run the development server:

Terminal window
bun run dev

You can also pass arguments directly to the development command:

Terminal window
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.

The project includes comprehensive testing support through Bun’s built-in test runner and TypeScript type checking:

Terminal window
bun test

For type safety, run the TypeScript compiler in no-emit mode:

Terminal window
bun run typecheck

Tests 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.

The justfile provides convenient shortcuts for common development tasks. The primary commands include:

Terminal window
just run [args] # Run the dev server with optional arguments
just chat [args] # Run the chat command
just install-completions # Install Fish shell completions
just fmt-mdx # Format MDX files (delegates to parent justfile)

The justfile includes built-in support for Fish shell development:

Terminal window
just fish

This launches an interactive Fish shell environment with the project context loaded. Install shell completions for the docs-mcp CLI:

Terminal window
just install-completions

This generates and installs completions to ~/.config/fish/completions/docs-mcp.fish, providing tab-completion support for all CLI commands in your Fish shell.