repomon

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT

README ΒΆ

πŸ›» Repomon

codecov

A fast tool to monitor multiple git repositories and report recent commits. Supports both local repositories and remote repositories via HTTPS or SSH, using shallow cloning and concurrency.

Installation

# Download prebuilt binary (adjust OS/arch as needed)
curl -L https://github.com/plars/repomon/releases/latest/download/repomon_linux_amd64.tar.gz | tar -xz
sudo mv repomon /usr/local/bin/

# Install with Go
go install github.com/plars/repomon/cmd/repomon@latest

# Build from source
git clone https://github.com/plars/repomon.git
cd repomon
go build -o repomon ./cmd/repomon

⚑ Quick Start

  1. Create Configuration:
mkdir -p ~/.config/repomon
cat > ~/.config/repomon/config.yaml << 'EOF'
days: 7

default:
  repos:
    - "/home/user/projects/my-project"
    - "https://github.com/kubernetes/kubernetes"

work:
  repos:
    - "https://github.com/go-git/go-git"

personal:
  repos:
    - "~/projects/dotfiles"
EOF
  1. Run Report:
# Using default group
repomon

# Specify a group
repomon -g work

# Custom config file
repomon -c /path/to/config.yaml

# Last 3 days instead of default
repomon -d 3

βš™ Configuration

Configuration is done via YAML file. Use ~/.config/repomon/config.yaml or specify with -c flag.

Repository names are automatically extracted from paths/URLs. No manual naming required.

Format
days: 7  # Number of days to look back

default:
  repos:
    - /home/user/projects/my-project         # Local - auto-named "my-project"
    - https://github.com/go-git/go-git       # Remote - auto-named "go-git"
    - https://github.com/someorg/foo#v2.x    # Specify v2.x branch
    - git@github.com:plars/repomon.git       # Remote SSH - auto-named "repomon"
    - ~/projects/work-app                    # Local with ~ - auto-named "work-app"
    - https://gitlab.com/company/project.git # Remote GitLab - auto-named "project"

work:
  repos:
    - https://github.com/company/backend
    - https://github.com/company/frontend

personal:
  repos:
    - ~/projects/dotfiles
    - https://github.com/user/hobby-project
Auto-Naming Rules
  • Local paths: Uses the final directory name (e.g., /home/user/projects/my-app β†’ "my-app")
  • HTTPS URLs: Uses the repo name (e.g., https://github.com/user/repo β†’ "repo")
  • SSH URLs: Uses the repo name after colon (e.g., git@github.com:user/repo β†’ "repo")
  • Trailing .git: Automatically removed (e.g., repo.git β†’ "repo")
  • Tilde expansion: ~ expands to your home directory

πŸ“– Usage

# Basic usage (uses 'default' group)
repomon

# Specify a group
repomon -g work
repomon --group personal

# Specify config file
repomon -c ~/.config/repomon/config.yaml

# Custom time range
repomon -d 14

# Combine options
repomon -c /custom/config.yaml -g work -d 30
Adding Repositories

Add repositories to your configuration without editing the config file manually:

# Add to default group
repomon add https://github.com/kubernetes/kubernetes

# Add to a specific group
repomon add -g work https://github.com/go-git/go-git

# Add a local repository
repomon add ~/projects/my-project

The add command supports the same flags as other commands:

  • -c, --config: Path to configuration file
  • -g, --group: Repository group to add to (default: 'default')
Listing Repositories

List configured repositories:

# List default group
repomon list

# List specific group
repomon list -g work

# List from custom config
repomon list -c /path/to/config.yaml
CLI Options
  • -c, --config: Path to configuration file (default: ~/.config/repomon/config.yaml)
  • -d, --days: Number of days to look back (default: 1)
  • -g, --group: Repository group to use (default: 'default')
  • --debug: Enable debug logging

πŸ–΅ Output Example

Repository Monitor Report
========================

πŸ“ go-git
   Recent commits:
   β€’ chore: update go.mod dependencies (2 hours ago)
   β€’ feat: add support for partial clones (5 hours ago)
   β€’ docs: update README with new features (1 day ago)

πŸ“ kubernetes
   Recent commits:
   β€’ fix: update deployment manifests (30 minutes ago)
   β€’ feat: add new autoscaling features (3 hours ago)

πŸ“ local-work
   βœ… No recent commits

πŸ“ company-private
   ❌ Error: authentication required

πŸ› οΈ How It Works

Local Repositories
  • Directly opens existing git repository
  • Reads commit history from local .git directory
  • Very fast, no network access needed
Remote Repositories
  • Performs shallow clone with depth 1 (latest commit only)
  • Uses memory storage to avoid disk writes
  • Applies date filtering during iteration
  • No file checkout - we only need commit metadata

πŸ“„ License

MIT License - see LICENSE file for details.

Directories ΒΆ

Path Synopsis
cmd
repomon command
internal
git

Jump to

Keyboard shortcuts

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