Skip to content
ConsoleMonster

Many-repository status

Review local edits and branch divergence across several repositories in one compact workspace report.

Demos Everyday

Use it when several repositories need review before you change branches or start a release.

  • Static
  • 100×25
  • PowerShell 7.4+
  • .NET 8.0+
Many-repository status 100×2524-bitFull

How it's built

The whole program in one file, with its sample data at the top. It drew the recording above; both languages draw the same cells.

PowerShellrepository-status.ps1View on GitHub
# Review several repositories without leaving the terminal.
param([switch] $StaticSnapshot, [ValidateRange(0, 0)][int] $Step = 0)
Import-Module ConsoleMonster

# Data: cached fictional git summaries; no git process or remote request runs here.
$repositories = @(
    [pscustomobject] @{ Repository = 'orbit-api'; Branch = 'feature/cache'; Modified = 3; Staged = 1; Ahead = 2; Behind = 0 }
    [pscustomobject] @{ Repository = 'orbit-cli'; Branch = 'main'; Modified = 0; Staged = 0; Ahead = 0; Behind = 4 }
    [pscustomobject] @{ Repository = 'orbit-docs'; Branch = 'docs/setup'; Modified = 2; Staged = 0; Ahead = 0; Behind = 0 }
    [pscustomobject] @{ Repository = 'orbit-tests'; Branch = 'main'; Modified = 0; Staged = 0; Ahead = 0; Behind = 0 }
)

# Layout: numeric columns keep local changes separate from branch divergence.
$report = New-ConsoleRows -Gap 1 {
    New-ConsoleRule '[bold]Repository workspace[/] [muted]· ./work[/]'
    New-ConsoleTable -InputObject $repositories -Property Repository, Branch, Modified, Staged, Ahead, Behind -Expand
    New-ConsolePanel -Title 'Suggested next steps' {
        New-ConsoleStatusList {
            New-ConsoleStatusItem 'orbit-api' -Status Info -Detail 'Review the staged diff before committing'
            New-ConsoleStatusItem 'orbit-cli' -Status Warn -Detail 'Working tree clean; inspect four incoming commits'
            New-ConsoleStatusItem 'orbit-docs' -Status Info -Detail 'Two local edits need review'
            New-ConsoleStatusItem 'orbit-tests' -Status Pass -Detail 'Clean and up to date'
        }
    }
}

# Behaviour: print once. Keep cached summaries fresh in a separate local collection step.
$report | Write-ConsoleWidget
C#Program.csView on GitHub
// Review several repositories without leaving the terminal.
using ConsoleMonster;
using ConsoleMonster.Layout;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;

// Data: cached fictional git summaries; no git process or remote request runs here.
var repositories = new[] {
    new { Repository = "orbit-api", Branch = "feature/cache", Modified = 3, Staged = 1, Ahead = 2, Behind = 0 },
    new { Repository = "orbit-cli", Branch = "main", Modified = 0, Staged = 0, Ahead = 0, Behind = 4 },
    new { Repository = "orbit-docs", Branch = "docs/setup", Modified = 2, Staged = 0, Ahead = 0, Behind = 0 },
    new { Repository = "orbit-tests", Branch = "main", Modified = 0, Staged = 0, Ahead = 0, Behind = 0 }
};

// Layout: numeric columns keep local changes separate from branch divergence.
Table table = new Table { Expand = true };
foreach (string column in new[] { "Repository", "Branch", "Modified", "Staged", "Ahead", "Behind" }) table.AddColumn(column);
foreach (var repo in repositories) {
    table.AddRow(repo.Repository, repo.Branch, TableCell.FromValue(repo.Modified), TableCell.FromValue(repo.Staged),
        TableCell.FromValue(repo.Ahead), TableCell.FromValue(repo.Behind));
}
StatusList next = new StatusList()
    .Add("orbit-api", StatusKind.Info, "Review the staged diff before committing")
    .Add("orbit-cli", StatusKind.Warn, "Working tree clean; inspect four incoming commits")
    .Add("orbit-docs", StatusKind.Info, "Two local edits need review")
    .Add("orbit-tests", StatusKind.Pass, "Clean and up to date");
Rows report = new Rows(new Rule("[bold]Repository workspace[/] [muted]· ./work[/]"), table,
    new Panel(next, "Suggested next steps")) { Gap = 1 };

// Behaviour: print once. Keep cached summaries fresh in a separate local collection step.
Terminal.Write(report);

Run it yourself

Three steps in PowerShell, four in C#. Every command copies with one click.

  1. Install the module

    Once. Windows PowerShell 5.1 or PowerShell 7 on Windows, macOS or Linux.

    Install-Module ConsoleMonster -Scope CurrentUser
  2. Save the program

    Download it, or copy it from above into repository-status.ps1.

  3. Run it

    From the folder you saved it in.

    ./repository-status.ps1
  1. Create a project

    A plain console app; .NET 8 or later.

    dotnet new console -n Repositorystatus; cd Repositorystatus
  2. Add ConsoleMonster

    The only package the program needs.

    dotnet add package ConsoleMonster
  3. Replace Program.cs

    Download it, or copy the program from above.

  4. Run it

    dotnet run

Or skip the copying. Every demo ships with the module and the project template.

Show-ConsoleDemo repository-status
Get-ConsoleDemo repository-status -Path ./repository-status.ps1
dotnet new install ConsoleMonster.Templates
dotnet new consolemonster --demo repository-status -n Repositorystatus

Make it yours

Start with these, then read the rest of the file.

  1. Replace the cached summaries with local repository observations.

  2. Add the branch and working-tree fields your team uses for review.

  3. Keep suggested next steps separate from commands that modify a repository.

More everyday

All demos