gitflow-cli 2.0.0

跨平台 Git 工程化工作流编排框架:统一封装 GitHub / GitLab / GitCode 三大平台,配合 AI Agent Skills,覆盖从需求到发布的完整工程循环。
gitflow-cli-2.0.0 is not a library.

gf

Crates.io Documentation License: MIT CI

Cross-platform Git engineering workflow orchestration tool — manage Issues, PRs, Releases, and CI/CD pipelines across GitHub, GitLab, and GitCode from a unified CLI.

Overview

gf is a powerful command-line tool that provides a unified interface for managing Git hosting platforms. Whether you're working with GitHub, GitLab, or GitCode, gf offers consistent commands for issue tracking, pull requests, releases, and more.

Features

  • Multi-Platform Support: GitHub, GitLab, and GitCode with a single CLI
  • Issue Management: Create, list, view, and manage issues
  • Pull Requests: Create, review, merge, and manage PRs/MRs
  • Release Management: Create releases with auto-generated changelogs
  • Code Reviews: Submit and manage code reviews
  • Pipeline Monitoring: Check CI/CD pipeline status
  • Authentication Checking: Verify platform authentication status
  • Shell Completions: Auto-completion for bash, zsh, and fish
  • JSON Output: Machine-readable output for scripting

Installation

From crates.io

cargo install gf

From GitHub Releases

Download pre-built binaries from the releases page:

# macOS (Apple Silicon)
curl -LO https://github.com/byx-darwin/gitflow-cli/releases/latest/download/gf-aarch64-apple-darwin.tar.gz
tar -xzf gf-aarch64-apple-darwin.tar.gz
sudo mv gf /usr/local/bin/

# macOS (Intel)
curl -LO https://github.com/byx-darwin/gitflow-cli/releases/latest/download/gf-x86_64-apple-darwin.tar.gz
tar -xzf gf-x86_64-apple-darwin.tar.gz
sudo mv gf /usr/local/bin/

# Linux (x86_64)
curl -LO https://github.com/byx-darwin/gitflow-cli/releases/latest/download/gf-x86_64-unknown-linux-gnu.tar.gz
tar -xzf gf-x86_64-unknown-linux-gnu.tar.gz
sudo mv gf /usr/local/bin/

From Source

git clone https://github.com/byx-darwin/gitflow-cli.git
cd gf
cargo build --release
cargo install --path apps/cli

Quick Start

Check Authentication

# Check if authenticated to platforms
gf auth status

Issue Management

# List open issues
gf issue list --state open

# Create a new issue
gf issue create --title "Bug report" --body "Description"

# View issue details
gf issue view 42

Pull Request Management

# List open PRs
gf pr list --state open

# Create a new PR
gf pr create --title "Feature" --body "Description" --source feature-branch --target main

# Review a PR
gf pr review 42 --approve --comment "LGTM!"

Release Management

# List releases
gf release list

# Create a new release
gf release create --tag v1.0.0 --name "Release v1.0.0" --notes "Release notes"

Pipeline Status

# Check pipeline status
gf pipeline status

Commands

auth — Authentication

gf auth status              # Check authentication status
gf auth login               # Login to platform

issue — Issue Management

gf issue list               # List issues
gf issue create             # Create new issue
gf issue view <number>      # View issue details
gf issue update <number>    # Update issue
gf issue close <number>     # Close issue

pr — Pull Request Management

gf pr list                  # List pull requests
gf pr create                # Create new PR
gf pr view <number>         # View PR details
gf pr review <number>       # Review PR
gf pr merge <number>        # Merge PR

release — Release Management

gf release list             # List releases
gf release create           # Create new release
gf release view <tag>       # View release details
gf release upload <tag>     # Upload assets

review — Code Review

gf review list              # List reviews
gf review submit            # Submit review

pipeline — CI/CD Pipelines

gf pipeline status          # Check pipeline status

completions — Shell Completions

gf completions --install    # Install shell completions

Platform Support

Feature GitHub GitLab GitCode
Issues ✅ ✅ ✅
Pull Requests ✅ ✅ (MRs) ✅
Releases ✅ ✅ ✅
Reviews ✅ ✅ ✅
Pipelines ✅ ✅ ✅
Authentication ✅ (gh) ✅ (glab) ✅ (gc)

Configuration

gf uses platform-specific CLIs for authentication:

  • GitHub: gh CLI
  • GitLab: glab CLI
  • GitCode: gc CLI

Install and authenticate with the appropriate CLI for your platform.

Environment Variables

  • GITHUB_TOKEN / GH_TOKEN — GitHub authentication token
  • GITLAB_TOKEN — GitLab authentication token
  • GITCODE_TOKEN — GitCode authentication token
  • GITFLOW_PLATFORM — Force specific platform (github/gitlab/gitcode)

Shell Completions

Auto-completion is available for bash, zsh, and fish:

# Install completions
gf completions --install

# Or manually generate
gf completions --shell bash > ~/.bash_completion.d/gf
gf completions --shell zsh > ~/.zsh/completions/_gf
gf completions --shell fish > ~/.config/fish/completions/gf.fish

JSON Output

Use --json flag for machine-readable output:

gf issue list --json
gf pr view 42 --json

Architecture

┌─────────────────────────────────────────┐
│           gf (CLI)             │
└──────────────────┬──────────────────────┘
                   │ uses
                   ▼
┌─────────────────────────────────────────┐
│         gf-core (traits)       │
└──────────────────┬──────────────────────┘
                   │ implementations
        ┌──────────┼──────────┐
        ▼          ▼          ▼
   ┌────────┐ ┌────────┐ ┌────────┐
   │ GitHub │ │ GitLab │ │GitCode │
   └────┬───┘ └────┬───┘ └────┬───┘
        │          │          │
        ▼          ▼          ▼
      gh CLI    glab CLI    gc CLI

Ecosystem

This crate is part of the gf workspace:

  • gf-core — Core types and traits
  • gf-github — GitHub platform implementation
  • gf-gitlab — GitLab platform implementation
  • gf-gitcode — GitCode platform implementation
  • gf (this crate) — CLI application

Documentation

Contributing

Contributions are welcome! Please see the main repository for contribution guidelines.

License

Licensed under the MIT License. See LICENSE for details.