Skip to content

Comments

Add uv package manager support as alternative to system Python#1

Open
drawblank wants to merge 6 commits intoBrownFineSecurity:masterfrom
drawblank:master
Open

Add uv package manager support as alternative to system Python#1
drawblank wants to merge 6 commits intoBrownFineSecurity:masterfrom
drawblank:master

Conversation

@drawblank
Copy link

Summary
This pull request adds initial uv support 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 the uv hatchling build system to quickly call and prototype each script. No action is needed for existing users who use the PATH method.

Changes:

  1. Add pyproject.toml with uv/hatchling configuration and entry points
  2. Update README with uv installation instructions
  3. Modify tool skills to use uv run entry points
  4. Update .gitignore to exclude .serena/ directory
  5. Relax Python requirement to 3.11+

New 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, uv is 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

  1. I used and supervised Claude itself to make these changes. Some errors were fixed manually. Please feel free to review or otherwise modify these changes to your liking.
  2. There are other ways of integrating uv, I chose hatchling as this is a good use case for fast prototyping of commands.
  3. There are references to efsprogs and 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 though uv is 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

  • verify backwards compatibility
  • test skills and uv run on Linux
  • test skills and uv run on MacOS, efsprogs is defintely broken
  • test skills and uv run on Windows

drawblank and others added 6 commits December 8, 2025 13:25
- 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>
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