A command-line tool (CLI) to scan and find Git repositories with uncommitted changes in the directory system.
- Recursively scan all subdirectories to find Git repositories
- Check the status of each found repository
- List repositories with uncommitted changes
- Support JSON output for CI/CD integration
- Simple and user-friendly CLI interface
- Go 1.20 or later
- Git installed and available in PATH
- Operating System: Linux, macOS, Windows
# Clone repository
git clone https://github.com/nguyendangminh/gus.git
cd gus/cmd/gus
# Build and install
go buildgo install github.com/nguyendangminh/gus@latestgus [flags] [path]Flags:
-h, --help Show help
-j, --json Output in JSON format
-p, --path Directory path to scan (default: current directory)
-v, --verbose Show detailed information- Scan current directory:
gus- Scan specific directory:
gus /path/to/directory- Output in JSON format:
gus --json- Show detailed information:
gus --verboseFound 2 repositories with uncommitted changes:
1. /home/user/projects/project-a
- modified: main.go
- deleted: old_file.go
2. /home/user/projects/utils/helper
- new file: helper_test.go
{
"repositories": [
{
"path": "/home/user/projects/project-a",
"changes": [
"modified: main.go",
"deleted: old_file.go"
]
},
{
"path": "/home/user/projects/utils/helper",
"changes": [
"new file: helper_test.go"
]
}
],
"metadata": {
"scan_time": "2024-03-20T10:30:00Z",
"total_repositories": 2,
"version": "1.0.0"
}
}go test ./....
├── cmd/
│ ├── gus/ # Entry point
│ └── root/ # Root command
├── pkg/
│ ├── core/ # Core functionality
│ ├── formatter/ # Output formatting
│ ├── git/ # Git operations
│ └── scanner/ # Directory scanning
└── README.md
Contributions are welcome! Please:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
MIT License - see the LICENSE file for details.