Built gh-pm: A GitHub CLI Extension to Manage GitHub Projects with LLMs



This content originally appeared on DEV Community and was authored by miyamoto ryosuke

In the age of AI, even ticket management by PdMs and project managers should be designed around collaboration between humans and LLMs.

We’re heading toward a world where you just describe your intent in natural language, and everything—creating, updating, moving, summarizing—gets automated.

GitHub Projects (v2), with its flexible fields and powerful queries/automations, is a perfect foundation for this.

That’s why I created gh-pm: a GitHub CLI extension that brings this combination into practical, everyday workflows.

Why I Built It

GitHub Projects (v2) is powerful, but in practice you’ll quickly run into problems:

  • Assigning issues to projects is tedious
  • Frequent updates and status changes add overhead
  • Writing raw GraphQL queries is too complex for daily use

gh-pm solves these by extending the GitHub CLI, and when combined with an LLM, it enables natural language-driven project management.

Features & Examples

0. Installation

gh extension install yahsan2/gh-pm

1. Init with .gh-pm.yml

Start by generating a config file:

gh pm init

This detects your project and creates a .gh-pm.yml.

The file caches field names like Status and Priority, so you can use intuitive shorthand in commands.

Example:

fields:
  status:
    backlog: "Backlog"
    in_progress: "In Progress"
    done: "Done"
  priority:
    high: "P0"
    medium: "P1"
    low: "P2"
  deadline:
    due_date: "Due Date"

2. Create & Update Issues in Projects

# Create new issue in project with P1 priority and backend label
gh pm create --title "Implement authentication" --priority p1 --label backend

Move existing issues across columns:

# Move issue #123 to in_progress
gh pm move 123 --status in_progress

3. Intake Untracked Issues

# Add all bug-labeled issues into backlog with p2 priority
gh pm intake --label bug --apply "status:backlog,priority:p2"

With defaults in .gh-pm.yml, you can even make this interactive.

Example .gh-pm.yml snippet:

intake:
  bug:
    query: "is:issue is:open -label:pm-tracked"
    instruction: "Starting intake for untracked issues. This will add the pm-tracked label and set default project fields."
    apply:
      labels:
        - pm-tracked
    interactive:
      status: true  # Show choices interactively to set status per issue

4. Split Issues into Sub-Issues

# Split sub-issues from checklists in issue body
gh pm split 123 --from=body

# Or from a markdown file generated by an LLM
gh pm split 123 --from=./tasks.md

# Or directly from a list
gh pm split 123 '["Task 1", "Task 2", "Task 3"]'

This depends on my other extension gh-sub-issue.

gh extension install yahsan2/gh-sub-issue

5. Triage at Scale

Define triage rules in .gh-pm.yml and process issues in batch:

# Example: mark all stale issues
gh pm triage stale
triage:
  stale:
    query: "is:issue is:open updated:<@today-7d"
    apply:
      labels:
        - stale

Note: @today-7d is implemented internally for CLI compatibility where native support is missing.

6. Flexible Output for Automation

Output to JSON or CSV for easy integration with LLMs or scripts:

gh pm list --format json

Example Triage Use Cases

  • Auto-label stale tasks: mark issues inactive for 7+ days
  • Force-set missing priorities: interactively assign priorities to all issues missing the field

Example for missing priorities:

triage:
  priority:
    query: "is:issue is:open -field:priority"
    interactive:
      priority: true  # Prompt interactively to set priority per issue

Run with:

gh pm triage priority

Using with LLMs

This is where gh-pm shines.

LLMs like Claude or Codex CLI can generate the right commands from natural language:

  • “Assign all untracked issues to me” → gh pm triage tracked --apply @me
  • “Move all P1 tasks to in_progress” → gh pm move --query "is:issue is:open -priority:high" --status in_progress

With .gh-pm.yml, these commands become even shorter.

What’s Next

The dream is to have an LLM “remember” these commands (via something like CLAUDE.md) and execute them reliably.

Right now, I sometimes still have to explicitly say things like:

“Run gh pm split 123 --from=body\ on the issue I just created.”

But when it works, GitHub Projects + LLMs = super powerful project automation.

I’ll keep improving the prompts, instructions, and hooks—so stay tuned.

Try It Out

Repo here 👉 yahsan2/gh-pm

Feedback, ideas, and ⭐ are super welcome.

TL;DR

gh-pm is:

  • A GitHub CLI extension that simplifies day-to-day GitHub Project ops
  • Hides GraphQL complexity behind intuitive commands
  • Uses .gh-pm.yml for flexible field mapping
  • Designed to pair naturally with LLMs for natural language operations

A practical partner for managing projects “fast, safe, and clear.”


This content originally appeared on DEV Community and was authored by miyamoto ryosuke