Add uv package manager support as alternative to system Python#1
Open
drawblank wants to merge 6 commits intoBrownFineSecurity:masterfrom
Open
Add uv package manager support as alternative to system Python#1drawblank wants to merge 6 commits intoBrownFineSecurity:masterfrom
drawblank wants to merge 6 commits intoBrownFineSecurity:masterfrom
Conversation
- Initialize project with pyproject.toml using hatchling build backend - Add console script entry points for all tools (ffind, iotnet, onvifscan, wsdiscovery) - Configure package location in tools/iothackbot for proper installation - Set Python requirement to >=3.13 - Add project metadata, dependencies, and repository URLs - Update .gitignore for uv-specific files (.python-version, uv.lock) This enables modern package management with `uv run <tool>` commands while maintaining backward compatibility with bin/ directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add comprehensive uv installation instructions as recommended option - Document pip installation as alternative with venv setup - Add system dependency installation for Arch, Ubuntu/Debian, and macOS - Update setup instructions to use uv run for tools via entry points - Add note about three ways to run tools (uv run, activated venv, or PATH) - Update Quick Start Examples with uv run usage examples - Reorganize Prerequisites section for better clarity This provides users with modern Python package management options while maintaining backward compatibility with traditional methods. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update all Python helper script invocations to use 'uv run python' - Add notes about alternative usage with activated venv or system Python - Update all example commands throughout both skills - Ensure all examples show recommended uv run usage first - Add inline comments for alternative execution methods - Update Device Enumeration Examples to use uv run - Update Monitor Mode examples (picocom) to use uv run - Update Session Logging examples to use uv run This ensures Claude Code uses the proper virtual environment when running the serial_helper.py and telnet_helper.py scripts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update all four Claude Code tool skills to use the new uv run entry points instead of calling tools from the bin directory: - ffind: Update all commands to use 'uv run ffind' - wsdiscovery: Update all commands to use 'uv run wsdiscovery' - iotnet: Update all commands to use 'uv run iotnet' - onvifscan: Update all commands to use 'uv run onvifscan' Changes include: - Updated execution instructions in each skill - Updated all example commands with 'uv run' prefix - Added notes about alternative usage (activated venv or PATH) - Maintained consistency across all four skills - Preserved sudo usage where required (ffind extraction, iotnet live capture) This ensures Claude Code uses the proper entry points from pyproject.toml when invoking these tools, with the correct virtual environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.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.
Summary
This pull request adds initial
uvsupport as an alternative Python package management solution, rather than relying on system Python as the only option. We leave the PATH option as a backwards compatible option. We use theuvhatchlingbuild system to quickly call and prototype each script. No action is needed for existing users who use thePATHmethod.Changes:
pyproject.tomlwith uv/hatchling configuration and entry pointsuv runentry points.serena/directoryNew usage
Traditional (still works):
export PATH="$PATH:$(cwd)/bin"
ffind --help
New with uv:
uv sync
uv run ffind --help
Benefits
As stated above, this is meant to be an alternative option to using the system python and pip installations, which will likely make this project a lot more cross-platform as some operating systems do not support system-level installations of Python packages. In addition,
uvis faster, safer and completely isolates Python from system-level.Backward Compatibility
Fully backwards compatible - existing installations using system Python will continue to work unchanged.
Caveats
uv, I chosehatchlingas this is a good use case for fast prototyping of commands.efsprogsand other tools that are not especially cross-platform. A follow-up issue will track that if you do want to make this cross platform. Even thoughuvis cross platform, tools like that aren't. Will need to see if there is a way to wrap these commands in e.g. WSL or Docker for proper usage.Possible test plan
uv runon Linuxuv runon MacOS, efsprogs is defintely brokenuv runon Windows