Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
## Commands

- `pnpm install` - Install all dependencies
- `pnpm dev` - Run both agent (watch) and code app via mprocs
- `pnpm dev:ph` - Run both agent (watch) and code app via phrocs
- `pnpm dev` - Run both agent (watch) and code app via phrocs
- `pnpm dev:mprocs` - Run both agent (watch) and code app via mprocs
- `pnpm dev:agent` - Run agent package in watch mode only
- `pnpm dev:code` - Run code desktop app only
- `pnpm build` - Build all packages (turbo)
Expand Down
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cp .env.example .env

### Running in Development

By default, `pnpm dev` uses [mprocs](https://github.com/pvolok/mprocs) to run the agent and code app in parallel.
By default, `pnpm dev` uses phrocs (our custom process runner) to run the agent and code app in parallel. phrocs auto-installs on first run and reads the `mprocs.yaml` config file. The binary is downloaded to `bin/phrocs` and is git-ignored.

```bash
# Run both agent (watch mode) and code app in parallel
Expand All @@ -43,21 +43,13 @@ pnpm dev
# Or run them separately:
pnpm dev:agent # Run agent in watch mode
pnpm dev:code # Run code app
```

### phrocs (alpha)

phrocs is our custom process runner built as a replacement for mprocs. It's currently in alpha and can be used as an alternative dev runner. phrocs does not auto-update — you must manually run the update command to pull the latest version.

```bash
# Run dev with phrocs (auto-installs on first run)
pnpm dev:ph

# Manually update phrocs to the latest version
pnpm update:phrocs
```

phrocs reads the same `mprocs.yaml` config file. The binary is downloaded to `bin/phrocs` and is git-ignored.
# Use mprocs instead of phrocs
pnpm dev:mprocs
```

> **Want to connect to a local PostHog instance?** See [docs/LOCAL-DEVELOPMENT.md](./docs/LOCAL-DEVELOPMENT.md) for OAuth setup and connecting to localhost:8010.

Expand Down
13 changes: 7 additions & 6 deletions mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
procs:
code:
1-code:
shell: 'node scripts/pnpm-run.mjs --filter code run start'
env:
DEBUG: "false"
depends_on:
- agent
- git
- enricher

agent:
2-agent:
shell: 'node scripts/pnpm-run.mjs --filter agent run dev'

git:
3-git:
shell: 'node scripts/pnpm-run.mjs --filter @posthog/git run dev'

enricher:
4-enricher:
shell: 'node scripts/pnpm-run.mjs --filter @posthog/enricher run dev'

storybook:
5-storybook:
shell: 'node scripts/pnpm-run.mjs --filter code run storybook'
autostart: false

mobile-ios:
6-mobile-ios:
shell: 'node scripts/pnpm-run.mjs --filter @posthog/mobile run ios'
autostart: false
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"setup": "bash apps/code/bin/setup",
"prepare": "husky",
"dev": "pnpm build:deps && mprocs",
"dev:ph": "pnpm build:deps && bash scripts/ensure-phrocs.sh && bin/phrocs --config mprocs.yaml",
"dev": "pnpm build:deps && bash scripts/ensure-phrocs.sh && bin/phrocs --config mprocs.yaml",
"dev:mprocs": "pnpm build:deps && mprocs",
"dev:agent": "pnpm --filter agent dev",
"dev:git": "pnpm --filter @posthog/git dev",
"dev:code": "pnpm --filter code start",
Expand Down
Loading