Repository navigation
Document uvx as the zero-install path for LabLink - #12
Merged
Merged
Conversation
ARCHITECTURE.md §9 named uv as the only user-facing prerequisite, but every install instruction in the README said pip install, which assumes the reader already has a virtualenv and that their MCP client launches the server from it. The README now opens Install with a uvx quickstart that goes from `lablink scan --write-configs` to `lablink connect` without creating an environment. It explains the `--from "lablink-mcp[extras]" <command>` form and the three entry points. The client config in Quick Start step 5 now launches the server through uvx with the same extras. pip stays as the development path. Every documented command uses `--python 3.12`. Without it, uv 0.10.4 takes the first python3 on PATH; on a stock Mac that is Apple's 3.9, and resolution fails against requires-python >= 3.10 instead of downloading a compatible interpreter. §9 now says so, so the two documents agree on what a user needs installed. Extras specs in pip commands are now quoted. Unquoted brackets fail under zsh, the macOS default shell. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 changed
README.md, Install section. It now starts with auvxquickstart, placed before thepip installblock. With only uv on the machine, a reader goes from plugging in an instrument to a connected session in two commands, without creating a virtualenv:The section explains:
--from "lablink-mcp[extras]"works;pyproject.tomlto name after it (lablink,lablink-mcp,lablink-sim);--python 3.12is there.It also gives
uv tool installfor readers who want the barelablink …commands used in the rest of the README. pip stays as the development path.README.md, Quick Start step 5 (MCP client config). The existing format and both targeted clients (Claude Code and Claude Desktop) are unchanged. The JSON now uses"command": "uvx"with anargsarray. A short note covers the pip /uv tool installform ("command": "lablink-mcp") and what to do when the client can't find the command.docs/ARCHITECTURE.md§9. It said uv "installs and manages Python itself." That isn't true unless you pin a version, so §9 now says what a user actually needs, and it matches the README.Quoted extras specs. The existing
pip install lablink-mcp[visa]lines are now quoted. Unquoted brackets fail withno matches foundunder zsh, the macOS default shell.Why the
--python 3.12pinI found this during verification. On this machine, before any uv-managed Python was installed,
uvx --from "lablink-mcp[visa]" lablink --helppicked Apple's/usr/bin/python3(3.9.6). It then failed with "current Python version (3.9.6) does not satisfy Python>=3.10" rather than downloading a compatible Python. With--python 3.12, uv downloaded CPython 3.12.12 and the command ran. A stock Mac is exactly the stranger this page is for, so every documented command carries the pin.How it was verified (uv 0.10.4)
lablink --help, from PyPI and the local checkout. Run throughuvx --python 3.12 --from "lablink-mcp[visa]" …. Both resolve.scan --write-configsfrom the local checkout. Runs and exits 0. No hardware was attached, so it reported "No devices found"; I couldn't test the case where an instrument actually answers.connectagainstlablink-sim.uvx … lablink connect sim_fgenwith the simulator itself started throughuvx. ReturnedConnected: LabLink,FG-100,SIMFG001,0.2.0.uvxwith the exact JSON args, over stdio. It listsvisa_*andserial_*tools.connect("sim_fgen")through the server also succeeded.uv tool install --python 3.12 "lablink-mcp[visa,serial]". Run into temporary directories; it installslablink,lablink-mcpandlablink-sim..venv/bin/python -m pytest -q: 393 passed before and after the change.Assumptions and caveats
lablink scan.uvx … lablink scanfails against PyPI today. It works against the code onmain. The README already documentsscanandvisa_read, which are unreleased too, so I followed that practice rather than adding a version note.[visa,serial], not just[visa].scancovers both VISA and serial ports. With only[visa]it skips the serial ports and says so.agent_development.mdupdate. There was no new general rule worth adding.Run: pip install lablink-mcp[serial]fromscananddiagnose) are still pip-style and unquoted. Tests assert on those exact strings, so I left them alone.🤖 Generated with Claude Code