ghpr-py


Nameghpr-py JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryGitHub PR/Issue management: clone, sync, and iterate on PR/issue descriptions and comments locally, with gist mirroring
upload_time2025-11-03 22:25:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords github pr issue gist cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ghpr

GitHub PR/Issue management tool for local iteration with gist mirroring.

## Features

- **Clone** PR/Issues locally with comments
- **Sync** bidirectionally between GitHub and local files
- **Diff** local changes vs remote
- **Push** updates back to GitHub
- **Gist mirroring** for version control and sharing
- **Comment management** - edit and sync PR/issue comments

## Installation

```bash
pip install ghpr-py
```

## Usage

### Basic Workflow

```bash
# Clone a PR or issue
ghpr clone https://github.com/owner/repo/pull/123
# or
ghpr clone owner/repo#123

# Show differences
ghpr diff

# Push changes
ghpr push
```

### Adding Comments

To add a new comment, create a file starting with `new` and ending in `.md`:

```bash
# Create a draft comment
echo "My comment text" > new.md

# Commit it
git add new.md
git commit -m "Draft comment"

# Push to GitHub (posts the comment and renames to z{id}-{author}.md)
ghpr push
```

The `push` command will:
1. Post `new*.md` files as comments to GitHub
2. Create a commit renaming them to `z{comment_id}-{author}.md`
3. Sync to the gist mirror

### Uploading Images

```bash
# Upload image(s) to the gist and get markdown URLs
ghpr upload screenshot.png
# Output: ![screenshot.png](https://gist.githubusercontent.com/...)
```

## Directory Structure

Cloned PRs and issues are stored as:
```
gh/123/
  owner-repo#123.md       # Main description
  z3404494861-user.md     # Comments (ID-author format)
  z3407382913-user.md
```

Since PRs are issues in GitHub's API, we use the same `gh/{number}/` pattern for both.

## Shell Integration (Optional)

For power users who want shorter aliases, `ghpr` provides shell integration:

### Bash/Zsh

Add to your `~/.bashrc` or `~/.zshrc`:

```bash
eval "$(ghpr shell-integration bash)"
```

### Fish

Add to your `~/.config/fish/config.fish`:

```fish
ghpr shell-integration fish | source
```

### Available Aliases

After enabling shell integration, you get convenient shortcuts:

```bash
ghpri      # ghpr init
ghpro      # ghpr open
ghprog     # ghpr open -g
ghprcr     # ghpr create
ghprsh     # ghpr show
ghprc      # ghpr clone
ghprp      # ghpr push
ghprl      # ghpr pull
ghprd      # ghpr diff
# ... and more
```

See the full list with:
```bash
ghpr shell-integration bash
```

## Development

Repository: [runsascoded/ghpr](https://github.com/runsascoded/ghpr)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ghpr-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "github, pr, issue, gist, cli",
    "author": null,
    "author_email": "Ryan Williams <ryan@runsascoded.com>",
    "download_url": "https://files.pythonhosted.org/packages/dd/b2/d44122826a9593e69e9d151bd541d189a7cf25a5bede0c4f5390530fbb32/ghpr_py-0.1.1.tar.gz",
    "platform": null,
    "description": "# ghpr\n\nGitHub PR/Issue management tool for local iteration with gist mirroring.\n\n## Features\n\n- **Clone** PR/Issues locally with comments\n- **Sync** bidirectionally between GitHub and local files\n- **Diff** local changes vs remote\n- **Push** updates back to GitHub\n- **Gist mirroring** for version control and sharing\n- **Comment management** - edit and sync PR/issue comments\n\n## Installation\n\n```bash\npip install ghpr-py\n```\n\n## Usage\n\n### Basic Workflow\n\n```bash\n# Clone a PR or issue\nghpr clone https://github.com/owner/repo/pull/123\n# or\nghpr clone owner/repo#123\n\n# Show differences\nghpr diff\n\n# Push changes\nghpr push\n```\n\n### Adding Comments\n\nTo add a new comment, create a file starting with `new` and ending in `.md`:\n\n```bash\n# Create a draft comment\necho \"My comment text\" > new.md\n\n# Commit it\ngit add new.md\ngit commit -m \"Draft comment\"\n\n# Push to GitHub (posts the comment and renames to z{id}-{author}.md)\nghpr push\n```\n\nThe `push` command will:\n1. Post `new*.md` files as comments to GitHub\n2. Create a commit renaming them to `z{comment_id}-{author}.md`\n3. Sync to the gist mirror\n\n### Uploading Images\n\n```bash\n# Upload image(s) to the gist and get markdown URLs\nghpr upload screenshot.png\n# Output: ![screenshot.png](https://gist.githubusercontent.com/...)\n```\n\n## Directory Structure\n\nCloned PRs and issues are stored as:\n```\ngh/123/\n  owner-repo#123.md       # Main description\n  z3404494861-user.md     # Comments (ID-author format)\n  z3407382913-user.md\n```\n\nSince PRs are issues in GitHub's API, we use the same `gh/{number}/` pattern for both.\n\n## Shell Integration (Optional)\n\nFor power users who want shorter aliases, `ghpr` provides shell integration:\n\n### Bash/Zsh\n\nAdd to your `~/.bashrc` or `~/.zshrc`:\n\n```bash\neval \"$(ghpr shell-integration bash)\"\n```\n\n### Fish\n\nAdd to your `~/.config/fish/config.fish`:\n\n```fish\nghpr shell-integration fish | source\n```\n\n### Available Aliases\n\nAfter enabling shell integration, you get convenient shortcuts:\n\n```bash\nghpri      # ghpr init\nghpro      # ghpr open\nghprog     # ghpr open -g\nghprcr     # ghpr create\nghprsh     # ghpr show\nghprc      # ghpr clone\nghprp      # ghpr push\nghprl      # ghpr pull\nghprd      # ghpr diff\n# ... and more\n```\n\nSee the full list with:\n```bash\nghpr shell-integration bash\n```\n\n## Development\n\nRepository: [runsascoded/ghpr](https://github.com/runsascoded/ghpr)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "GitHub PR/Issue management: clone, sync, and iterate on PR/issue descriptions and comments locally, with gist mirroring",
    "version": "0.1.1",
    "project_urls": {
        "Issues": "https://github.com/runsascoded/ghpr/issues",
        "Repository": "https://github.com/runsascoded/ghpr"
    },
    "split_keywords": [
        "github",
        " pr",
        " issue",
        " gist",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ea0db145cacf4d53242d7df37b1d3f117c0d05c4bc97afc3eb20149153559bbf",
                "md5": "5c6094bd8f062b5e0189bd1bab72e8aa",
                "sha256": "dfedc4700b05cfd94d105e3327883994d28b08dd7676e3a14279a51e0b83cc89"
            },
            "downloads": -1,
            "filename": "ghpr_py-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c6094bd8f062b5e0189bd1bab72e8aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 45059,
            "upload_time": "2025-11-03T22:25:52",
            "upload_time_iso_8601": "2025-11-03T22:25:52.251520Z",
            "url": "https://files.pythonhosted.org/packages/ea/0d/b145cacf4d53242d7df37b1d3f117c0d05c4bc97afc3eb20149153559bbf/ghpr_py-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ddb2d44122826a9593e69e9d151bd541d189a7cf25a5bede0c4f5390530fbb32",
                "md5": "b22995aefbf411403b59f8c20e61adf3",
                "sha256": "7adf5d92d78857a7162f56e89a7b77686f090cb99dbb564090ac8afadd0b7bec"
            },
            "downloads": -1,
            "filename": "ghpr_py-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b22995aefbf411403b59f8c20e61adf3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 43615,
            "upload_time": "2025-11-03T22:25:53",
            "upload_time_iso_8601": "2025-11-03T22:25:53.347709Z",
            "url": "https://files.pythonhosted.org/packages/dd/b2/d44122826a9593e69e9d151bd541d189a7cf25a5bede0c4f5390530fbb32/ghpr_py-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-03 22:25:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "runsascoded",
    "github_project": "ghpr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ghpr-py"
}
        
Elapsed time: 1.83647s