git2prompt


Namegit2prompt JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryTool for converting the contents of a git repository to a single markdown file that can be used in an LLM prompt.
upload_time2024-04-17 02:47:38
maintainerNone
docs_urlNone
authorSean Fitzgerald
requires_python<4.0,>=3.11
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # git2prompt

git2prompt is a command-line utility that converts a local Git repository into a formatted text representation.
This can be useful for sharing code snippets, project structures, or entire repositories in a plain text format,
without needing to archive or transmit the actual files.

## Installation
```shell
pip install git2prompt --user
```
## Usage

To use git2prompt, simply run the `git2prompt` script and provide the path to the Git repository you want to convert:

```shell
git2prompt /path/to/your/repo
```

This will output the formatted text representation of the repository to the console.

## Output Format

The output follows this structure:
The text represents a Git repository with the following format:

filename: The name of the file, within a repository format: The format of the file contents <multiple lines of content for the file>
The repository ends with --END--

Any text after --END-- are instructions related to the repository.


Copy code

Each file in the repository is represented as a block, with the filename, file format, and contents included. The supported file formats are:

- Text files (`.txt`)
- Markdown files (`.md`)
- HTML files (`.html`)
- Python scripts (`.py`)

After all file blocks, the output ends with `--END--`. Any text after this line is considered instructions related to the repository.

## Ignored Files

git2prompt respects `.gitignore` files in the repository. Any files or directories listed in these ignore files will be excluded from the output.

## Example

Running `python -m git2prompt /path/to/your/repo` with the provided example repository will output:
<contents of the example output> ```
# License
This project is licensed under the MIT License.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "git2prompt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Sean Fitzgerald",
    "author_email": "sean@fitzgeralds.me",
    "download_url": "https://files.pythonhosted.org/packages/1c/11/096083c6896e28def50ab3e9a7b8d2b5e01a3c69b8164f37603cf38ef2fe/git2prompt-0.1.0.tar.gz",
    "platform": null,
    "description": "# git2prompt\n\ngit2prompt is a command-line utility that converts a local Git repository into a formatted text representation.\nThis can be useful for sharing code snippets, project structures, or entire repositories in a plain text format,\nwithout needing to archive or transmit the actual files.\n\n## Installation\n```shell\npip install git2prompt --user\n```\n## Usage\n\nTo use git2prompt, simply run the `git2prompt` script and provide the path to the Git repository you want to convert:\n\n```shell\ngit2prompt /path/to/your/repo\n```\n\nThis will output the formatted text representation of the repository to the console.\n\n## Output Format\n\nThe output follows this structure:\nThe text represents a Git repository with the following format:\n\nfilename: The name of the file, within a repository format: The format of the file contents <multiple lines of content for the file>\nThe repository ends with --END--\n\nAny text after --END-- are instructions related to the repository.\n\n\nCopy code\n\nEach file in the repository is represented as a block, with the filename, file format, and contents included. The supported file formats are:\n\n- Text files (`.txt`)\n- Markdown files (`.md`)\n- HTML files (`.html`)\n- Python scripts (`.py`)\n\nAfter all file blocks, the output ends with `--END--`. Any text after this line is considered instructions related to the repository.\n\n## Ignored Files\n\ngit2prompt respects `.gitignore` files in the repository. Any files or directories listed in these ignore files will be excluded from the output.\n\n## Example\n\nRunning `python -m git2prompt /path/to/your/repo` with the provided example repository will output:\n<contents of the example output> ```\n# License\nThis project is licensed under the MIT License.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tool for converting the contents of a git repository to a single markdown file that can be used in an LLM prompt.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb937ded1d0d4a30f682309ae008c2113d47c3fdeeb565d4bc6fc1fdc4aab0ce",
                "md5": "99df8c4dccf27522fbf08a51cf671ab0",
                "sha256": "28d6058997a9657adc5e297238c01d5a2d02c1788be08d58e5ce20634ad26cd4"
            },
            "downloads": -1,
            "filename": "git2prompt-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "99df8c4dccf27522fbf08a51cf671ab0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 4227,
            "upload_time": "2024-04-17T02:47:37",
            "upload_time_iso_8601": "2024-04-17T02:47:37.388914Z",
            "url": "https://files.pythonhosted.org/packages/eb/93/7ded1d0d4a30f682309ae008c2113d47c3fdeeb565d4bc6fc1fdc4aab0ce/git2prompt-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c11096083c6896e28def50ab3e9a7b8d2b5e01a3c69b8164f37603cf38ef2fe",
                "md5": "7058afd9ecc1d544abc7d177ad1861c8",
                "sha256": "61c1898870284e9e632b20c33429b094ff9ba9db02826059d4f89d1352d30438"
            },
            "downloads": -1,
            "filename": "git2prompt-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7058afd9ecc1d544abc7d177ad1861c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 3077,
            "upload_time": "2024-04-17T02:47:38",
            "upload_time_iso_8601": "2024-04-17T02:47:38.318674Z",
            "url": "https://files.pythonhosted.org/packages/1c/11/096083c6896e28def50ab3e9a7b8d2b5e01a3c69b8164f37603cf38ef2fe/git2prompt-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 02:47:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "git2prompt"
}
        
Elapsed time: 1.78961s