### Local Development Setup and Run Commands Source: https://github.com/prathamdby/pr-agent/blob/main/AGENTS.md Commands to start Postgres, copy the environment template, install dependencies, and run the web and worker processes in separate terminals. DATABASE_URL is required for both roles. ```bash docker compose up -d postgres cp .env.example .env # fill GitHub and provider fields nub install # terminal 1 PORT=3000 ROLE=web nub src/index.ts # terminal 2 PORT=3001 ROLE=worker nub src/index.ts ``` -------------------------------- ### Initialize and run PR-Agent locally Source: https://github.com/prathamdby/pr-agent/blob/main/README.md Commands to start the PostgreSQL database, configure environment variables, install dependencies, and launch the web and worker roles. ```bash docker compose up -d postgres cp .env.example .env # fill GitHub + provider fields npm install -g --ignore-scripts=false @nubjs/nub nub install # terminal 1: webhook intake only ROLE=web nub src/index.ts # terminal 2: all queue consumers ROLE=worker nub src/index.ts ``` -------------------------------- ### Initialize and start PR-Agent with Docker Compose Source: https://github.com/prathamdby/pr-agent/blob/main/docs/operations.md Standard commands to initialize the environment file, build the images, and start the services. ```bash cp .env.example .env docker compose build docker compose up ``` -------------------------------- ### Install Nub and provision dependencies Source: https://github.com/prathamdby/pr-agent/blob/main/docs/cursor-cloud.md Install Nub once globally and then run nub install in the repo. Node 22.22.0 is pinned in .node-version and Nub provisions it on demand; prefer nub install over repo-root npm install. ```bash npm install -g --ignore-scripts=false @nubjs/nub ``` ```bash nub install ``` -------------------------------- ### Start stack with custom env file Source: https://github.com/prathamdby/pr-agent/blob/main/README.md Starts the stack with a custom environment file path. Optional when the default .env is not used. ```bash PR_AGENT_ENV_FILE=/abs/path/to/.env docker compose up -d ``` -------------------------------- ### Start PR-Agent with custom environment file path Source: https://github.com/prathamdby/pr-agent/blob/main/docs/operations.md Command to start the services using a specific environment file path via the PR_AGENT_ENV_FILE variable. ```bash PR_AGENT_ENV_FILE=/abs/path/to/.env docker compose up ``` -------------------------------- ### Start Docker daemon manually Source: https://github.com/prathamdby/pr-agent/blob/main/docs/cursor-cloud.md Start dockerd manually in cloud VMs when needed. Docker requires the fuse-overlayfs storage driver and iptables-legacy; the update script handles Docker installation. ```bash sudo dockerd &>/tmp/dockerd.log & ```