{"id":43409686,"url":"https://github.com/matthewdeanmartin/totalhelp","last_synced_at":"2026-02-02T16:31:58.243Z","repository":{"id":317128171,"uuid":"1065910492","full_name":"matthewdeanmartin/totalhelp","owner":"matthewdeanmartin","description":"View help for all commands and subcommands for arbitrary commands or augment your app to do so. ","archived":false,"fork":false,"pushed_at":"2026-01-13T23:50:39.000Z","size":349,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-19T04:24:33.800Z","etag":null,"topics":["application-augmentation","automation","cli-tools","command-line","documentation","help","user-guide"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewdeanmartin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-28T17:13:42.000Z","updated_at":"2026-01-13T23:50:43.000Z","dependencies_parsed_at":"2025-09-29T03:25:43.575Z","dependency_job_id":"6b190ce7-f086-4f27-8615-52e116217fea","html_url":"https://github.com/matthewdeanmartin/totalhelp","commit_stats":null,"previous_names":["matthewdeanmartin/totalhelp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthewdeanmartin/totalhelp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Ftotalhelp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Ftotalhelp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Ftotalhelp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Ftotalhelp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewdeanmartin","download_url":"https://codeload.github.com/matthewdeanmartin/totalhelp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Ftotalhelp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29015148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T16:17:30.374Z","status":"ssl_error","status_checked_at":"2026-02-02T15:58:50.469Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-augmentation","automation","cli-tools","command-line","documentation","help","user-guide"],"created_at":"2026-02-02T16:31:56.616Z","updated_at":"2026-02-02T16:31:58.236Z","avatar_url":"https://github.com/matthewdeanmartin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## totalhelp\n\nAn implementation of the totalhelp PEP. \n\nThis module provides monolithic help output for Python argparse\napplications, including those with deeply nested subcommands.\n\n[![tests](https://github.com/matthewdeanmartin/totalhelp/actions/workflows/build.yml/badge.svg)\n](https://github.com/matthewdeanmartin/totalhelp/actions/workflows/tests.yml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/matthewdeanmartin/totalhelp/main.svg)\n](https://results.pre-commit.ci/latest/github/matthewdeanmartin/totalhelp/main)\n[![Downloads](https://img.shields.io/pypi/dm/totalhelp)](https://pypistats.org/packages/totalhelp)\n[![Python Version](https://img.shields.io/pypi/pyversions/totalhelp)\n![Release](https://img.shields.io/pypi/v/totalhelp)\n](https://pypi.org/project/totalhelp/)\n\n## Usage\n\nWorks best with python tools that use Argparse. \n\n```bash\ntotalhelp llm\ntotalhelp pipx\n```\n\nCaveats\n\n- Help text is not a standard parsable format, so discovery of command names may fail.\n- Can surface problems with applications that have slow startup.\n\n## Features\n\n- Monolithic Help: Generate a single help document\nfor your entire CLI, including all subcommands.\n- Multiple Formats: Output to plain text, Markdown, or self-contained\nHTML.\n- Drop-in Integration: Add a --totalhelp flag to your existing ArgumentParser with a single function call. No\nsubclassing required.\n- Optional rich support: If totalhelp[rich] is installed, get beautifully formatted terminal\noutput.\n- External Tool Inspection: A best-effort mode to generate help for third-party CLIs you don't\ncontrol.\n- InstallationInstall the base package: `pip install .`\n\nTo include optional rich formatting support:`pip install .[rich]`\n\n## Quick Start\n\nIntegrate it into your application in three steps.\n\n1. Build your parser as usual.\n\n```python\n# my_cli.py\nimport argparse\n\n\ndef create_parser():\n    parser = argparse.ArgumentParser(description=\"A complex tool.\")\n    subparsers = parser.add_subparsers(dest=\"command\", title=\"Available Commands\")\n\n    # Command 'remote'\n    remote_parser = subparsers.add_parser(\"remote\", help=\"Manage remotes\")\n    remote_subparsers = remote_parser.add_subparsers(dest=\"remote_command\")\n    remote_add_parser = remote_subparsers.add_parser(\"add\", help=\"Add a remote\")\n    remote_add_parser.add_argument(\"name\", help=\"Name of the remote\")\n    remote_add_parser.add_argument(\"url\", help=\"URL of the remote\")\n\n    # Command 'log'\n    log_parser = subparsers.add_parser(\"log\", help=\"Show commit logs\")\n    log_parser.add_argument(\"--oneline\", action=\"store_true\", help=\"Show logs in a compact format\")\n\n    return parser\n```\n\n2. Add the --totalhelp flag.\n\n```python\n# my_cli.py (continued)\nimport sys\nimport totalhelp\n\nparser = create_parser()\n\n# Add the flag. That's it.\ntotalhelp.add_totalhelp_flag(parser)\n```\n\n3. Check for the flag after parsing arguments.\n\n```python\n# my_cli.py (continued)\nif __name__ == \"__main__\":\n    args = parser.parse_args()\n\n    # If --totalhelp was passed, generate and print the doc, then exit.\n    if getattr(args, \"totalhelp\", False):\n        doc = totalhelp.full_help_from_parser(\n            parser,\n            fmt=getattr(args, \"format\", \"text\")\n        )\n        totalhelp.print_output(\n            doc,\n            fmt=getattr(args, \"format\", \"text\"),\n            open_browser=getattr(args, \"open\", False)\n        )\n        sys.exit(0)\n\n    # --- Your normal CLI logic goes here ---\n    print(f\"Normal execution with args: {args}\")\n```\n\nNow you can run your app to see the monolithic help:\n\n#### Get full help in the terminal\n\n```bash\npython my_cli.py --totalhelp\n```\n\n#### Generate a Markdown document\n\n```bash\npython my_cli.py --totalhelp --format md \u003e DOCS.md\n```\n\n#### Generate and open an HTML file in your browser\n\n```bash\npython my_cli.py --totalhelp --format html --open\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Ftotalhelp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewdeanmartin%2Ftotalhelp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Ftotalhelp/lists"}