{"id":38416744,"url":"https://github.com/rezabrizi/docs2prompt","last_synced_at":"2026-01-17T04:09:39.796Z","repository":{"id":282833100,"uuid":"949575977","full_name":"rezabrizi/docs2prompt","owner":"rezabrizi","description":"Automatic documentation retrieval into one file for use with LLMs","archived":false,"fork":false,"pushed_at":"2025-03-17T13:55:56.000Z","size":24675,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-23T13:50:33.623Z","etag":null,"topics":["documentation","llms"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rezabrizi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-16T18:56:18.000Z","updated_at":"2025-06-24T21:15:30.000Z","dependencies_parsed_at":"2025-06-07T14:45:56.015Z","dependency_job_id":null,"html_url":"https://github.com/rezabrizi/docs2prompt","commit_stats":null,"previous_names":["rezabrizi/docs2prompt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rezabrizi/docs2prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezabrizi%2Fdocs2prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezabrizi%2Fdocs2prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezabrizi%2Fdocs2prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezabrizi%2Fdocs2prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezabrizi","download_url":"https://codeload.github.com/rezabrizi/docs2prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezabrizi%2Fdocs2prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28494395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T02:39:23.645Z","status":"ssl_error","status_checked_at":"2026-01-17T02:34:19.649Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["documentation","llms"],"created_at":"2026-01-17T04:09:39.710Z","updated_at":"2026-01-17T04:09:39.771Z","avatar_url":"https://github.com/rezabrizi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docs2prompt 📜→🤖\n[![PyPI](https://img.shields.io/badge/pypi-v0.1.4-orange.svg)](https://pypi.org/project/docs2prompt/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/rezabrizi/docs2prompt/blob/main/LICENSE)\n\nFetch open-sourced documentation from Github or closed-sourced documentation from publisher website to put into a LLM-friendly format in one file for use with LLMs.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/rezabrizi/docs2prompt/assets/output_850.gif\" alt=\"Demo\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Features\n\n- **GitHub Integration:** Extracts documentation files (e.g., README.md, docs.md, files within a `docs/` folder) from a GitHub repository using heuristics.\n- **External Documentation Heuristic:** Optionally, fetches and converts external documentation links found in the root README.\n- **URL Crawling:** Supports crawling a top-level documentation URL for content.\n- **Customizable Output:** Serialize documentation in various formats (default plain text, XML, or Markdown). \n- **CLI and API:** Use as an importable Python package or as a standalone command-line tool.\n\n## Installation\n\nYou can install **docs2prompt** directly from PyPI:\n\n    pip install docs2prompt\n\nAlternatively, clone the repository and install locally:\n\n    git clone https://github.com/rezabrizi/docs2prompt.git\n    cd docs2prompt\n    pip install .\n\n## Usage\n\n### Command-Line Interface\n\nAfter installing, you can run the tool via the command line.\n\n**Example using a GitHub repository:**\n\n    docs2prompt --repo owner/repo --token YOUR_GITHUB_TOKEN --format markdown --full_repo --external_documentation --output docs.txt\n\n- `--repo`: GitHub repository in the format `owner/repo` (required if not using `--url`).\n- `--token`: Your GitHub authentication token (only used if `--repo` is provided) - HIGHLY RECOMMENDED as without a token you can make at most 60 requests  per hour which easily gets reached with 1 query. Refer to [How to create a Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)\n- `--repo`: Documentation page url (required if not using `--repo`).\n- `--format`: Output format (`default`, `xml`, or `markdown`).\n- `--output`: File name to write the serialized documentation.\n- `--full_repo`: Performs a full recursive search of the repository. Having this as True will cause the query to take longer to finish.\n- `--external_documentation`: Enables external documentation heuristic to fetch linked external docs from the root README. Having this as True will cause the query to take longer to finish.\n\n**Example using a documentation URL:**\n\n    docs2prompt --url https://example.com/documentation --format xml --output output.xml\n\n\u003e **Note:** You must provide exactly one of `--repo` or `--url`.\n\n### As a Python Package\n\nYou can also import **docs2prompt** as a module in your own Python code:\n```Python\nfrom docs2prompt import get_github_documentation\n\n\nrepo_id = \"owner/repo\"\ntoken = \"YOUR_GITHUB_TOKEN\" # Although optional, Highly recommended\ncontent = get_github_documentation(repo_id, token, full_repo=False, external_documentation=False, output_format=\"XML\")\nprint(output_content)\n```\n\n### Example Usage\n![Example Usage](https://i.imgur.com/jKZIjQO.png)\n\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute:\n\n1. Fork the repository.\n2. Create a feature branch (`git checkout -b feature/my-feature`).\n3. Commit your changes (`git commit -am 'Add some feature'`).\n4. Push to the branch (`git push origin feature/my-feature`).\n5. Create a new Pull Request.\n\nPlease ensure that your changes include appropriate tests and documentation.\n\n## License\n\nThis project is licensed under the Apache License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any questions or suggestions, please open an issue on the [GitHub repository](https://github.com/rezabrizi/docs2prompt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezabrizi%2Fdocs2prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezabrizi%2Fdocs2prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezabrizi%2Fdocs2prompt/lists"}