How to Install Dependencies for OpenWork: A Complete Setup Guide

Install OpenWork dependencies by cloning the repository, ensuring Node.js 20+ and pnpm 9.x are installed, then running pnpm install from the project root to set up the Turbo-powered monorepo.

OpenWork is a free, open-source desktop application for sharing AI workflows across macOS, Windows, and Linux. This guide walks through installing dependencies for the different-ai/openwork repository, which uses a modern monorepo architecture with pnpm workspaces and Turbo orchestration.

Prerequisites

Before installing dependencies, ensure your environment meets the requirements specified in [package.json](https://github.com/different-ai/openwork/blob/dev/package.json):

  • Node.js: Version 20 or higher ("node": ">=20")
  • pnpm: Version 9.x ("pnpm": "^9.1.5")

The repository enforces pnpm through a preinstall script that runs npx only-allow pnpm, blocking npm or yarn usage.

Install pnpm globally if you haven't already:

npm install -g pnpm@9

Step 1: Clone the Repository

Clone the OpenWork repository and switch to the dev branch where active development occurs:

git clone https://github.com/different-ai/openwork.git
cd openwork
git checkout dev

Step 2: Install All Dependencies

Run pnpm install from the repository root. This command reads the workspace configuration in pnpm-workspace.yaml and installs dependencies across all packages:

pnpm install

# or shorthand

pnpm i

The installation process:

Step 3: Verify the Installation

Confirm successful setup by starting the development server:

pnpm dev

This executes turbo run dev --parallel, which starts all applications in the monorepo simultaneously. You should see output indicating the dev profile and Chrome DevTools Protocol (CDP) port:

[openwork] dev profile=… cdp=http://127.0.0.1:9223

For multiple git worktrees or isolated development profiles, use:

pnpm dev:worktree

This command sets OPENWORK_DEV_PROFILE=auto, automatically derives a stable profile name from your worktree path, and allows Electron and Vite to select free ports. It also defaults OPENWORK_ELECTRON_USE_MOCK_KEYCHAIN=1 to prevent macOS keychain prompts from blocking the main loop.

Understanding the Monorepo Structure

OpenWork's dependency management relies on several key configuration files:

File Purpose
[package.json](https://github.com/different-ai/openwork/blob/dev/package.json) Root manifest defining scripts, Engine requirements, and shared devDependencies
[pnpm-workspace.yaml](https://github.com/different-ai/openwork/blob/dev/pnpm-workspace.yaml) Declares workspace packages: apps/* and packages/*
[turbo.json](https://github.com/different-ai/openwork/blob/dev/turbo.json) Configures Turbo pipeline for parallel dev servers, caching, and task orchestration
[pnpm-lock.yaml](https://github.com/different-ai/openwork/blob/dev/pnpm-lock.yaml) Locks all dependency versions for reproducible installs

The root package.json includes these critical scripts for dependency management:

{
  "scripts": {
    "preinstall": "npx only-allow pnpm",
    "prepare": "pnpm i && pnpm turbo run build --filter=@openwork/precommit",
    "pnpm:update": "pnpm up -L --latest"
  }
}
  • preinstall: Enforces pnpm, rejecting npm/yarn
  • prepare: Builds internal tooling after install
  • **`pnpm:update``: Upgrades all dependencies to latest versions

Common Installation Issues

Lock file conflicts: If pnpm-lock.yaml is out of sync with package.json, run:

pnpm install --frozen-lockfile=false

Workspace build failures: Some internal packages must build before others. The prepare script handles most cases, but you can manually build dependencies:

pnpm turbo run build --filter=@openwork/precommit

Port conflicts in dev: When running multiple worktrees, pnpm dev:worktree automatically assigns free ports. For manual control:

OPENWORK_DEV_PROFILE=my-feature OPENWORK_ELECTRON_REMOTE_DEBUG_PORT=0 PORT=0 pnpm dev

Summary

  • Use pnpm exclusively — the repository blocks npm and yarn via preinstall
  • Run pnpm install once at the root to populate all workspace packages
  • Start with pnpm dev for standard development or pnpm dev:worktree for isolated profiles
  • Key files: package.json for scripts, pnpm-workspace.yaml for workspace definition, turbo.json for task orchestration

Frequently Asked Questions

Why does OpenWork require pnpm instead of npm or yarn?

The preinstall script in [package.json](https://github.com/different-ai/openwork/blob/dev/package.json) runs npx only-allow pnpm, which exits with an error if you attempt to use npm or yarn. This ensures workspace consistency, faster installs through content-addressable storage, and proper handling of the monorepo's dependency graph.

What Node.js version does OpenWork require?

The engines field in [package.json](https://github.com/different-ai/openwork/blob/dev/package.json) specifies "node": ">=20". You need Node.js 20 or higher to run the build tools and Electron-based desktop application.

How do I update dependencies to their latest versions?

Run pnpm pnpm:update or pnpm up -L --latest at the repository root. This upgrades all dependencies across workspaces to their latest compatible versions and updates pnpm-lock.yaml. After updating, run pnpm install to synchronize the lock file.

Can I run multiple OpenWork development instances simultaneously?

Yes. Use pnpm dev:worktree instead of pnpm dev. This sets OPENWORK_DEV_PROFILE=auto, creating isolated profiles based on your git worktree path. Each instance gets separate CDP and Vite ports, preventing conflicts. The command also enables a mock keychain to avoid macOS permission dialogs.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →