{"id":46886517,"url":"https://github.com/posthog/code","last_synced_at":"2026-06-16T04:01:00.975Z","repository":{"id":320669124,"uuid":"1064329797","full_name":"PostHog/code","owner":"PostHog","description":"The era of self-driving development is here","archived":false,"fork":false,"pushed_at":"2026-06-13T12:34:27.000Z","size":178481,"stargazers_count":137,"open_issues_count":229,"forks_count":37,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T14:13:36.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://posthog.com/code","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PostHog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-25T21:53:50.000Z","updated_at":"2026-06-13T12:34:30.000Z","dependencies_parsed_at":"2026-04-09T02:02:22.459Z","dependency_job_id":"4b9286d4-184f-4261-8698-5de8295c2a29","html_url":"https://github.com/PostHog/code","commit_stats":null,"previous_names":["posthog/array","posthog/twig","posthog/code"],"tags_count":1245,"template":false,"template_full_name":null,"purl":"pkg:github/PostHog/code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostHog","download_url":"https://codeload.github.com/PostHog/code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34390052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-10T22:13:52.765Z","updated_at":"2026-06-16T04:01:00.965Z","avatar_url":"https://github.com/PostHog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]\n\u003e Interested in PostHog Code? [Join the waitlist](https://posthog.com/code) or hop into our [Discord](https://discord.gg/aSrHKVNVdR).\n\n**[Download the latest version](https://github.com/PostHog/code/releases/latest)**\n\nFound a bug or have feedback? [Open an issue](https://github.com/PostHog/code/issues/new) on GitHub.\n\n# PostHog Code\n\nThis is the monorepo for PostHog Code apps and the agent framework that powers them.\n\n## Development\n\n### Prerequisites\n\n- Node.js 22+\n- pnpm 10.23.0\n\n### Setup\n\n```bash\n# Install pnpm if you haven't already\nnpm install -g pnpm\n\n# Install dependencies for all packages\npnpm install\n\n# Optional: copy environment config\n# Only needed for code signing (APPLE_*) or PostHog analytics (VITE_POSTHOG_*).\n# The app runs fine in dev without it.\ncp .env.example .env\n\n```\n\n### Running in Development\n\nBy 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.\n\n```bash\n# Run both agent (watch mode) and code app in parallel\npnpm dev\n\n# Or run them separately:\npnpm dev:agent  # Run agent in watch mode\npnpm dev:code   # Run code app\n\n# Manually update phrocs to the latest version\npnpm update:phrocs\n\n# Use mprocs instead of phrocs\npnpm dev:mprocs\n```\n\n\u003e **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.\n\n### Utility Scripts\n\nScripts in `scripts/` for development and debugging:\n\n| Script | Description |\n|--------|-------------|\n| `scripts/clean-posthog-code-macos.sh` | Remove all PostHog Code app data from macOS (caches, preferences, logs, saved state). Use `--app` flag to also delete PostHog Code.app from /Applications. |\n| `scripts/test-access-token.js` | Validate a PostHog OAuth access token by testing API endpoints. Usage: `node scripts/test-access-token.js \u003ctoken\u003e \u003cproject_id\u003e [region]` |\n\n## Project Structure\n\n```\nposthog-code/\n├── apps/\n│   ├── code/            # Electron desktop app (React, Vite)\n│   ├── mobile/          # React Native mobile app (Expo)\n│   └── cli/             # CLI for stacked PRs\n├── packages/\n│   ├── agent/           # TypeScript agent framework\n│   ├── core/            # Shared business logic\n│   ├── electron-trpc/   # tRPC for Electron IPC\n│   └── shared/          # Shared utilities (Saga pattern, etc.)\n```\n\n## Documentation\n\n| File | Description |\n|------|-------------|\n| [apps/code/README.md](./apps/code/README.md) | Desktop app: building, signing, distribution, and workspace configuration |\n| [apps/mobile/README.md](./apps/mobile/README.md) | Mobile app: Expo setup, EAS builds, and TestFlight deployment |\n| [apps/cli/README.md](./apps/cli/README.md) | CLI: stacked PR management with Jujutsu |\n| [AGENTS.md](./AGENTS.md) | Architecture rules, code style, patterns, and testing guidelines (read by Claude Code, Codex, Cursor, Aider, etc.) |\n| [CONTRIBUTING.md](./CONTRIBUTING.md) | How to contribute to PostHog Code |\n| [docs/LOCAL-DEVELOPMENT.md](./docs/LOCAL-DEVELOPMENT.md) | Connecting PostHog Code to a local PostHog instance |\n| [docs/UPDATES.md](./docs/UPDATES.md) | Release versioning and git tagging |\n| [docs/TROUBLESHOOTING.md](./docs/TROUBLESHOOTING.md) | Common issues and fixes |\n| [docs/DEEP-LINKS.md](./docs/DEEP-LINKS.md) | `posthog-code://` deep link schemes and parameters |\n\n## Contributing\n\nWe love contributions big and small. See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.\n\n## Troubleshooting\n\nSee [docs/TROUBLESHOOTING.md](./docs/TROUBLESHOOTING.md) for common issues (black screen, Electron install failures, native module crashes, etc.).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthog%2Fcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fcode/lists"}