Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

Make the plugins, CLI setup, MCP config and editor extensions work with any Diffinery instance #314

Mergedtest-botagenton behalf of cnbrkdmrcimerged into main from plugins-any-instance
test-botagenton behalf of cnbrkdmrciopened Author

Requested by Can · project thread

What this changes

Diffinery is open source now, so the Claude Code and Codex plugins, the SessionStart hook, the CI mod, the CLI's setup, the MCP config and the editor extensions work with any instance, not only diffinery.com (still the default).

  • Claude Code plugins (diffinery 0.1.4, diffinery-ci 0.2.4): a Diffinery URL setting (userConfig.url, default https://diffinery.com). .mcp.json uses ${user_config.url}/mcp. The SessionStart hook recognises clones on DIFFINERY_URL, the setting (CLAUDE_PLUGIN_OPTION_URL), the CLI's saved URL or diffinery.com, and says when the CLI points elsewhere. diffinery-ci picks the instance the same way and sends a token only to the instance it belongs to (it used to send the CLI's token to DIFFINERY_URL whatever that was). The skill and /pr-status no longer assume diffinery.com. Both plugins get an icon, documentation and support URLs, and Codician Team as author (marketplace owner too).
  • Codex: Codex substitutes no plugin settings, so its manifest reads its own codex.mcp.json (diffinery.com). Tested with Codex 0.164: a user server named diffinery replaces it.
  • Server: /-/claude/<name>.zip from a self-hosted instance defaults the setting to that instance (docs/claude-plugins.ts, with a small zip reader in lib/archive.ts). diffinery.com serves the packed bytes unchanged.
  • CLI: diffinery setup --url X writes the setting into Claude Code's pluginConfigs (for @inline copies and marketplace installs) and, when Codex is installed, adds [mcp_servers.diffinery] to config.toml. It doesn't use codex mcp add, which starts an OAuth flow and waits on it. A clone of another host now gets a hint to diffinery login --url.
  • VS Code family (0.1.2): the first sign-in asks for diffinery.com or another server, there's a new Diffinery: Use Another Server… command, and an instance's install-editor leaves its address for the extension to offer once.
  • JetBrains (0.1.1): Use another server… on the sign-in page and in Share Project, plus a one-click suggestion when a Diffinery plugin repository is configured. The dist zip is rebuilt.
  • Docs: Self-hosted sections in Claude Code, Codex, Claude, CI status, other apps, cloud agents, MCP, self-hosting, both clone-in-editor guides and plugins/README.

How it was tested

  • pnpm -r typecheck and pnpm -r test pass: server 1124, CLI 99 (plus new setup tests for pluginConfigs and Codex), VS Code 15, runner, git-core and workflow-yaml. There are new unit tests for the per-instance zip rewrite.
  • claude plugin test plugins/diffinery-ci: 10/10, including the new instance and token choice. claude plugin validate passes for the marketplace and both plugins (--profile directory leaves only a privacy-policy URL warning).
  • JetBrains: ./gradlew test dist verifyPlugin. The verifier reports Compatible on IC 2024.3.6, IC 2025.2.4 and IU 2026.2.3.
  • End to end against pnpm dev (http://localhost:8787):
    • /-/claude/diffinery.zip serves "default": "http://localhost:8787", and the SHA-256 header matches.
    • diffinery login --url then diffinery setup in a clean home wrote pluginConfigs and Codex's config.toml. codex mcp list shows http://localhost:8787/mcp.
    • Claude Code in a clone of a local repo: claude mcp list shows the plugin's server at localhost Connected. claude -p got the hook's note naming the local instance even with no CLI config, so the setting alone drove it, and the MCP whoami tool answered dev.
  • Not checked by eye: the VS Code and JetBrains dialogs in a live editor or IDE. install.ps1 was not run (no pwsh). The diffinery-ci band couldn't run in claude -p in this container because hooks modules are switched off there; its logic is covered by the mod tests.

Checklist

  • pnpm -r typecheck and pnpm -r test pass
  • User- or admin-visible changes update the docs in apps/diffinery/docs
  • New D1 migrations use the next free number in apps/diffinery/migrations (none)

🤖 Generated with Claude Code

https://claude.ai/code/session_01TdJysKcGD4ekSD5ZHbwBmJ

Intentwhat this change is meant to do

Diffinery is open source and people run their own instances, so every integration must reach the instance a person uses instead of the invite-only diffinery.com.

test-bot merged commit 417ed91 into main
Pull request successfully merged and closed
test-bot merged 417ed91 into main
Sign in to join the conversation.