mayi-cli

command module
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 6 Imported by: 0

README

MAYI-CLI

A powerful CLI tool for managing codeowners files with intelligent conflict detection, rule analysis, and automatic optimization. Powered by mayi.

Features

  • 🖊️ Add, update, and remove rules
  • ✅ Validate rules and accuracy
  • 🔎 Check who can review files & directories
  • 📄 Generate files

Quick Start

Installation
go install github.com/MoonMoon1919/mayi-cli@latest
Basic commands
mayi-cli create

# Add a rule
mayi-cli add rule --pattern 'docs/*' --owner '@MoonMoon1919' --owner '@toastsandwich123'

# Search for owners
mayi-cli get owners --pattern docs/

# Add another owner
mayi-cli add owner --pattern 'docs/*' --owner '@example'

# Analyze the file
mayi-cli analyze

Usage

Creating files
# Defaults to .github/CODEOWNERS
mayi-cli create

# Or override to your desired path
mayi-cli create --path CODEOWNERS
Adding rules
# Add a basic rule to have one owner for docs
mayi-cli add rule --pattern 'docs/*' --owner '@MoonMoon1919'

# Except for samples - require no owner for those
mayi-cli add rule --pattern 'docs/internal/samples/*' --owner '' --action exclude
Adding rule owners
mayi-cli add owner --pattern 'docs/*' --owner @example
Removing rules
mayi-cli delete rule --pattern 'docs/internal/samples/*'
Removing rule owners
mayi-cli delete owner --pattern 'docs/*' --owner @example
Searching for rules
mayi-cli get owners --pattern docs/
Moving rules
# Add a random rule
mayi-cli add rule --pattern '*.md' --owner @MoonMoon1919

# Then move it
mayi-cli move --source-pattern '*.md' --destination-pattern 'docs/*' --direction before
Analyzing
# Analyze without fixing
mayi-cli analyze

# Or fix any errors the analyzer encounters
mayi-cli analyze --fix
	

Contributing

See CONTRIBUTING for details.

License

MIT License - see LICENSE for details.

Disclaimers

This work does not represent the interests or technologies of any employer, past or present. It is a personal project only.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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