1
1
Fork 1

Add, commit, and push automatically. A commit message is generated based on the diff if not provided. An automatic scheduling for commits and push is possible.

README.md

logo

GitEase

Version Python License Downloads Documentation Status

A tool to simplify git usage with sprinkles of AI magic.

Humans think in simpler terms than git operates in. This tool aims to bridge that gap by providing a simpler language to do common git tasks. Plus an LLM can write your commit messages for you.

You can load recent information with gs load, save current changes with gs save and share them with gs share.
Behind the scenes it's exactly what you would expect from git, but with a simpler interface.

Install

$ export OPENAI_API_KEY=...
$ pip install gitease
  • If OPENAI_API_KEY is not set, you will be prompted to enter a commit message manually.

Usage

Within a repo, run:

$ ge --help

Commands:
  --help:  Show this message and exit.        
    save <message>: Add and commit files to git. Massage is generated if not provided         
    share <message>: Share to remote - Add, commit and push changes to git. Massage is generated if not provided
    load :  Pull recent updates from git
    message: Generate commit message from diff using AI.
    undo: Undo last git action - only works using AI

Examples

$ ge save

> Entering new StuffDocumentsChain chain...


> Entering new LLMChain chain...
Prompt after formatting:
Write a concise summary of the following:
...
> Finished chain.

Your commit message is:
docs: Update documentation, configuration, and index files
This commit updates the documentation, configuration, and index files for the project, including Makefile,
conf.py, and index.rst. These changes provide information about the project, its features, and quickstart
instructions. Additionally, it updates the version of gitease from 0.0.5 to 0.0.6.

To confirm, press Enter.
Otherwise, write your own message:
Press CTRL+C to cancel
Response:
# Add and Commit all python files in src with the message "feat: Add new script"
ge save -a 'src/*.py' -m 'feat: Add new script'

# Add multiple files
ge save -a README.md -a gitease/cli.py

# Add and commits everything without prompting for validation
ge save -y

# Add the README.md file and commit with a generated message
ge share -a README.md -y

# Add and commit README.md file with "upload readme" message, merges to main, and deletes the original branch
ge share -a README.md -m "upload readme" --merge=main --delete

# Pull recent changes from git
ge load
$ ge undo

Welcome to GitEase
Last git action is: Update README and CLI files
A revert command is: git reset HEAD@{0}
Shell I run the command for you? [y/n]: 
Running: git reset HEAD@{0}
Unstaged changes after reset:
M       README.md
M       gitease/cli.py
File List Total items: 11
Name Last Commit Size Last Modified
docs feat: Add new script and update version 9 months ago
gitease add a delete option after merging for cleanup 9 months ago
tests chore: Refactor tests and add missing tests 10 months ago
.gitattributes
79 B
.gitignore ignore docs/_image 4.1 KiB 10 months ago
.readthedocs.yaml remove pdf from .readthedocs.yaml 708 B 10 months ago
LICENSE remove txt from LICENSE 1.0 KiB 10 months ago
README.md feat: Add new script and update version 3.4 KiB 9 months ago
poetry.lock move to poetry 139 KiB 9 months ago
pyproject.toml feat: Add new script and update version 1.6 KiB 9 months ago
requirements.txt
64 B

About

Add, commit, and push automatically. A commit message is generated based on the diff if not provided. An automatic scheduling for commits and push is possible.

Repository Size

Loading repo size...

Commits 116 commits

File Types