https://github.com/r3d-shadow/git-pilot
A CLI tool to sync and update Git files and configurations across multiple repositories efficiently and consistently.
https://github.com/r3d-shadow/git-pilot
devops devops-tools github-actions workflow-automation workflow-management
Last synced: 5 months ago
JSON representation
A CLI tool to sync and update Git files and configurations across multiple repositories efficiently and consistently.
- Host: GitHub
- URL: https://github.com/r3d-shadow/git-pilot
- Owner: r3d-shadow
- License: apache-2.0
- Created: 2025-05-23T13:41:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T02:55:36.000Z (about 1 year ago)
- Last Synced: 2025-09-25T11:56:57.726Z (9 months ago)
- Topics: devops, devops-tools, github-actions, workflow-automation, workflow-management
- Language: Python
- Homepage:
- Size: 2.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-pilot
> Sync workflows, configs, and more across 10+ repos in seconds using Helm-style templates.
---
[](https://github.com/r3d-shadow/git-pilot/stargazers)
[](https://pypi.org/project/git-pilot/)
[](LICENSE)
---
## ๐ Why Git-Pilot?
Managing configuration and CI/CD files across 10, 20, or 100+ repositories is a nightmare.
**`git-pilot` is your autopilot for repository file sync.** It brings GitOps discipline, Helm-style templating, and one-command sync to modern DevOps pipelines.
### ๐ง Built for DevEx
* **One command to sync them all:** Apply templates to any number of GitHub repos in one go.
* **Helm-style power:** Use partials, macros (`.tpl`), and regex-driven rendering logic.
* **Preview before you push:** Interactive side-by-side diffs before anything is committed.
* **State-aware syncs:** Tracks changes and removes stale files automatically.
* **Per-repo flexibility:** Custom branches, commit messages, and variable overrides.
---
## ๐งฐ What It Does
| Feature | Description |
| -------------------------- | ----------------------------------------------------------------------------- |
| ๐ Multi-Repo Sync | Render and push files across 1 or 100 repos with a single command |
| ๐งฉ Helm-Style Templates | Use Jinja2 with custom delimiters, includes, and reusable `.tpl` macros |
| ๐ Interactive Diff Viewer | See what changes before you commitโcreated, updated, deleted files preview |
| ๐งฌ Per-Repo Customization | Branches, paths, commit messages, and injected variables |
| ๐งน Auto-Cleanup | Deletes stale files intelligently based on diff and state tracking |
| ๐ GitHub Native (for now) | Built-in support for GitHub with extensible architecture for future providers |
---
## ๐ฆ Installation
```bash
pip install git-pilot
```
---
## โจ Getting Started: First Sync in 5 Minutes
### 1. Initialize Template Directory
```bash
git-pilot init --template-dir my-templates
```
This creates a sample structure with:
* Example templates (`*.yml.j2`)
* Partials in `includes/`
* Helper macros in `_helpers.tpl`
* A working `values.yml` config
---
### 2. Customize Templates and Values
Edit `my-templates/values.yml`:
```yaml
defaults:
branch: main
message: "git-pilot: update workflows"
path: ".github/workflows"
vars:
ci_name: my-pipeline
env: dev
templates:
- ".*\.j2$"
repos:
- name: r3d-shadow/git-pilot-test-1
vars:
job_id: scan1
- name: r3d-shadow/git-pilot-test-2
branch: main # override
vars:
job_id: scan2
env: prod # override
```
---
### 3. Run Your First Sync
```bash
cd my-templates
git-pilot sync \
--token $GITHUB_TOKEN \
--templates ./ \
--values ./values.yml
```
โ
Youโll see a full visual diff. Confirm to sync. Thatโs it!

---
## ๐ Docs
* [Templating Guide](https://github.com/r3d-shadow/git-pilot/blob/main/docs/templating.md) โ Includes, macros, helpers, and Jinja2 syntax
* [Configuration Reference](https://github.com/r3d-shadow/git-pilot/blob/main/docs/configuration.md) โ All config options and repo overrides
* [Architecture Guide](https://github.com/r3d-shadow/git-pilot/blob/main/docs/architecture-guide.md) โ Extending providers and internal design
* [Contributing to `git-pilot`](https://github.com/r3d-shadow/git-pilot/blob/main/docs/contributing.md)
* [Roadmap](https://github.com/r3d-shadow/git-pilot/blob/main/docs/roadmap.md)
---
## ๐ ๏ธ Advanced Examples
* Sync GitHub Actions, README.md, configs, policies, and more
* Regex-targeted templates per repo
* Environments like `dev`, `staging`, `prod`
* Centralized secrets and configurations with overrides
โ See `/example-template-dir` for ready-to-copy setups
---
## ๐ค Contributing
We welcome contributors! Here's how to get started:
```
git clone https://github.com/r3d-shadow/git-pilot.git
cd git-pilot
python3 -m venv venv
source venv/bin/activate
pip install -e .
git-pilot
```
Open a PR with a clear description. See the [Architecture Guide](https://github.com/r3d-shadow/git-pilot/blob/main/docs/architecture-guide.md) for more details.
---
## ๐ Spread the Word
> Just found this tool called `git-pilot` โ sync your GitHub Actions, configs, and more across 10+ repos with a single command. Helm-style templates. Pure ๐ฅ.
Tweet it. Star it. Fork it. Contribute.
Letโs build better DevOps pipelines together.
---
## ๐ชช License
Apache-2.0 license โ [LICENSE](https://github.com/r3d-shadow/git-pilot/blob/main/LICENSE)