### Install and Run dev3000 CLI Source: https://github.com/vercel-labs/dev3000/blob/main/README.md Installs the dev3000 command-line interface globally using pnpm and then runs the tool to start capturing development logs. ```bash pnpm install -g dev3000 dev3000 ``` -------------------------------- ### TypeScript CLI Entry Point Structure Source: https://github.com/vercel-labs/dev3000/blob/main/AGENTS.md Illustrates the structure of the CLI entry point using Commander.js, detailing the main commands like 'start' for the development environment and 'setup' for project configuration. ```typescript // src/cli.ts // Uses Commander.js for CLI interface // Two main commands: `start` (dev environment) and `setup` (project setup) // Default command is `start` if no subcommand provided ``` -------------------------------- ### TypeScript Project Setup for MCP API Routes Source: https://github.com/vercel-labs/dev3000/blob/main/AGENTS.md Details the project setup process, including installing MCP API routes in the Next.js app directory, creating necessary route files, and updating package.json with new scripts and dependencies. ```typescript // src/setup.ts // Installs MCP (Model Context Protocol) API routes in Next.js app directory // Creates `app/api/mcp/[transport]/route.ts` with three tools: `read_consolidated_logs`, `search_logs`, `get_browser_errors` // Updates package.json with `dev:ai` script and dependencies (`mcp-handler`, `zod`) // Manages .gitignore entries for `ai-dev-tools/` directory ``` -------------------------------- ### Run dev3000 with Custom Port Source: https://github.com/vercel-labs/dev3000/blob/main/README.md Starts the dev3000 tool, specifying a custom port (e.g., 5173) for the application it is monitoring. ```bash dev3000 --port 5173 ``` -------------------------------- ### TypeScript Development Environment Orchestration Source: https://github.com/vercel-labs/dev3000/blob/main/AGENTS.md Describes the development environment setup, which orchestrates the dev server and browser monitoring using Playwright. It handles port availability checks and logging. ```typescript // src/dev-environment.ts // Orchestrates any dev server + browser monitoring via Playwright // Works with any web framework (Next.js, Vite, etc.) // Checks port availability before starting (defaults: 3000 for app, 3684 for MCP server) // If ports are in use, displays process IDs and kill command instead of auto-killing // Uses persistent Chrome profile and captures unified logs // Monitors console logs, network requests, page errors, navigation events // Takes automatic screenshots on errors and route changes ``` -------------------------------- ### dev3000 CLI Options Source: https://github.com/vercel-labs/dev3000/blob/main/README.md Lists the available command-line options for the dev3000 tool, including port configuration, script execution, and Chrome profile directory. ```bash dev3000 [options] -p, --port Your app's port (default: 3000) --mcp-port MCP server port (default: 3684) -s, --script