Metadata-Version: 2.3
Name: select-git-author
Version: 0.2.3
Summary: Interactively select the author for the next git commit
Keywords: cli,git
Author: Markus Grotz
Author-email: Markus Grotz <grotz@uw.edu>
License: MIT License
         
         Copyright (c) 2022 Markus Grotz
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: click-prompt>=0.6.2
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# select-git-author

A command-line tool to **interactively select or add a Git author** before
committing. Useful when working with multiple identities (e.g., personal, work,
open-source).

## ✨ Features

- Choose an author from a predefined list (`~/.git_authors`)
- Add and save a new author interactively
- Automatically sets `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`
- Optionally sets `GIT_COMMITTER_NAME` and `GIT_COMMITTER_EMAIL`

## 📦 Installation

```bash
pip install select-git-author
```


## 🚀 Usage

```bash
commit [GIT_COMMIT_ARGS...]
```

### Options

- `--author` – Specify an author from the list. If not provided, will prompt.
- `--set-commitor / --no-commitor` – Also set the Git committer fields (default: true)

### Example

```bash
commit -m "Update feature"
```

If no `--author` is given, you'll see an interactive menu like:

```
? Select Git author:
❯ Alice Dev <alice@example.com>
  Bob QA <bob@example.org>
  Add new author
```

If you choose "Add new author", it will prompt for name and email, and optionally save it.

## 🧠 Author Configuration

To predefine available authors, create a file at:

```
~/.git_authors
```

Format (one per line):

```
Alice Dev <alice@example.com>
Bob QA <bob@example.org>
```

## 📝 License

MIT
