Skip to content

Commit 4726d7c

Browse files
authored
feat: Make phrocs the default dev runner (#1684)
## Problem phrocs is now stable enough to replace mprocs as the default dev runner. <!-- Who is this for and what problem does it solve? --> <!-- Closes #ISSUE_ID --> ## Changes 1. Swap pnpm dev to use phrocs, move mprocs to pnpm dev:mprocs 2. Number-prefix mprocs.yaml procs for consistent ordering and add enricher dependency to code 3. Update [CLAUDE.md](http://CLAUDE.md) and [README.md](http://README.md) to reflect the new default 4. Remove the separate "phrocs (alpha)" section from README <!-- What did you change and why? --> <!-- If there are frontend changes, include screenshots. --> ## How did you test this? Manually <!-- Describe what you tested -- manual steps, automated tests, or both. --> <!-- If you're an agent, only list tests you actually ran. -->
1 parent 6abf868 commit 4726d7c

4 files changed

Lines changed: 15 additions & 22 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
## Commands
1515

1616
- `pnpm install` - Install all dependencies
17-
- `pnpm dev` - Run both agent (watch) and code app via mprocs
18-
- `pnpm dev:ph` - Run both agent (watch) and code app via phrocs
17+
- `pnpm dev` - Run both agent (watch) and code app via phrocs
18+
- `pnpm dev:mprocs` - Run both agent (watch) and code app via mprocs
1919
- `pnpm dev:agent` - Run agent package in watch mode only
2020
- `pnpm dev:code` - Run code desktop app only
2121
- `pnpm build` - Build all packages (turbo)

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cp .env.example .env
3434

3535
### Running in Development
3636

37-
By default, `pnpm dev` uses [mprocs](https://github.com/pvolok/mprocs) to run the agent and code app in parallel.
37+
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.
3838

3939
```bash
4040
# Run both agent (watch mode) and code app in parallel
@@ -43,21 +43,13 @@ pnpm dev
4343
# Or run them separately:
4444
pnpm dev:agent # Run agent in watch mode
4545
pnpm dev:code # Run code app
46-
```
47-
48-
### phrocs (alpha)
49-
50-
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.
51-
52-
```bash
53-
# Run dev with phrocs (auto-installs on first run)
54-
pnpm dev:ph
5546

5647
# Manually update phrocs to the latest version
5748
pnpm update:phrocs
58-
```
5949

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

6254
> **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.
6355

mprocs.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
procs:
2-
code:
2+
1-code:
33
shell: 'node scripts/pnpm-run.mjs --filter code run start'
44
env:
55
DEBUG: "false"
66
depends_on:
77
- agent
88
- git
9+
- enricher
910

10-
agent:
11+
2-agent:
1112
shell: 'node scripts/pnpm-run.mjs --filter agent run dev'
1213

13-
git:
14+
3-git:
1415
shell: 'node scripts/pnpm-run.mjs --filter @posthog/git run dev'
1516

16-
enricher:
17+
4-enricher:
1718
shell: 'node scripts/pnpm-run.mjs --filter @posthog/enricher run dev'
1819

19-
storybook:
20+
5-storybook:
2021
shell: 'node scripts/pnpm-run.mjs --filter code run storybook'
2122
autostart: false
2223

23-
mobile-ios:
24+
6-mobile-ios:
2425
shell: 'node scripts/pnpm-run.mjs --filter @posthog/mobile run ios'
2526
autostart: false

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"scripts": {
1111
"setup": "bash apps/code/bin/setup",
1212
"prepare": "husky",
13-
"dev": "pnpm build:deps && mprocs",
14-
"dev:ph": "pnpm build:deps && bash scripts/ensure-phrocs.sh && bin/phrocs --config mprocs.yaml",
13+
"dev": "pnpm build:deps && bash scripts/ensure-phrocs.sh && bin/phrocs --config mprocs.yaml",
14+
"dev:mprocs": "pnpm build:deps && mprocs",
1515
"dev:agent": "pnpm --filter agent dev",
1616
"dev:git": "pnpm --filter @posthog/git dev",
1717
"dev:code": "pnpm --filter code start",

0 commit comments

Comments
 (0)