Skip to main content

Gitfold

One command to stage, commit, merge, push, and open a PR — powered by AI.

Gitfold automates your entire Git workflow with a single terminal command. It stages your files, uses AI to write a meaningful commit message based on your actual code changes, syncs with your development branch, pushes to GitHub, and creates a pull request — all in one go.


Features

  • One command — just type done and Gitfold handles the rest
  • AI-powered commit messages — understands your diff and writes proper conventional commits
  • AI-powered PR descriptions — generates a clear summary and bullet-point changelog
  • Intelligent branch detection — auto-detects your main, dev, and current branches
  • Real-time terminal output — watch every step happen live
  • Manual mode — use done --manual to confirm each step yourself
  • GitHub PR creation — opens the PR in your browser automatically
  • Cross-platform — works on macOS, Linux, and Windows

Installation

1. Clone the repo

git clone https://github.com/yourusername/gitfold.git
cd gitfold

2. Install dependencies

pip install -r requirements.txt

3. Install Gitfold as a global command

pip install -e .

After this, you can type done from any Git repository on your machine.


Setup

Create a .env file in your project root with your API keys:

OPENAI_API_KEY=your_openai_key_here
GITHUB_TOKEN=your_github_token_here

Getting your OpenAI API key: platform.openai.com/api-keys

Getting your GitHub token:

  1. Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate a new token with repo and read:user scopes
  3. Copy and paste it into your .env file

Never commit your .env file. Add it to .gitignore.


Usage

done

Gitfold will:

  1. Detect your repo and branches
  2. Stage all changed files
  3. Generate an AI commit message — you can accept, edit, or regenerate it
  4. Commit your changes
  5. Pull and merge from your dev/main branch
  6. Push to remote
  7. Generate an AI PR description and create the PR on GitHub
  8. Open the PR in your browser
  9. Print a summary of everything that happened

Manual mode

done --manual

Gitfold will ask for your confirmation before each step.


Additional flags

done --no-push       # Commit only, skip push and PR
done --no-pr         # Push but skip PR creation
done --branch main   # Override the target base branch

First run

On your first run, Gitfold will ask you a few setup questions:

⚙️  Welcome to Gitfold! Let's set up your config.

What is your default branch? (detected: 'main', press Enter to confirm):
Development branch detected as 'dev'. Use this? [y/n]:
Auto-push to remote after commit? [y/n] (default: y):
Auto-open PR in browser after push? [y/n] (default: y):
Your GitHub username (optional, press Enter to skip):

Your answers are saved to .gitfold.json in your project root. You can edit this file anytime.


Project structure

gitfold/
├── src/
│   ├── main.py            # Entry point and command flow
│   ├── git_handler.py     # All Git operations
│   ├── ai_integration.py  # LLM commit and PR generation
│   ├── config_manager.py  # Config loading and setup
│   ├── github_api.py      # GitHub API and PR creation
│   └── logger.py          # Terminal output and display
├── tests/
│   ├── test_git_handler.py
│   ├── test_ai_integration.py
│   └── test_github_api.py
├── .env                   # Your API keys (never commit this)
├── .gitignore
├── requirements.txt
├── setup.py
└── README.md

Contributing

Gitfold is open source and contributions are welcome! Feel free to open issues, suggest features, or submit pull requests.


License

MIT License. See LICENSE for details.

Metadata

Release files for gitfold 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitfold 0.1.0
File Size Uploaded Provenance Actions
gitfold-0.1.0.tar.gz 21.6 kB Without provenance Details for gitfold-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitfold 0.1.0
File Interpreter ABI Platform Actions
gitfold-0.1.0-py3-none-any.whl Python 3 none any Details for gitfold-0.1.0-py3-none-any.whl

Total release size: 43.5 kB

Release files / gitfold-0.1.0.tar.gz

Download URL gitfold-0.1.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1a86c2bb803bcc64685e452276699ed3f38059cfc13fb07af5986a320f199be2
BLAKE2b-256 checksum
How to use checksums
2251c29312242eba36a0aebf6f472161d3ec6265a0ea51122a70bb6167450ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / gitfold-0.1.0-py3-none-any.whl

Download URL gitfold-0.1.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbd866b0bb11bd9dd5621e6cfddd48851e8b56ce21adea4e9ea23cb53cc92488
BLAKE2b-256 checksum
How to use checksums
fad5b5ba77144a689c442e916e5a2337bc0332a483c069c6b24348e71f378fe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for gitfold 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page