Modernize CLI: uv, JSON output, ruff, org commands, and more#1
Open
thereisnotime wants to merge 12 commits intonu11pointer:mainfrom
Open
Modernize CLI: uv, JSON output, ruff, org commands, and more#1thereisnotime wants to merge 12 commits intonu11pointer:mainfrom
thereisnotime wants to merge 12 commits intonu11pointer:mainfrom
Conversation
- Migrate from pip install scripts to uv with pyproject.toml - Add --json / -j flag for machine-readable output on all commands - Fix os.get_terminal_size() crash when running without a TTY - Suppress mdv terminal width warning by setting COLUMNS before import - Add ruff for linting and formatting, configure in pyproject.toml - Add GitHub Actions workflow for lint checks on push/PR - Add justfile with install, lint, test, run recipes - Rewrite README with proper install/usage docs - Remove install.sh and install.ps1
Table of contents, command reference table, grouped modules by category, quick start section, just recipes in dev section.
Support --username/-u, --api-key/-k, and --env-file as alternatives to environment variables and .env. CLI flags take priority over env.
Collapsible install methods and example outputs, clickable TOC with direct links to each command, command reference table with anchor links, credentials as a clean priority table.
Most people want to just type 'hackerone' directly, not prefix everything with 'uv run'. Moved uv sync to alternative methods.
- mdv is now an optional dependency (install with .[markdown]) - Lazy-import mdv only when rendering markdown, no more import-time hangs - Add --verbose / -v flag for progress logs (stderr) - Defer .env loading to main() so env var overrides work properly - Treat empty credential strings as missing - help and scope no longer require credentials - Add update/uninstall instructions to README - Bump version to 1.0.2
Support the "other side" of HackerOne - program managers can now list reports submitted to their programs, view report details, and check org info. These use the /v1/reports and /v1/me/organizations endpoints and require an organization-level API token. Help output now separates hacker and program management commands.
- Lint job: ruff check + format - Test job: matrix across Linux/macOS/Windows and Python 3.10/3.12/3.13 - Tests: help, JSON validation, error handling, no-creds behavior - Add CI badge to README
New commands: org-members, org-groups, org-invitations, org-update-report, org-activities, org-metrics, org-scopes, org-invite-hacker, org-bounty, org-swag. Full coverage of the HackerOne program management API.
Tests for: help output, JSON validity, all error messages, argument validation for every org command, scope without creds, verbose flag. 30+ test steps across 9 OS/Python combinations.
Author
|
@nu11pointer PTAL |
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
Major modernization of the CLI tool — better tooling, new features, and program management support.
pyproject.toml, replacinginstall.sh/install.ps1--json/-j) on all commands for scripting and automationos.get_terminal_size()no longer blows up without a terminalpyproject.toml--username/-u,--api-key/-k,--env-file--verbose/-v) — shows progress during API callsorg,org-reports,org-reportfor the manager side of HackerOne.gitignoreadded (was missing)Test plan
just installsets up the projectjust testpasses all smoke testsjust checkpasses ruff lint and format checkshackerone helpshows hacker and program management commandshackerone programs 5 --jsonreturns valid JSONhackerone balance -vshows auth and progress infohackerone helpworks without credentialsorg-reports/org-reportwork with an organization API token