Metadata-Version: 2.4
Name: jira-git-helper
Version: 0.1.0
Summary: JIRA ticket context manager for git workflows
Project-URL: Homepage, https://github.com/YOUR_USERNAME/jira-git-helper
Project-URL: Bug Tracker, https://github.com/YOUR_USERNAME/jira-git-helper/issues
Author: Ross Cousens
License: MIT
License-File: LICENSE
Keywords: cli,developer-tools,git,jira,workflow
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: click>=8.3.1
Requires-Dist: jira>=3.10.5
Requires-Dist: requests>=2.32.0
Requires-Dist: textual>=8.0.0
Description-Content-Type: text/markdown

# jira-git-helper

A terminal-based JIRA ticket context manager for git workflows, invoked as `jg`.

Keeps the current JIRA ticket in your shell environment so that branch names,
commit messages, and PR lookups are automatically prefixed — without you having
to type the ticket key every time.

## Installation

```sh
uv tool install jira-git-helper
```

Or with pipx:

```sh
pipx install jira-git-helper
```

## Configuration

Run these once after installation:

```sh
jg config set server https://yourcompany.atlassian.net
jg config set email  you@yourcompany.com
jg config set token  <your-jira-api-token>
```

Optionally set a default JQL filter for the ticket picker (defaults to your assigned tickets):

```sh
jg config set jql "project = MYPROJECT AND assignee = currentUser() ORDER BY updated DESC"
```

Generate a JIRA API token at: https://id.atlassian.com/manage-profile/security/api-tokens

### Shell hook

The hook lets `jg set` / `jg clear` update `SJ_TICKET` in your current shell,
so each terminal can track a different ticket independently.

**Fish:**
```fish
# Add to ~/.config/fish/config.fish
eval (jg hook)
```

**Bash / Zsh:**
```sh
# Add to ~/.bashrc or ~/.zshrc
eval "$(jg hook --shell bash)"   # or --shell zsh
```

### Tide prompt (fish)

```sh
jg setup
```

Then follow the printed instructions to add `jg` to your Tide prompt items.

## Commands

| Command | Description |
|---|---|
| `jg` | Show the current ticket |
| `jg set [TICKET]` | Set ticket (interactive picker if no argument) |
| `jg clear` | Clear the current ticket |
| `jg info [TICKET]` | Show ticket details |
| `jg open [TICKET]` | Open ticket in browser |
| `jg branch [name]` | Switch to a ticket branch, or create one |
| `jg add` | Interactive staging UI with inline commit |
| `jg commit <message>` | Commit with ticket prefix |
| `jg push` | Push branch and open linked PR |
| `jg diff [TICKET]` | Diff an open/draft PR with `gh` |
| `jg prs [TICKET]` | List all linked PRs |
| `jg config get <key>` | Get a config value |
| `jg config set <key> <value>` | Set a config value |
| `jg config list` | List all config values |
| `jg hook [--shell fish\|bash\|zsh]` | Print shell hook |
| `jg setup` | Configure Tide prompt integration |

## Requirements

- Python 3.10+
- `gh` CLI (only required for `jg diff`) — https://cli.github.com

## License

MIT
