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
11 changes: 5 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Required for Claude Agent SDK
ANTHROPIC_API_KEY=sk-ant...
ANTHROPIC_API_KEY=sk-ant-...

# Repository paths (use ~ for home directory, or absolute paths)
EXAMPLES_PATH=~/development/examples
MCP_PATH=~/development/posthog/products/mcp
WIZARD_PATH=~/development/wizard
# Repo paths (defaults work if using meta structure)
EXAMPLES_PATH=repos/examples
MCP_PATH=repos/posthog/products/mcp
WIZARD_PATH=repos/wizard
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Meta repos (cloned dependencies)
repos/

# Dependencies
node_modules/
**/node_modules/
Expand Down
8 changes: 8 additions & 0 deletions .meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"projects": {
"repos/examples": "[email protected]:PostHog/examples.git",
"repos/wizard": "[email protected]:PostHog/wizard.git",
"repos/posthog": "[email protected]:PostHog/posthog.git"
}
}

35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ Install [mprocs](https://github.com/pvolok/mprocs):
brew install mprocs
```

Install dependencies in this repo:
Install [meta](https://github.com/meta-cli/meta) for managing multiple git repositories:

```bash
pnpm install
npm i -g meta
```

Pull down repos and install dependencies in this repo:

```bash
pnpm pull # this will pull down the latest versions of all repos
pnpm install:all # this will install dependencies in this repo
```

Copy and edit `.env` with your repo paths and API key:
Expand All @@ -66,13 +73,11 @@ cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-... # Required for wizard PR evaluator

# Adjust if your repos are in different locations
EXAMPLES_PATH=~/development/examples
MCP_PATH=~/development/posthog/products/mcp
WIZARD_PATH=~/development/wizard
EXAMPLES_PATH=repos/examples
MCP_PATH=repos/posthog/products/mcp
WIZARD_PATH=repos/wizard
```

Make sure you've set up and installed dependencies for all required repos.

### Running

Enter `mprocs` to run the local dev stack:
Expand All @@ -96,3 +101,19 @@ Manual processes (press `s` to start):
|---------|-------------|
| `wizard-run` | Run the Wizard on a test app |
| `workbench-evaluate` | Evaluate a PR or branch's Wizard integration |

### Running repo specific commands

With `--include-only` you can run commands in a specific repo:

```bash
meta exec 'pnpm run dev' --include-only repos/wizard
```

We have npm shortcuts for these:

```bash
pnpm wizard [command] # runs 'meta exec --include-only repos/wizard'
pnpm posthog [command] # runs 'meta exec --include-only repos/posthog'
pnpm examples [command] # runs 'meta exec --include-only repos/examples'
```
8 changes: 4 additions & 4 deletions mprocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ procs:

examples:
# Resources manifest ZIP available at: http://localhost:8765/examples-mcp-resources.zip
shell: "cd ${EXAMPLES_PATH:-../examples} && npm run dev"
shell: "cd ${EXAMPLES_PATH:-repos/examples} && npm run dev"
autostart: true
stop_signal: SIGTERM
env_file: .env

mcp:
# Use dev:local-resources to read from local examples server
# Runs at http://localhost:8787
shell: "cd ${MCP_PATH:-../posthog/products/mcp} && pnpm run dev:local-resources"
shell: "cd ${MCP_PATH:-repos/posthog/products/mcp} && pnpm run dev:local-resources"
autostart: true
stop_signal: SIGTERM
env_file: .env

mcp-inspector:
# Opens MCP Inspector UI at http://localhost:6274
shell: "cd ${MCP_PATH:-../posthog/products/mcp} && pnpm run inspector"
shell: "cd ${MCP_PATH:-repos/posthog/products/mcp} && pnpm run inspector"
autostart: true
env_file: .env

wizard:
# Skip global link - just build and watch. Use wizard-run to execute.
shell: "cd ${WIZARD_PATH:-../wizard} && pnpm build && pnpm build:watch"
shell: "cd ${WIZARD_PATH:-repos/wizard} && pnpm build && pnpm build:watch"
autostart: true
stop_signal: SIGTERM
env_file: .env
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"private": true,
"type": "module",
"scripts": {
"dev": "mprocs",
"setup:all": "npm i -g meta && meta git update && meta exec 'pnpm install'",
"pull": "meta git pull",
"status": "meta git status",
"install:all": "meta exec 'pnpm install'",
"wizard": "f(){ meta exec --include-only repos/wizard -- \"$*\"; }; f",
"posthog": "f(){ meta exec --include-only repos/posthog -- \"$*\"; }; f",
"examples": "f(){ meta exec --include-only repos/examples -- \"$*\"; }; f",
"evaluate": "tsx services/pr-evaluator/index.ts"
},
"dependencies": {
Expand All @@ -14,7 +22,9 @@
},
"devDependencies": {
"@types/node": "^22.0.0",
"meta": "^2.2.25",
"tsx": "^4.19.0",
"typescript": "^5.8.0"
}
},
"packageManager": "[email protected]+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b"
}
Loading