{"id":40026509,"url":"https://github.com/posthog/twig","last_synced_at":"2026-03-05T11:05:52.375Z","repository":{"id":320669124,"uuid":"1064329797","full_name":"PostHog/Twig","owner":"PostHog","description":"The Agentic Development Environment","archived":false,"fork":false,"pushed_at":"2026-02-11T18:49:16.000Z","size":37890,"stargazers_count":21,"open_issues_count":122,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-11T21:04:25.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PostHog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":null,"dco":null,"cla":null}},"created_at":"2025-09-25T21:53:50.000Z","updated_at":"2026-02-11T17:11:31.000Z","dependencies_parsed_at":"2026-02-03T12:03:05.208Z","dependency_job_id":null,"html_url":"https://github.com/PostHog/Twig","commit_stats":null,"previous_names":["posthog/array","posthog/twig"],"tags_count":284,"template":false,"template_full_name":null,"purl":"pkg:github/PostHog/Twig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2FTwig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2FTwig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2FTwig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2FTwig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostHog","download_url":"https://codeload.github.com/PostHog/Twig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2FTwig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01-19T04:02:36.512Z","updated_at":"2026-02-26T10:30:51.173Z","avatar_url":"https://github.com/PostHog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]\n\u003e Twig is pre-alpha and not production-ready. Interested? Email jonathan@posthog.com\n\n**[Download the latest version](https://github.com/PostHog/twig/releases/latest)**\n\nFound a bug or have feedback? [Open an issue](https://github.com/PostHog/twig/issues/new) on GitHub.\n\n# Twig\n\nThis is the monorepo for PostHog's Twig 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# Copy environment config\ncp .env.example .env\n```\n\n### Running in Development\n\n```bash\n# Run both agent (watch mode) and twig app in parallel\npnpm dev\n\n# Or run them separately:\npnpm dev:agent  # Run agent in watch mode\npnpm dev:twig   # Run twig app\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-twig-macos.sh` | Remove all Twig app data from macOS (caches, preferences, logs, saved state). Use `--app` flag to also delete Twig.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```\ntwig/\n├── apps/\n│   ├── twig/            # 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/twig/README.md](./apps/twig/README.md) | Desktop app: building, signing, distribution, and workspace configuration |\n| [apps/twig/ARCHITECTURE.md](./apps/twig/ARCHITECTURE.md) | Desktop app: dependency injection, tRPC, state management, and events |\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| [CLAUDE.md](./CLAUDE.md) | Code style, patterns, and testing guidelines |\n| [docs/LOCAL-DEVELOPMENT.md](./docs/LOCAL-DEVELOPMENT.md) | Connecting Twig 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\n## Troubleshooting\n\nSee [docs/TROUBLESHOOTING.md](./docs/TROUBLESHOOTING.md) for common issues (black screen, Electron install failures, native module crashes, etc.).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Ftwig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthog%2Ftwig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Ftwig/lists"}