A GitHub CLI extension that monitors GitHub Organization migrations with a real-time terminal dashboard.
# Install
gh extension install mona-actions/gh-migration-monitor
# Run
gh migration-monitor --organization myorgβ Migration Status - myorg ββββββββββββββββββββββββββββββββββββββββββ
β Repository Name Migration ID Status Created At β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β frontend-app mig_123456 β
SUCCEEDED 2025-11-05 14:30β
β backend-api mig_123457 π IN_PROGRESS 2025-11-05 14:25β
β mobile-app mig_123458 π QUEUED 2025-11-05 14:20β
β legacy-system mig_123459 β FAILED 2025-11-05 14:15β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Commands: r Refresh / Search x Exit Filters: a All q Queued i In Progress s Succeeded f Failed
Last updated: 14:35:42
- π Real-time monitoring with automatic 30-second refresh intervals
- π Multi-state tracking (Queued, In Progress, Succeeded, Failed)
- π Advanced filtering with status-based views and search functionality
- π― Live search with real-time repository name filtering
- π Comprehensive table showing Repository Name, Migration ID, Status, and Created At
- π§ Legacy support for both GEI and legacy migrations
- β¨οΈ Interactive UI with intuitive keyboard navigation
- π¨ Color-coded status indicators for quick visual assessment
- β‘ Optimized performance with efficient data filtering and updates
# Basic usage
gh migration-monitor --organization myorg
# With custom token
gh migration-monitor --organization myorg --github-token ghp_xxxxxxxxxxxx
# Monitor legacy migrations
gh migration-monitor --organization myorg --legacy| Flag | Short | Description | Required |
|---|---|---|---|
--organization |
-o |
GitHub organization | Yes |
--github-token |
-t |
GitHub token | No* |
--legacy |
-l |
Monitor legacy migrations | No |
*Can use GHMM_GITHUB_TOKEN environment variable instead.
export GHMM_GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
export GHMM_GITHUB_ORGANIZATION="myorg"
export GHMM_ISLEGACY="true" # for legacy migrationsCreate ~/.gh-migration-monitor/config.yaml:
github:
token: 'ghp_xxxxxxxxxxxx'
organization: 'myorg'
migration:
is_legacy: false
output:
format: 'table' # Output format (reserved for future use)
quiet: false # Quiet mode (reserved for future use)| Key | Action |
|---|---|
r |
Refresh data |
/ |
Open search modal |
x |
Exit application |
| Key | Filter |
|---|---|
a |
Show All migrations |
q |
Show Queued only |
i |
Show In Progress |
s |
Show Succeeded |
f |
Show Failed |
| Key | Action |
|---|---|
Enter |
Close search modal |
Escape |
Close search modal |
| Clear Button | Clear search term |
| Close Button | Close search modal |
Note: Search filtering happens in real-time as you type and works in combination with status filters.
The terminal dashboard displays a comprehensive migration table with the following columns:
| Column | Description |
|---|---|
| Repository Name | Name of the repository being migrated |
| Migration ID | Unique identifier for the migration |
| Status | Current migration state (color-coded) |
| Created At | When the migration was initiated |
- π΅ Blue: Queued states (
QUEUED,WAITING) - π‘ Yellow: In Progress (
IN_PROGRESS,PREPARING,PENDING,MAPPING,IMPORTING, etc.) - π’ Green: Succeeded (
SUCCEEDED,UNLOCKED,IMPORTED) - π΄ Red: Failed (
FAILED,FAILED_IMPORT)
- Status Filters: Instantly filter by migration state
- Live Search: Real-time repository name filtering
- Combined Filtering: Search works within selected status filters
- Dynamic Title: Shows organization name and active filter
- Optimized UI Code: Refactored following KISS principles for better maintainability
- Efficient Filtering: Streamlined filter logic with single-responsibility functions
- Memory Optimization: Reduced object overhead and cleaner lifecycle management
- Enhanced Search: Real-time search with minimal performance impact
- Faster Refresh: Improved from 60-second to 30-second refresh intervals
- Separation of Concerns: Clean architecture with focused, testable components
- Event-Driven Updates: Efficient handling of user interactions and data updates
- Responsive Design: Non-blocking UI updates and smooth animations
- Error Resilience: Graceful handling of API failures and network issues
- GitHub CLI installed and authenticated
- GitHub token with permissions:
- GEI migrations:
read:org,repo - Legacy migrations:
read:org,repo,admin:org
- GEI migrations:
- Launch with
gh migration-monitor --organization myorg - The dashboard loads automatically with a 30-second refresh interval
- Use keyboard shortcuts to navigate and filter data
- Press
/to search for specific repositories - Use status filters (
a,q,i,s,f) to focus on specific migration states
- Open: Press
/to open the search modal - Type: Start typing a repository name for real-time filtering
- Clear: Click "Clear" button or manually delete text
- Close: Press
Enter,Escape, or click "Close" button - Combine: Search works with status filters for precise results
- Loading Animation: Spinning indicator during data refresh
- Last Updated: Timestamp showing when data was last refreshed
- Active Filter: Current filter displayed in table title
- Color Status: Immediate visual status recognition
Token required: Set GHMM_GITHUB_TOKEN or use --github-token flag
Organization not found: Check organization name and token permissions
Rate limit: Wait a few minutes - the tool automatically refreshes every 30 seconds
Search not working: Ensure you're in the main dashboard view (not in a modal)
Keyboard shortcuts not responding: Try pressing Escape to ensure you're not in search mode
Contributions are welcome! Here's how to get started:
# Fork and clone
gh repo fork mona-actions/gh-migration-monitor --clone
cd gh-migration-monitor
# Build and test
go mod download
go build -o gh-migration-monitor
gh extension install .- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and add tests
- Follow KISS principles for clean, maintainable code
- Submit a pull request
βββ cmd/ # CLI commands (Cobra framework)
β βββ root.go # Main command and application entry
βββ internal/
β βββ api/ # GitHub API clients (REST & GraphQL)
β βββ config/ # Configuration management (Viper)
β βββ models/ # Domain models and data structures
β βββ services/ # Business logic and migration handling
β βββ ui/ # Terminal UI components (tview)
β βββ ui.go # Dashboard and interaction logic
β βββ table.go # Migration table display
βββ go.mod # Go module definition
βββ main.go # Application entry point
βββ README.md # This documentation
- Clean Architecture: Separation of concerns with clear boundaries
- Interface-Based Design: Testable and modular components
- Real-time Updates: Efficient background refresh with visual feedback
- Responsive UI: Optimized keyboard navigation and search functionality
This project is licensed under the MIT License.
Note: This tool is inspired by github-migration-monitor and provides enhanced functionality with a modern terminal UI.