Skip to content

feat: add Elixir framework support#946

Draft
sarahxsanders wants to merge 1 commit into
mainfrom
posthog-code/elixir-framework-support
Draft

feat: add Elixir framework support#946
sarahxsanders wants to merge 1 commit into
mainfrom
posthog-code/elixir-framework-support

Conversation

@sarahxsanders

@sarahxsanders sarahxsanders commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Related PRs:

Adds Elixir as a supported framework, following the backend-framework pattern:

  • Integration.elixir enum entry in the frameworks block, before the language fallbacks
  • ELIXIR_AGENT_CONFIG in src/frameworks/elixir/ — claims a mix.exs with a def project definition (a stray placeholder file falls through); gathers whether the app is Phoenix (:phoenix dep) as agent context, which drives the PostHog.Integrations.Plug prompt nudge; installs by editing the mix.exs deps list then mix deps.get (Mix has no single add verb — same manual-edit framing as pip)
  • mixPackageManager helper + FRAMEWORK_REGISTRY entry
  • bash-fence allowlist for mix: deps.get|deps.update|deps.tree|compile|format|hex.info only — mix executes arbitrary project-defined tasks, so mix run/test/phx.server/ecto.* stay denied
  • Pins framework: elixir on integration-elixir in the variant-resolution contract test, matching the context-mill PR above

Why: the wizard docs page lists Elixir as "Coming soon"; instead of removing the label (posthog.com#18797), we're making the wizard actually support it.

Verification: pnpm build ✅, pnpm test ✅ (1542 tests, incl. new elixir detect + mix fence tests), pnpm fix


Created with PostHog Code

@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@sarahxsanders
sarahxsanders force-pushed the posthog-code/go-framework-support branch from 6e5076c to 57700c0 Compare July 22, 2026 20:41
@sarahxsanders
sarahxsanders force-pushed the posthog-code/elixir-framework-support branch from 5bc160d to f14d962 Compare July 22, 2026 20:41
@sarahxsanders
sarahxsanders changed the base branch from posthog-code/go-framework-support to main July 22, 2026 20:42
Adds Elixir as a supported framework, stacked on the Go framework PR:

- Integration.elixir enum entry in the frameworks block, before the language fallbacks
- ELIXIR_AGENT_CONFIG in src/frameworks/elixir/ — claims a mix.exs with a def project definition, gathers whether the app is Phoenix (:phoenix dep) as agent context for the Plug integration nudge, installs by editing mix.exs deps then mix deps.get (Mix has no single add command)
- mixPackageManager helper + FRAMEWORK_REGISTRY entry
- bash-fence allowlist for mix: deps.get/deps.update/deps.tree/compile/format/hex.info only — mix runs arbitrary project-defined tasks, so run/test/phx.server/ecto.* stay denied
- Pins framework: elixir on integration-elixir in the variant-resolution contract test, matching context-mill PR #268 which must release before this merges
- Marks mix.exs as a real framework target in the agentic manifest comment

Generated-By: PostHog Code
Task-Id: 9c949855-7611-48f2-b8b5-7aa4112543e5
@sarahxsanders
sarahxsanders force-pushed the posthog-code/elixir-framework-support branch from f14d962 to ab2cdff Compare July 22, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant