Skip to content

feat: distribute github-code-search as a gh extension (gh-gcs) #93

Description

@shouze

Goal

Make github-code-search available as an official gh extension under the name gh-gcs, without rewriting or duplicating logic. All business logic stays in this repository; fulll/gh-gcs is a lightweight binary distributor only.

Expected result

gh extension install fulll/gh-gcs
gh gcs --org fulll "useEffect"        # → full TUI, same experience as today
gh extension upgrade gh-gcs           # → automatic updates

Scope

  • Subcommand exposed via gh gcs: query only (interactive TUI)
  • The upgrade and completions subcommands remain exclusive to the standalone binary
  • No rewrite in Go — existing pre-compiled Bun binaries are reused as-is

Architecture

fulll/github-code-search   ← all logic, build, binaries
       │
       │  repository_dispatch after release
       ▼
fulll/gh-gcs               ← thin repo, 0 source code
       │  downloads + renames assets
       │  publishes a gh release with the gh naming convention
       ▼
  gh extension install fulll/gh-gcs

Asset naming convention

github-code-search asset gh-gcs asset
github-code-search-linux-x64 gh-gcs-linux-amd64
github-code-search-linux-arm64 gh-gcs-linux-arm64
github-code-search-macos-x64 gh-gcs-darwin-amd64
github-code-search-macos-arm64 gh-gcs-darwin-arm64
github-code-search-windows-x64.exe gh-gcs-windows-amd64.exe

Sub-issues

  • Fallback token via gh auth token in src/api.ts
  • argv[0] detection in github-code-search.ts (gh-gcs mode)
  • Create the fulll/gh-gcs repository with README and gh-extension topic
  • Release workflow in fulll/gh-gcs
  • Automatic trigger from cd.yaml via repository_dispatch

Acceptance criteria

  • gh extension install fulll/gh-gcs works on macOS arm64, macOS x64, Linux x64, Linux arm64, Windows x64
  • gh gcs --org fulll "query" launches the TUI without needing to export GITHUB_TOKEN (when gh auth login has been done)
  • Explicit GITHUB_TOKEN continues to work (backward compatibility)
  • A release in github-code-search automatically triggers a release in gh-gcs
  • All checks pass: bun test && bun run lint && bun run knip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions