Repository navigation
feat(dist): add npx agentdiff and make every install path work - #62
Merged
Merged
Conversation
Add an npm launcher (npm/) so `npx agentdiff` runs the Python CLI at the same version via uv, pipx, or a private virtualenv built once with any Python 3.10+. Publish it from the tag workflow after PyPI and test it in CI. Give the Claude Code plugin's report script the same pipx and plain-Python fallbacks, and add an install table to the README.
On Ubuntu /bin is /usr/bin and holds python3, so the launcher correctly found Python and the test's expectation of 'nothing available' failed in CI. Run that case with only the stub directory on PATH.
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
AgentDiff can now be run with whatever the machine already has:
npx agentdiff(new)npm i -g agentdiffuvx --from agent-trajectory-diff agentdiffuv tool install agent-trajectory-diffpipx run --spec agent-trajectory-diff agentdiffpipx install agent-trajectory-diffpip install agent-trajectory-diff/agentdiff:report(now works without uv)/plugin install agentdiff --marketplace kerrshift/agentdiffWhy
Distribution is the main lever for reach (roadmap P1.2/P1.7). Before this PR, the Claude Code plugin needed uv or a pre-installed
agentdiff, and there was nonpxroute for the many Claude Code users who have Node but not uv.How
npm/: theagentdiffnpm package. It has zero dependencies and is 2.4 kB packed.bin/agentdiff.jsrunsagent-trajectory-diff==<its own version>, trying in order:uvx;pipx run(warmed silently first);~/.cache/agentdiff/venv-<version>(%LOCALAPPDATA%on Windows) with any Python 3.10+;Plugin
report.sh: gains the same pipx and plain-Python fallbacks. It still always exits 0, so the skill never aborts.Release and CI:
publish-npmjob inpublish.yml:npxalways resolves to an uploaded release;npm/package.jsonmatches the tag;npm publish --provenance.NPM_TOKENsecret isn't set, the job skips the npm upload with a warning instead of failing the release.npm launcherjob.Version sync:
tests/test_distribution.py(renamed fromtest_claude_plugin.py) now also checks thatnpm/package.jsonmatches__version__. AGENTS.md's release rule says to bump the npm and plugin versions together.Testing
End to end against the real PyPI 0.6.0 and my real logs:
npm pack, thennpx ./agentdiff-0.6.0.tgz. It printed the report throughuvx, and again on a PATH with only Python 3.14, which built a venv and reused it on the second run.agentdiff,uvx,pipx, Python only). With nothing available it printed install help and exited 0./plugin install agentdiff --marketplace kerrshift/agentdiff) into an isolatedCLAUDE_CONFIG_DIR;reportskill;Before
npx agentdiffworks for usersNPM_TOKENrepository secret. The npm nameagentdiffis currently unclaimed.__version__,npm/package.jsonandplugin.jsontogether. That also delivers the new plugin fallbacks, because Claude Code pins plugin users toplugin.json's version.Until then, the README's
npx agentdiffline has nothing to run.Checklist
make lintpassesuv run python -m pytestis greenCHANGELOG.mdentry added under[Unreleased](if feat/fix)type(scope): summary