glab(1)
π« glab-orbit-remote-query β aka the glab orbit remote query page from your glab(1) manual π«
okay bestie, sit down, hydrate, because this one is experimental and we're gonna talk about it π«Ά
β¨ NAME β¨
glab-orbit-remote-query β Execute a GitLab Knowledge Graph query. (EXPERIMENTAL)
Not me putting the all-caps EXPERIMENTAL in bold, but like, it's giving important, so. π
πΈ SYNOPSIS πΈ
glab orbit remote query [file|-] [flags]
π¦ DESCRIPTION π¦
So what this does is call POST /api/v4/orbit/query with a JSON request body, and then it prints the server response verbatim. That's it. That's the whole vibe. No remixing, no glow-up, the bytes come out exactly how they went in. β¨
The body gets read from a file path, or from standard input when the argument is - or just... omitted entirely. Queen of flexibility.
The request body has to be a full Orbit query envelope, like:
{
"query": { "query_type": "...", ... },
"response_format": "llm" | "raw"
}
--response-format overrides the body's response_format value, or sets it if it's absent. And if neither the body nor --response-format specifies a format? Then llm is used by default, periodt. Here's the tea on the two formats:
llmis compact GOON/TOON text β it's literally intended for agents π€rawreturns structured JSON, which is the one you want if you're piping intojq
The server's response body gets written to stdout verbatim regardless of format β no client-side decoding or re-encoding is performed. Like, zero. None. The client is not touching it. π
Compatibility note, bestie, listen up: prior to this change,--format rawoutput was re-marshalled through the SDK's typedOrbitQueryResultstruct (producing indented JSON). It is now the server's bytes verbatim (compact JSON). So if you're out here needing indented output, pipe intojq .β that's the move. π
The graph DSL JSON Schema is served by glab orbit remote tools and it is the source of truth for the body shape. π And see also glab orbit remote schema for the graph ontology.
For the full query language reference with examples, go fetch the docs from the Knowledge Graph repository:
glab api "projects/gitlab-org%2Forbit%2Fknowledge-graph/repository/files/docs%2Fsource%2Fqueries%2Fquery_language.md?ref=main" | jq -r .content | base64 -d
β οΈ This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/. π
π OPTIONS π
--hostname=""β GitLab hostname to query. Defaults to the current repository's host orgitlab.com.--response-format="llm"β Server response format:llm(compact GOON/TOON for agents) orraw(structured JSON).
π OPTIONS INHERITED FROM PARENT COMMANDS π
-h,--help[=false]β Show help for this command.
π EXAMPLE π
# Run a query from a file
$ glab orbit remote query ./query.json
# Run a query from stdin
$ cat ./query.json | glab orbit remote query -
# Force raw output (pipeable into jq)
$ glab orbit remote query --response-format raw ./query.json
β SEE ALSO β
Auto generated by spf13/cobra, dated Aug 2026, and living in the glab(1) manual β okay that's the whole page bestie, you ate that read, now go query something π₯π
π¦ where this page comes from
- epel 10: glab 1.112.0-1.el10_3 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND (FTL OR GPL-2.0-or-later)
- epel 9: glab 1.112.0-1.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND (FTL OR GPL-2.0-or-later)
- fedora 44: glab 1.114.0-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND (FTL OR GPL-2.0-or-later)
- opensuse-leap 16.0: glab 1.114.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: glab 1.114.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: glab 1.114.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: glab 1.114.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms