.nh .TH "glab" "1" "Jun 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-orbit-remote-query - Execute a GitLab Knowledge Graph query. (EXPERIMENTAL) .SH SYNOPSIS \fBglab orbit remote query [file|-] [flags]\fP .SH DESCRIPTION Calls \fBPOST /api/v4/orbit/query\fR with a JSON request body and prints the server response verbatim. The body is read from a file path or from standard input when the argument is \fB-\fR or omitted. .PP The request body must be a full Orbit query envelope: .EX { "query": { "query_type": "...", ... }, "response_format": "llm" | "raw" } .EE .PP \fB--format\fR overrides the body's \fBresponse_format\fR value, or sets it if absent. If neither the body nor \fB--format\fR specifies a format, \fBllm\fR is used by default. The \fBllm\fR format is compact GOON/TOON text intended for agents; \fBraw\fR returns structured JSON suitable for \fBjq\fR\&. The server's response body is written to stdout verbatim regardless of format — no client-side decoding or re-encoding is performed. .PP Compatibility note: prior to this change, \fB--format raw\fR output was re-marshalled through the SDK's typed \fBOrbitQueryResult\fR struct (producing indented JSON). It is now the server's bytes verbatim (compact JSON). Pipe into \fBjq .\fR if you need indented output. .PP The graph DSL JSON Schema is served by \fBglab orbit remote tools\fR and is the source of truth for the body shape. See also \fBglab orbit remote schema\fR for the graph ontology. .PP For the full query language reference with examples, fetch the docs from the Knowledge Graph repository: .EX glab api "projects/gitlab-org%2Forbit%2Fknowledge-graph/repository/files/docs%2Fsource%2Fqueries%2Fquery_language.md?ref=main" | jq -r .content | base64 -d .EE .PP 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/. .SH OPTIONS \fB-f\fP, \fB--format\fP="llm" Response format: \fBllm\fR (compact, intended for agents) or \fBraw\fR (structured JSON). .PP \fB--hostname\fP="" GitLab hostname to query. Defaults to the current repository's host or \fBgitlab.com\fR\&. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .SH EXAMPLE .EX # 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 --format raw ./query.json .EE .SH SEE ALSO \fBglab-orbit-remote(1)\fP