From 614c6ebce851dd823170348ee1a9800e20ecf5d1 Mon Sep 17 00:00:00 2001 From: Chris Scott Date: Mon, 29 Dec 2025 23:19:05 -0500 Subject: [PATCH] Fix local development instructions to use pnpm Closes #35 --- README.md | 15 +++++++++++---- scripts/setup-dev.sh | 37 +++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 0f5ef99d..69fc865b 100644 --- a/README.md +++ b/README.md @@ -189,21 +189,28 @@ OpenCode Manager creates a default `AGENTS.md` file in the workspace config dire This file is merged with any repository-specific `AGENTS.md` files, with repository instructions taking precedence for their respective codebases. -### Option 2: Local Development +### Option 2: Local Development (Contributors) + +For contributors who want to develop locally instead of using Docker. + +**Prerequisites:** +- [pnpm](https://pnpm.io/installation) - Package manager (required for workspaces) +- [Bun](https://bun.sh) - Backend runtime +- [OpenCode TUI](https://opencode.ai) - `npm install -g @opencode/tui` ```bash # Clone the repository git clone https://github.com/chriswritescode-dev/opencode-manager.git cd opencode-manager -# Install dependencies (uses Bun workspaces) -bun install +# Install dependencies (uses pnpm workspaces) +pnpm install # Copy environment configuration cp .env.example .env # Start development servers (backend + frontend) -npm run dev +pnpm dev ``` ## OAuth Provider Setup diff --git a/scripts/setup-dev.sh b/scripts/setup-dev.sh index f4fac5b4..ca50641c 100755 --- a/scripts/setup-dev.sh +++ b/scripts/setup-dev.sh @@ -4,18 +4,23 @@ set -e echo "🔍 Checking prerequisites..." -# Check if Node.js/Bun is installed -if command -v bun &> /dev/null; then - echo "✅ Bun is installed" - NODE_CMD="bun" -elif command -v node &> /dev/null; then - echo "✅ Node.js is installed" - NODE_CMD="node" -else - echo "❌ Neither Bun nor Node.js is installed. Please install one of them." +# Check if pnpm is installed (required for workspaces) +if ! command -v pnpm &> /dev/null; then + echo "❌ pnpm is not installed. Please install it with:" + echo " npm install -g pnpm" exit 1 fi +echo "✅ pnpm is installed" + +# Check if Bun is installed (required for backend) +if ! command -v bun &> /dev/null; then + echo "❌ Bun is not installed. Please install it from https://bun.sh" + exit 1 +fi + +echo "✅ Bun is installed" + # Check if Git is installed if ! git --version &> /dev/null; then echo "❌ Git is not installed. Please install Git and try again." @@ -46,13 +51,9 @@ else echo "✅ Workspace directory exists" fi -# Install dependencies +# Install dependencies using pnpm (handles workspaces) echo "📦 Installing dependencies..." -if [ "$NODE_CMD" = "bun" ]; then - bun install -else - npm install -fi +pnpm install echo "✅ Dependencies installed" @@ -68,6 +69,6 @@ fi echo "✅ Dev environment ready!" echo "" echo "🚀 To start development:" -echo " npm run dev # Start both backend and frontend" -echo " npm run dev:backend # Start backend only" -echo " npm run dev:frontend # Start frontend only" +echo " pnpm dev # Start both backend and frontend" +echo " pnpm dev:backend # Start backend only" +echo " pnpm dev:frontend # Start frontend only"