Skip to content

Ada/SPARK TUI + Rust CLI for propagating files to all GitHub repos via central git-private-farm repo

License

Notifications You must be signed in to change notification settings

hyperpolymath/git-dropper

License

Git Dropper

Propagate files to all your GitHub repositories via a central dispatch mechanism.

Overview

Git Dropper allows you to "drop" files into all repositories under your GitHub account through a single API call to a central repository (git-private-farm). Instead of making hundreds of individual API calls, the propagation is handled by GitHub Actions.

Architecture

                                    GitHub Actions
                                         |
    +-------------+    API Call    +-----v------+    Dispatch    +-------------+
    | Rust CLI    | ------------> | git-private | ------------> | repo-1      |
    | Ada/SPARK   |               | -farm       |               | repo-2      |
    | TUI         |               | (central)   |               | repo-3      |
    +-------------+               +-------------+               | ...         |
                                                                | repo-N      |
                                                                +-------------+

How It Works

  1. User queues a file drop via CLI or TUI

  2. File is committed to git-private-farm under queue/ directory

  3. GitHub Actions workflow triggers on push

  4. Workflow iterates through all repos in the account

  5. For each repo: checks if file exists, adds only if missing

  6. No overwrites - safe for existing files

Components

Rust CLI (cli/)

The command-line interface for quick file drops.

# Drop a file to all repos
git-dropper drop MAINTAINERS.adoc

# Drop with custom commit message
git-dropper drop --message "Add maintainers info" MAINTAINERS.adoc

# List pending drops
git-dropper queue list

# Check status
git-dropper status

Ada/SPARK TUI (tui/)

Terminal user interface with formal verification for safety-critical operations.

  • Built with Ada 2022 + SPARK subset

  • Ncurses-based terminal UI

  • Formally verified file handling

  • Interactive queue management

Installation

Prerequisites

  • Rust 1.75+ (for CLI)

  • GNAT 14+ with GPRbuild (for TUI)

  • GitHub CLI (gh) authenticated

  • Repository git-private-farm created and accessible

Building

# Build Rust CLI
cd cli && cargo build --release

# Build Ada/SPARK TUI
cd tui && gprbuild -P git_dropper_tui.gpr

Configuration

Create ~/.config/git-dropper/config.toml:

[github]
owner = "your-username"
farm_repo = "git-private-farm"

[behavior]
no_overwrite = true  # Never overwrite existing files
dry_run = false      # Set true to preview without changes

Git Private Farm Setup

Create the central repository:

gh repo create git-private-farm --private

The repository structure:

git-private-farm/
+-- .github/
|   +-- workflows/
|       +-- propagate.yml    # Main propagation workflow
+-- queue/                    # Pending file drops
|   +-- MAINTAINERS.adoc
|   +-- SECURITY.md
+-- completed/                # Successfully propagated
+-- failed/                   # Failed propagations (with logs)

Safety Guarantees

No Overwrites

Git Dropper never overwrites existing files:

if file_exists(target_repo, filename):
    skip()  # File preserved
else:
    add_file(target_repo, filename, content)

SPARK Verification (TUI)

The Ada/SPARK TUI includes formally verified contracts:

procedure Drop_File (Path : String; Content : String)
  with Pre  => Path'Length > 0 and Content'Length > 0,
       Post => File_Queued (Path);

Roadmap

  • ✓ Basic Rust CLI

  • ✓ Ada/SPARK TUI foundation

  • ❏ GitHub Actions propagation workflow

  • ❏ Progress tracking and reporting

  • ❏ Selective repo targeting (include/exclude patterns)

  • ❏ Rollback mechanism for dropped files

  • ❏ GitLab and Bitbucket support

License

PMPL-1.0-or-later. See LICENSE.

About

Ada/SPARK TUI + Rust CLI for propagating files to all GitHub repos via central git-private-farm repo

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published