Skip to content

feat(cli): detect gh-gcs argv[0] and default to query subcommand #97

@shouze

Description

@shouze

Context

Part of the gh-gcs epic (#93).

fulll/gh-gcs is the companion repository that serves as the distribution point for the gh extension. It contains no source code — only a README and the release workflow.

Reference

How to bootstrap the repository

Use the --precompiled=other flag to scaffold the repo with the correct structure (workflow included):

gh extension create --precompiled=other gh-gcs
cd gh-gcs
gh repo create fulll/gh-gcs --source=. --public --push
gh repo edit fulll/gh-gcs --add-topic gh-extension

This generates:

Note: the gh naming convention for precompiled extension binaries is gh-gcs-<os>-<arch>[.exe], e.g. gh-gcs-darwin-arm64, gh-gcs-linux-amd64, gh-gcs-windows-amd64.exe. All target combinations recognized by gh are listed in the manager.go source.

Goal

Create the fulll/gh-gcs repository with:

  • Visibility: public
  • Topic: gh-extension (required for discoverability in gh extension search)
  • README.md: short description explaining it is a gh extension wrapper for github-code-search, with install and usage instructions
  • .gitignore: ignoring any compiled binary accidentally dropped at the root

README content (minimum)

# gh-gcs

> GitHub Code Search as a `gh` extension — powered by [github-code-search](https://github.com/fulll/github-code-search)

## Install

\```bash
gh extension install fulll/gh-gcs
\```

## Usage

\```bash
gh gcs --org <org> "<query>"
\```

All options from `github-code-search query` are supported.

## Upgrade

\```bash
gh extension upgrade gh-gcs
\```

Acceptance criteria

  • Repository fulll/gh-gcs is public and accessible
  • Topic gh-extension is set
  • gh extension install fulll/gh-gcs resolves the repository
  • README documents install, basic usage, and upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions