Development Setup Guide
This guide is for developers who wish to contribute to GenDoc or run it locally for advanced development. If you just want to use the application, please see the Installation & Configuration and Usage Guide.
1. Initial Setup
Clone the repository:
bashgit clone <your-repository-url> cd <repository-folder>
Install dependencies: This project uses npm workspaces. The following command will install dependencies for all packages (
cli
,web-ui
,shared
):bashnpm install
Configure Environment Variables: You need an OpenAI API key for development. Create your local
.env
file by copying the template:bashcp .env.example .env
Then, edit the
.env
file and add your API key.
2. Running in Development Mode
Running the Web UI (Frontend + Backend): To run the backend server and the Vite frontend with hot-reloading, use:
bashnpm run dev
You can access the web interface at
http://localhost:5173
.Running CLI Commands: To test CLI commands during development, you can use the
dev
script, which runs the TypeScript source code directly viats-node
.bash# Syntax: npm run dev --workspace=@gendoc/cli -- <command> [args] # Example: List all projects npm run dev --workspace=@gendoc/cli -- ls # Example: Create a new project interactively npm run dev --workspace=@gendoc/cli -- new
3. Next Steps
- For instructions on how to build and package the application, please see
build-and-package.md
. - For a guide on how to run the test suite, please refer to
testing.md
.