diff --git a/README.md b/README.md index f0a07787..87c69180 100644 --- a/README.md +++ b/README.md @@ -12,34 +12,24 @@ A collection of tools for managing LLM deployments and building AI agents. This is a monorepo using npm workspaces for package management and a dual TypeScript configuration for development and building. -### Setup +### Common Commands ```bash # Install all dependencies npm install -# Build all packages (required for production use) +# Build all packages (required for publishing to NPM) npm run build -# Or run directly with tsx during development (no build needed) -cd packages/pods && npx tsx src/cli.ts -cd packages/agent && npx tsx src/cli.ts -``` - -### Common Commands - -```bash -# Clean all build artifacts and tsconfig.tsbuildinfo files +# Clean out dist/ folders in all packages npm run clean -# Build all packages in dependency order -npm run build - -# Run biome checks and TypeScript type checking (no build required) +# Run linting, formatting, and tsc typechecking (no build needed) npm run check -# Run tests (if present) -npm run test +# Run directly with tsx during development (no build needed) +cd packages/pods && npx tsx src/cli.ts +cd packages/agent && npx tsx src/cli.ts ``` ### Package Dependencies @@ -48,6 +38,8 @@ The packages have the following dependency structure: `pi-tui` -> `pi-agent` -> `pi` +When new packages are added, the must be inserted in the correct order in the `build` script in `package.json`. + ### TypeScript Configuration The monorepo uses a dual TypeScript configuration approach: @@ -89,7 +81,7 @@ Quick version: npm run publish:dry # Publish all packages to npm -npm run publish:all +npm run publish ``` ## License diff --git a/package.json b/package.json index 98ed9efa..3c0232da 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,9 @@ "version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js", "version:major": "npm version major -ws --no-git-tag-version && node scripts/sync-versions.js", "version:set": "npm version -ws", - "version:sync": "node scripts/sync-versions.js", - "prepublish:all": "npm run clean && npm run build && npm run check", - "publish:all": "npm run prepublish:all && npm publish -ws --access public", - "publish:dry": "npm run prepublish:all && npm publish -ws --access public --dry-run" + "prepublish": "npm run clean && npm run build && npm run check", + "publish": "npm run prepublish && npm publish -ws --access public", + "publish:dry": "npm run prepublish && npm publish -ws --access public --dry-run" }, "devDependencies": { "@biomejs/biome": "^2.1.4", @@ -27,5 +26,6 @@ }, "engines": { "node": ">=20.0.0" - } + }, + "version": "" } diff --git a/packages/agent/package.json b/packages/agent/package.json index de8f3867..6e53a9b2 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -4,7 +4,7 @@ "description": "General-purpose agent with tool calling and session persistence", "type": "module", "bin": { - "pi-agent": "./dist/cli.js" + "pi-agent": "dist/cli.js" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -12,7 +12,7 @@ "dist" ], "scripts": { - "clean": "rm -rf dist tsconfig.tsbuildinfo", + "clean": "rm -rf dist", "build": "tsc -p tsconfig.build.json && chmod +x dist/cli.js", "check": "biome check --write .", "prepublishOnly": "npm run clean && npm run build" @@ -38,7 +38,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/badlogic/pi-mono.git", + "url": "git+https://github.com/badlogic/pi-mono.git", "directory": "packages/agent" }, "engines": { diff --git a/packages/pods/package.json b/packages/pods/package.json index bfd3d13d..fa8a7003 100644 --- a/packages/pods/package.json +++ b/packages/pods/package.json @@ -4,10 +4,10 @@ "description": "CLI tool for managing vLLM deployments on GPU pods", "type": "module", "bin": { - "pi": "./dist/cli.js" + "pi": "dist/cli.js" }, "scripts": { - "clean": "rm -rf dist tsconfig.tsbuildinfo", + "clean": "rm -rf dist", "build": "tsc -p tsconfig.build.json && chmod +x dist/cli.js && cp src/models.json dist/", "check": "biome check --write .", "prepublishOnly": "npm run clean && npm run build" @@ -26,7 +26,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/badlogic/pi-mono.git", + "url": "git+https://github.com/badlogic/pi-mono.git", "directory": "packages/pods" }, "engines": { diff --git a/packages/tui/package.json b/packages/tui/package.json index 2f091585..a8371457 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "dist/index.js", "scripts": { - "clean": "rm -rf dist tsconfig.tsbuildinfo", + "clean": "rm -rf dist", "build": "tsc -p tsconfig.build.json", "check": "biome check --write .", "prepublishOnly": "npm run clean && npm run build" @@ -27,7 +27,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/badlogic/pi-mono.git", + "url": "git+https://github.com/badlogic/pi-mono.git", "directory": "packages/tui" }, "engines": {