bulkfilepr

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 7 Imported by: 0

README

GitHub release License Work In Progress Go Report Card

bulkfilepr

Batch-update one or more standardized files across many local GitHub repositories, then commit the changes on a new branch and open pull requests back to each repository's default branch.

Overview

bulkfilepr is a command-line tool designed to simplify the maintenance of standardized files (like GitHub workflows, CODEOWNERS, templates, Dockerfiles, and lint configs) across multiple repositories. Instead of manually opening each repo, creating branches, copying files, committing, pushing, and filing pull requests, bulkfilepr automates this entire process.

Quick Start

# Upsert a workflow file (create or update)
bulkfilepr apply \
  --mode upsert \
  --repo-path .github/workflows/ci.yml \
  --new-file ~/standards/ci.yml

# Dry run to see what would change
bulkfilepr apply \
  --mode exists \
  --repo-path Dockerfile \
  --new-file ~/standards/Dockerfile \
  --dry-run

Documentation

Features

  • Three update modes: upsert (always write), exists (update only if file exists), match (update only if file matches expected hash)
  • Idempotent operation: If the target branch already exists, exits successfully (exit code 0) assuming previous successful run
  • Smart branch handling: Automatically switches to default branch when on non-default branch with clean working tree
  • Safety checks: Ensures you're on the default branch with a clean working tree before making changes
  • Dry run mode: Preview changes without making any modifications
  • Automatic branching: Creates deterministic branch names based on file content hash
  • GitHub CLI integration: Automatically creates pull requests via gh pr create

Requirements

  • Git installed and configured
  • GitHub CLI (gh) installed and authenticated

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL