Skip to main content
CodeFire’s GitHub integration provides real-time visibility into pull requests, commits, CI status, and issues. This guide covers setting up the GitHub CLI and using GitHub features.

Overview

CodeFire uses the GitHub CLI (gh) to fetch repository data. Once installed and authenticated, the GitHub tab shows:
  • Pull Requests — Open PRs with review status, checks, and diffs
  • Commits — Recent commits on the current branch
  • Workflows — CI/CD runs with status and logs
  • Issues — Open issues assigned to you
All data refreshes automatically every 60 seconds.

Prerequisites

1
Install GitHub CLI
2
The GitHub CLI (gh) is required for all GitHub features.
3
macOS (Homebrew):
4
brew install gh
5
macOS (Manual):
6
  • Download from cli.github.com
  • Extract and move to /usr/local/bin/
  • 7
    Verify installation:
    8
    gh --version
    
    9
    You should see output like:
    10
    gh version 2.40.0 (2024-01-15)
    
    11
    Authenticate with GitHub
    12
    Run the authentication flow:
    13
    gh auth login
    
    14
    Follow the prompts:
    15
  • What account do you want to log into? → GitHub.com
  • What is your preferred protocol? → HTTPS (recommended)
  • Authenticate Git with your GitHub credentials? → Yes
  • How would you like to authenticate? → Login with a web browser
  • 16
    Copy the one-time code, press Enter, and complete the OAuth flow in your browser.
    17
    Verify authentication:
    18
    gh auth status
    
    19
    You should see:
    20
    github.com
      ✓ Logged in to github.com as <your-username>
      ✓ Git operations for github.com configured to use https protocol.
      ✓ Token: *******************
    
    21
    Open a Project in CodeFire
    22
    The GitHub tab only appears for projects with a GitHub remote. Ensure your project is a Git repository with a GitHub origin:
    23
    cd /path/to/your/project
    git remote -v
    
    24
    You should see:
    25
    origin  https://github.com/owner/repo.git (fetch)
    origin  https://github.com/owner/repo.git (push)
    
    26
    If not, add a remote:
    27
    git remote add origin https://github.com/owner/repo.git
    

    Using the GitHub Tab

    Once gh is authenticated, open any project in CodeFire and click the GitHub tab.

    Pull Requests

    The Pull Requests section shows all open PRs for the current repository. For each PR, you’ll see:
    • PR number and title
    • Author and branch name
    • Review decision (Approved, Changes Requested, or pending)
    • CI checks status (passing, failing, or in progress)
    • Additions/deletions count
    • Created/updated timestamps
    PR check indicators:
    • 🟢 Green — All checks passed
    • 🔴 Red — At least one check failed
    • 🟡 Yellow — Checks in progress
    • ⚪ Gray — No checks configured
    Click a PR to:
    • View full diff (opens in browser)
    • See check details
    • Review comments

    Commits

    The Commits section shows the 15 most recent commits on the default branch (usually main or master). For each commit, you’ll see:
    • Short SHA (first 7 characters)
    • Commit message
    • Author name
    • Commit timestamp
    Click a commit to:
    • View full diff in GitHub web UI
    • See changed files
    • Review commit details

    Workflows (CI/CD)

    The Workflows section shows the 10 most recent GitHub Actions runs. For each workflow, you’ll see:
    • Workflow name (e.g., “CI”, “Deploy”, “Tests”)
    • Status (in progress, completed, queued)
    • Conclusion (success, failure, cancelled, timed out)
    • Branch name
    • Trigger event (push, pull_request, schedule)
    • Created timestamp
    Status indicators:
    • ✅ Success — Workflow completed successfully
    • ❌ Failure — Workflow failed
    • ⏳ Pending — Workflow in progress
    • 🚫 Cancelled — Workflow was cancelled
    Click a workflow to:
    • View logs in GitHub web UI
    • Re-run failed jobs
    • Download artifacts

    Issues

    The Issues section shows open issues assigned to you. For each issue, you’ll see:
    • Issue number and title
    • Labels (bug, enhancement, etc.)
    • State (open/closed)
    • Assignees
    • Created/updated timestamps
    Click an issue to:
    • View full description in browser
    • Add comments
    • Close or assign

    How CodeFire Uses gh

    CodeFire shells out to gh commands to fetch data. All commands run in the project directory.

    Commands Used

    FeatureCommand
    Detect repogh repo view --json owner,name,defaultBranchRef
    Fetch PRsgh pr list --state open --json number,title,author,headRefName,isDraft,reviewDecision,statusCheckRollup,createdAt,updatedAt,additions,deletions
    Fetch commitsgh api repos/{owner}/{repo}/commits -f sha={branch} -f per_page=15
    Fetch workflowsgh run list --limit 10 --json databaseId,name,status,conclusion,headBranch,event,createdAt,url
    Fetch issuesgh issue list --assignee @me --state open --json number,title,assignees,labels,state,createdAt,updatedAt

    Data Refresh

    CodeFire polls GitHub every 60 seconds while the project window is active. Polling pauses when:
    • The window loses focus
    • The GitHub tab is not visible
    • CodeFire is in the background
    Polling resumes automatically when the window regains focus. Manual refresh: Click the refresh icon in the GitHub tab toolbar to fetch data immediately.

    Creating Pull Requests

    You can create PRs directly from the GitHub tab.
    1
    Stage and Commit Changes
    2
    Before creating a PR, ensure your changes are committed:
    3
    git add .
    git commit -m "Add new feature"
    git push origin feature-branch
    
    4
    Open the GitHub Tab
    5
    Click the GitHub tab in CodeFire.
    6
    Click “Create PR”
    7
    (Future feature) — Click the Create PR button to open the gh PR creation flow.
    8
    For now, create PRs via command line:
    9
    gh pr create --title "Add new feature" --body "Description of changes"
    
    10
    CodeFire will detect the new PR automatically on the next refresh.

    Troubleshooting

    GitHub Tab Shows “Not Available”

    Symptom: GitHub tab is grayed out or shows “GitHub not available” Solution:
    1. Verify gh is installed:
      which gh
      
    2. Ensure gh is in your PATH (CodeFire checks /opt/homebrew/bin/gh and /usr/local/bin/gh)
    3. Verify the project has a GitHub remote:
      git remote -v
      
    4. Restart CodeFire

    Data Not Updating

    Symptom: GitHub tab shows stale data Solution:
    1. Click the Refresh icon in the GitHub tab
    2. Check your internet connection
    3. Verify gh auth status shows you’re logged in
    4. Check the project window is active (polling pauses in background)

    PR Checks Not Showing

    Symptom: PRs show no check status Solution:
    1. Ensure the repository has GitHub Actions or CI configured
    2. Check the PR has commits pushed to the remote
    3. Wait for checks to start (they may take a few seconds)
    4. Refresh the GitHub tab

    Commits Not Appearing

    Symptom: Recent commits are missing Solution:
    1. Verify commits are pushed to the remote:
      git log origin/main
      
    2. CodeFire only shows commits on the default branch (main/master)
    3. For commits on other branches, switch to that branch first
    4. Refresh the GitHub tab

    Authentication Expired

    Symptom: GitHub tab stops working after a few weeks Solution:
    1. Re-authenticate with gh:
      gh auth login
      
    2. Verify authentication:
      gh auth status
      
    3. Restart CodeFire

    Available Features

    CodeFire’s GitHub integration provides: View open PRs — See all PRs with review status and checks
    Monitor CI/CD — Track workflow runs and failures
    Browse commits — Recent commit history with diffs
    Track issues — View issues assigned to you
    Auto-refresh — Data updates every 60 seconds
    Click-through to GitHub — Open any item in your browser
    🚧 Coming soon:
    • Create PRs from CodeFire
    • Inline diff viewer
    • Comment on PRs and issues
    • Merge PRs with one click

    Next Steps

    CLI Integration

    Connect your AI coding CLI

    Workflows

    Common workflows and best practices

    Build docs developers (and LLMs) love