Skip to content

Add glab api proxy support #851

Description

@Smasherr

Feature Request: glab api proxy support

Context

rtk discover identifies glab api as the #1 unhandled command by usage count.

Over the last 30 days across 456 sessions:

  • 1,129 invocations of glab api

This is a GitLab CLI (glab) command that returns JSON API responses — often large project metadata, file contents, search results, merge request details, etc. These responses are typically verbose and would benefit significantly from token-optimized filtering.

Example commands

glab api "projects/gitlab-org%2Fcli/merge_requests?state=merged&per_page=5"
glab api "projects/gitlab-org%2Fcli/repository/tree?ref=main&per_page=20"
glab api "projects/gitlab-org%2Fcli/issues?labels=bug&state=opened"
glab api version

Expected behavior

rtk glab should proxy glab api calls and filter/compress the JSON output, similar to how rtk gh handles gh api calls.

Additional context

  • glab is the official GitLab CLI (https://gitlab.com/gitlab-org/cli)
  • The glab api subcommand is analogous to gh api for GitHub
  • Response format is JSON, so existing JSON filtering strategies from rtk gh / rtk curl should be largely reusable
  • Also frequently used: glab release (157 invocations) — could be a follow-up

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort-medium1-2 jours, quelques fichiersenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions