用于检查多个项目 Git 状态的 CLI 工具
CLI tool to check the Git status of multiple projects

原始链接: https://github.com/uralys/check-projects

## Check-Projects: 一个 Git 状态 CLI **Check-Projects** 是一个快速、跨平台的 CLI 工具,旨在快速检查多个项目的 Git 状态,并按可定制的类别进行组织。它可以并行识别未提交的更改、与远程分支的差异以及未跟踪的文件。 **主要特性:** * **分类:** 按团队、客户或任何所需标准对项目进行分组。 * **灵活配置:** 使用 YAML 文件(支持本地和全局)来定义项目列表或自动扫描目录。 * **智能过滤:** 默认隐藏干净的项目,专注于需要操作的项目。 * **跨平台:** 适用于 macOS、Linux 和 Windows。 * **状态指示器:** 使用符号清晰地显示项目状态(例如,*M* 表示已修改,⬆ 表示领先于远程,✔ 表示干净)。 **安装:** 简单的 shell 脚本安装(macOS/Linux)或手动下载/提取。配置涉及在 YAML 文件中定义类别和项目。运行 `check-projects` 查看状态,并提供详细程度、类别过滤和自定义配置文件等选项。包含自动更新检查。

一个新的CLI工具“check-projects”(github.com/uralys)帮助用户快速评估多个项目的Git状态,并进行分类以便于概览。它会标记未提交的更改以及与远程仓库的差异。 该工具在Hacker News上引发了讨论,一位用户指出他们构建了一个类似的实用程序(“mani” - github.com/alajmo/mani),提供了可定制的任务和基于文本的用户界面。另一位用户提到使用Claude AI为他们的目录结构创建了一个可比较的脚本。 一条有趣的评论将其突出显示为管理多个项目的一种替代方案,而不是使用monorepo。本质上,“check-projects”提供了一种便捷的方式来掌握多个仓库中的Git活动。
相关文章

原文

A fast, cross-platform CLI tool to check the git status of multiple projects organized by categories.

Run check-projects to see which of your projects have uncommitted changes, are ahead of remote, or have other git status indicators.

x mozilla
  * M firefox
  ✱ ✚ thunderbird

✔ godot

x gamedev
  ⬆ flying-ones
  * M avindi
  • - Clean (synced with remote)
  • - Ahead of remote
  • ⬆⬆ - Diverged from remote
  • * M - Modified files
  • * D - Deleted files
  • ✱ ✚ - Untracked files
  • - Error
  • Multi-category organization: Group your projects by team, client, or any category
  • Nested project discovery: Automatically scan nested folder structures
  • Concurrent scanning: Fast parallel git status checks
  • Flexible configuration: YAML-based config with local and global support
  • Smart filtering: Hide clean projects by default, show only what needs attention
  • Cross-platform: Single binary for macOS, Linux, and Windows

Quick Install (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/uralys/check-projects/main/install.sh | sh

This will download the latest release and install it to ~/.local/bin/check-projects.

show manual Installation
  1. Download the latest release for your platform from GitHub Releases

  2. Extract and install:

# macOS/Linux
tar -xzf check-projects-*.tar.gz
chmod +x check-projects
sudo mv check-projects /usr/local/bin/

# Or install to user directory (no sudo required)
mkdir -p ~/.local/bin
mv check-projects ~/.local/bin/
# Add ~/.local/bin to your PATH if not already done
# Windows (PowerShell as Administrator)
Move-Item check-projects.exe C:\Windows\System32\
git clone https://github.com/uralys/check-projects.git
cd check-projects
make install
  1. Create a configuration file:
cp check-projects.example.yml ~/check-projects.yml
  1. Edit ~/check-projects.yml to match your project structure

  2. Run the tool:

Configuration files are searched in this order:

  1. Path specified with --config flag
  2. ./check-projects.yml (current directory)
  3. ~/check-projects.yml (home directory)
categories:
  # Mode 1: Explicit project list (using 'projects' field)
  # Use full paths to specific git repositories
  - name: core
    projects:
      - ~/fox
      - ~/cherry

  # Mode 2: Auto-scan directory (using 'root' field)
  # Recursively scans for all git repositories in the directory
  - name: godot
    root: ~/Projects/godot

  # Mode 2 with ignore patterns
  # Projects listed in 'ignore' will be skipped in this category
  - name: uralys
    root: ~/Projects/uralys
    ignore:
      - deprecated-project        # Exact match
      - _archives/*              # Wildcard: ignore all projects in _archives/
      - "*-old"                  # Pattern: ignore all projects ending with -old

# Display options
display:
  hide_clean: true      # Hide projects with ✔ status by default
  hide_ignored: true    # Hide ignored projects from output

You can ignore specific projects in a category using the ignore field. Supported patterns:

  • Exact match: project-name - ignores the exact project name
  • Wildcard prefix: _archives/* - ignores all projects in the _archives/ directory
  • Glob patterns: *-deprecated - ignores all projects ending with -deprecated

Common ignore patterns are automatically applied:

  • node_modules - always skipped during scanning
  • .DS_Store - always skipped during scanning
# Check all projects
check-projects

# Show all projects including clean ones
check-projects --verbose
check-projects -v

# Check only specific category
check-projects --category gamedev

# Use custom config file
check-projects --config /path/to/config.yml

# Show version
check-projects --version

check-projects automatically checks for new versions on startup. When a new version is available, you'll see:

⚠ New version available: 1.0.0 → 1.1.0
Install update? [Y/n]:
  • Press Enter or type Y to automatically download and install the update
  • Type n to skip and continue with your current version

The update check is non-blocking and will silently fail if GitHub is unreachable.

# Install dependencies
make deps

# Run without building
make dev

# Build binary
make build

# Run tests
make test

# Build for all platforms
make release
联系我们 contact @ memedata.com