Skip to content

Package as pip-installable distribution (agentic-bug-hunter) - #148

Merged
shuvonsec merged 1 commit into
mainfrom
packaging/pip-distribution
Sep 22, 2026
Merged

shuvonsec merged 1 commit into
mainfrom
packaging/pip-distribution

Conversation

@shuvonsec

Copy link
Copy Markdown
Member

What

Makes the tool installable with pip install agentic-bug-hunter, giving bughunter and bughunter-agent console scripts — in addition to the existing git clone + ./install.sh workflow, which still works.

Why

Enables PyPI distribution (and download tracking via pepy/pypistats).

Changes

  • bughunter/ package: relocated the runtime (agent, brain, engine, serve, tools/, agents/, memory/, mcp/, wordlists/). Console-script launchers in __main__.py put the package dir on sys.path so the existing flat imports (from brain import, from tools...) keep resolving.
  • Plugin assets untouched at root: commands/, skills/, rules/, hooks/ stay where the Claude Code / OpenCode plugin manifest expects them. The manifest's agents now points at the packaged copy (./bughunter/agents), shared by both the CLI and the plugin.
  • Read-only-install safe: writable output (recon/, findings/, reports/, targets/) now honors BUGHUNTER_HOME, falling back to the install dir when writable (a clone) else ~/.bughunter. Clone behavior is unchanged.
  • Packaging metadata: pyproject.toml + MANIFEST.in; all data ships in the wheel.
  • Layout follow-through: install.sh engine path, pytest pythonpath, and test path anchors updated.

Verification

  • Wheel + sdist build; twine check passes both.
  • Clean-venv install from the wheel: bughunter --help, bughunter status, bughunter-agent --help all run; no writes leak into site-packages.
  • Full test suite: 767 passed.

Not included

  • PyPI upload itself (needs a token; done separately).
  • README file-tree / command examples still show the old root layout — cosmetic, can follow up.

Make the tool installable with `pip install agentic-bug-hunter`, exposing
`bughunter` and `bughunter-agent` console scripts, alongside the existing
clone + install.sh workflow.

- Relocate the runtime into a `bughunter/` package: agent, brain, engine,
  serve, tools/, agents/, memory/, mcp/, wordlists/. Launchers in __main__
  put the package dir on sys.path so the existing flat imports keep working.
- Keep Claude Code / OpenCode plugin assets (commands/, skills/, rules/,
  hooks/) at repo root; point the plugin manifest's `agents` at the packaged
  copy so both the CLI and the plugin resolve it.
- Redirect writable output (recon/findings/reports/targets) to a user data
  home via BUGHUNTER_HOME, falling back to the install dir when writable
  (clone) else ~/.bughunter, so read-only pip installs work unchanged.
- Add pyproject.toml, MANIFEST.in; ship package data in the wheel.
- Update install.sh engine path, pytest pythonpath, and test path anchors
  for the new layout. Full suite: 767 passed.
@shuvonsec
shuvonsec merged commit 28da103 into main Sep 22, 2026
3 checks passed
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