{"id":24360195,"url":"https://github.com/will282/repo-to-prompt","last_synced_at":"2026-04-25T01:38:54.133Z","repository":{"id":270498831,"uuid":"910560650","full_name":"Will282/repo-to-prompt","owner":"Will282","description":"A Python CLI tool that converts local or remote Git repositories into token-limited structured files for use with generative AI models.","archived":false,"fork":false,"pushed_at":"2025-01-04T16:31:19.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T21:04:47.020Z","etag":null,"topics":["chatgpt","claude","cli","genai","git","python"],"latest_commit_sha":null,"homepage":"","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/Will282.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":"2024-12-31T16:27:46.000Z","updated_at":"2025-01-04T16:31:23.000Z","dependencies_parsed_at":"2024-12-31T17:38:40.458Z","dependency_job_id":null,"html_url":"https://github.com/Will282/repo-to-prompt","commit_stats":null,"previous_names":["will282/repo-to-prompt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Will282%2Frepo-to-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Will282%2Frepo-to-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Will282%2Frepo-to-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Will282%2Frepo-to-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Will282","download_url":"https://codeload.github.com/Will282/repo-to-prompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243181905,"owners_count":20249557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chatgpt","claude","cli","genai","git","python"],"created_at":"2025-01-18T21:03:23.436Z","updated_at":"2025-12-27T04:11:31.499Z","avatar_url":"https://github.com/Will282.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repo to Prompt (r2p)\n\n## Overview\n\n`Repo to Prompt` (r2p) is a Python CLI tool that converts a local or remote Git repository into a structured set of files for use with LLMs like ChatGPT or Claude. It helps developers generate code reviews, write tests, or optimize repositories by providing a token-limited, chunked representation of the repository structure and content.\n\n## Features\n\n- **Supports Local and Remote Git Repositories**: Automatically clones and processes repositories.\n- **Token-Aware Splitting**: Outputs files in chunks, ensuring no chunk exceeds the specified token limit.\n- **Customizable**: Configure output directories and token limits with CLI options.\n- **Built with Modern Python**: Developed using `click`, `pydantic`, and `gitpython`.\n\n## Installation\n\n### Using [Poetry](https://python-poetry.org/)\n```bash\npoetry install\n```\n\n## Usage\n\n### CLI Command: `r2p`\n\n```bash\nr2p [OPTIONS] REPO\n```\n\n#### Arguments:\n- `REPO`: Path to a local repository or URL of a remote Git repository.\n\n#### Options:\n- `--output-dir \u003cpath\u003e`: Directory to store the output files (default: `output`).\n- `--max-tokens \u003cint\u003e`: Maximum tokens per output file (default: 2,000,000).\n\n#### Examples:\n1. **Process a Local Repository**:\n   ```bash\n   r2p ./my-local-repo --output-dir ./output --max-tokens 100000\n   ```\n\n2. **Process a Remote Repository**:\n   ```bash\n   r2p https://github.com/Will282/ec2-dev-machine --output-dir ./output\n   ```\n\n## Development\n\n### Running Tests\n```bash\npoetry run pytest\n```\n\n### Pre-Commit Hooks\nEnsure code quality with pre-commit:\n```bash\npre-commit run --all-files\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Author\n\nCreated by **Will Parr**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwill282%2Frepo-to-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwill282%2Frepo-to-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwill282%2Frepo-to-prompt/lists"}