monarch-rs

Crates.iomonarch-rs
lib.rsmonarch-rs
version0.1.0
created_at2025-05-24 11:32:54.870046+00
updated_at2025-05-24 11:32:54.870046+00
descriptionAdvanced Git Management Suite for handling multiple repositories concurrently
homepage
repositoryhttps://github.com/jwliles/monarch-rs
max_upload_size
id1687323
size110,709
jwliles (jwliles)

documentation

README

MONARCH - Advanced Git Management Suite

A powerful platform for managing multiple Git repositories concurrently with a unified interface, intelligent hook management, and advanced visualization.

Features

  • Multi-Repository Management: Concurrent operations across multiple repositories
  • Status-at-a-Glance: Visual monitoring of repository status with customizable indicators
  • Command Sequencing: Chain Git commands into visual pipelines
  • Intelligent Error Handling: Contextual suggestions for resolving Git errors
  • Visual Hook Builder: Create and manage Git hooks with a user-friendly interface
  • Cross-Repository Analysis: Track patterns and activity across your repositories

Installation

Prerequisites

  • Rust 2024 edition and toolchain
  • Git command-line tool

Build from source

git clone https://github.com/jwliles/monarch-rs.git
cd monarch-rs
cargo build --release

The compiled binary will be available at target/release/monarch.

Usage

monarch [OPTIONS] <OPERATION> <SOURCE_DIR> [TARGET_DIR]

Operations

  • Clone: Clone repositories from source directory to target directory
  • Pull: Pull latest changes for all repositories in source directory
  • Push: Push local changes for all repositories in source directory
  • Status: List all repositories and their status
  • Run: Run arbitrary git command on all repositories
  • Hook: Manage Git hooks across repositories

Options

  • --verbose: Enable verbose logging
  • --reverse: Reverse the direction of operations (e.g., clone from target to source)
  • --filter: Filter repositories by name pattern

Examples

Clone all repositories from one directory to another:

monarch clone ~/projects ~/backup

With verbose output:

monarch --verbose clone ~/projects ~/backup

List all repositories and their status:

monarch status ~/projects

Run a git command on all repositories:

monarch run ~/projects -- branch -a

Hook Management

List hooks for all repositories:

monarch hook list ~/projects

Create a new hook across all repositories:

monarch hook create ~/projects --hook-type pre-commit --script-path ~/myhooks/pre-commit.sh

Install a sample hook across all repositories:

monarch hook install ~/projects --hook-type pre-commit

Remove a hook from all repositories:

monarch hook remove ~/projects --hook-type pre-commit

Development

Project Structure

  • src/
    • main.rs: Entry point
    • args.rs: Command-line argument parsing
    • git/: Git operations and repository management
    • operations/: Implementation of supported operations
      • hook.rs: Git hook management operations
    • utils/: Utility functions

Running Tests

cargo test

Requirements

  • Rust (Minimum supported version: 1.75.0)
  • GNU/Linux or other free operating system
  • Git command-line tool
  • Standard system libraries

Note: Monarch is developed exclusively for free operating systems. It is not officially tested or supported on proprietary platforms.

License

This project is licensed under the terms found in the LICENSE file.

Commit count: 11

cargo fmt