branch-party

Crates.iobranch-party
lib.rsbranch-party
version0.1.1
created_at2025-10-07 17:44:21.547068+00
updated_at2025-10-07 17:44:21.547068+00
descriptionA CLI tool for creating and maintaining party branches - automated git branch merging for development workflows
homepagehttps://github.com/joeyparis/branch-party
repositoryhttps://github.com/joeyparis/branch-party
max_upload_size
id1872093
size71,582
(joeyparis)

documentation

https://docs.rs/branch-party

README

🎉 Branch Party

A CLI tool for creating and maintaining "party branches" - automated git branch merging for development workflows.

License Rust

What is Branch Party?

Branch Party automates the creation and maintenance of "party branches" - combined branches that merge multiple feature branches together for testing, staging, or integration purposes.

Key Features:

  • 🚀 Automated Party Branch Creation: Combine multiple feature branches into party branches
  • 🔄 Auto-Update on Commits: Party branches automatically update when member branches change
  • 🛡️ Protection: Prevents direct commits to party branches
  • 📋 Flexible Configuration: YAML-based configuration with support for complex merge strategies
  • 🎯 Interactive Mode: Select branches interactively or configure via CLI
  • 🔍 Conflict Resolution: Configurable conflict resolution strategies per file or globally

Status

Fully Implemented

  • Complete CLI with all core commands
  • Git hooks for automatic updates (pre-commit, post-commit, post-merge)
  • Party resolution and merge planning with cycle detection
  • Advanced merge engine with conflict policies
  • Configuration system with full precedence
  • Interactive branch selection
  • Auto-update functionality
  • Protection against direct party branch commits

Installation

Via Cargo (Recommended)

cargo install branch-party

From Source

git clone https://github.com/yourusername/branch-party
cd branch-party
cargo install --path .

Pre-built Binaries

Download from the releases page

Quick Start

1. Initialize in your repository

cd your-project
branch-party init --with-sample

2. Configure your parties

# .git/branch-party/config.yaml
parties:
  qa:
    members:
    - feature/user-auth
    - feature/payments  
    merge_order: listed
    conflict_policy:
      default: manual

auto_update:
  enabled: true
  parties: all

3. Create party branches

branch-party run --party qa

4. Enable automatic updates

branch-party init --with-hooks

Now when you commit to feature/user-auth, the qa party branch automatically updates!

Commands

  • init - Initialize branch-party in current repository
  • run --party <name> - Create/update a party branch
  • list - Show all configured parties
  • plan --party <name> - Preview merge plan without executing
  • validate - Validate configuration
  • select - Interactive branch selection
  • completions <shell> - Generate shell completions

Configuration

The tool creates .branch-party/config.yaml with this structure:

base_branch: main
parties:
  qa:
    members:
      - feature/a
      - feature/b  
      - "@payments"  # Reference to another party
    merge_order: listed  # listed | newest_first | oldest_first
    conflict_policy:
      default: ours  # ours | theirs | union | manual
      overrides:
        - { path: "Gemfile.lock", mode: "ours" }
        - { path: "yarn.lock", mode: "theirs" }

Architecture

  • branch_party_core - Core library with business logic
  • branch-party - CLI binary that uses the core library

Key modules:

  • config - Configuration structures and parsing
  • config_loader - Multi-source configuration loading with precedence
  • git - Git repository operations via git2
  • model - Data models for branches, merge plans, and repo state
  • report - Run report generation and serialization
  • error - Structured error types with context

Development

# Run tests
cargo test

# Check code
cargo check

# Format and lint
cargo fmt
cargo clippy

# Run with debug logging
RUST_LOG=debug cargo run --bin branch-party -- list

# Generate completions
cargo run --bin branch-party -- completions bash > branch-party.bash

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt