Metadata-Version: 2.4
Name: before-push
Version: 0.1.4
Summary: A small CLI that checks your current Git branch before you push or open a pull request.
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=15.0.0
Dynamic: license-file

# BeforePush

[![PyPI version](https://img.shields.io/pypi/v/before-push.svg)](https://pypi.org/project/before-push/)
[![Python 3.13+](https://img.shields.io/badge/Python-3.13%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/alibro005/beforepush/blob/main/LICENSE)
[![Tests](https://github.com/alibro005/beforepush/actions/workflows/test.yml/badge.svg)](https://github.com/alibro005/beforepush/actions/workflows/test.yml)

<p align="center">
  <img src="https://raw.githubusercontent.com/alibro005/beforepush/main/assets/beforepush.svg" alt="BeforePush logo" width="160">
</p>

A lightweight CLI that checks whether your Git branch is ready before pushing or opening a pull request.

## Features

* Check if the current directory is a Git repository
* Show the current branch
* Detect uncommitted or untracked changes
* Check upstream branch configuration
* Check if the current branch is behind a target branch
* Support custom target branches
* Clean terminal output with Rich

## Installation

Install BeforePush from PyPI:

```bash
pip install before-push
```

## Usage

Run BeforePush inside a Git repository:

```bash
beforepush
```

By default, BeforePush checks your current branch against `main`.

You can specify a different target branch with `--target`:

```bash
beforepush --target develop
```


## Demo

![beforepush](https://raw.githubusercontent.com/alibro005/beforepush/main/assets/demo.gif)

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and contribution guidelines.

## Scope

BeforePush focuses on local Git branch readiness.

It does not create or merge pull requests, authenticate with GitHub, perform code reviews, manage remote repositories, or modify Git history.

## License

This project is licensed under the MIT License.
