正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。

Use Orbit with the GitLab CLI (glab)

  • Tier: Premium, Ultimate
  • Offering: GitLab.com
  • Status: Experiment

The availability of this feature is controlled by a feature flag. For more information, see the history. This feature is available for testing, but not ready for production use.

このページには、今後リリース予定の製品や機能に関する情報が記載されています。重要な注意点として、ここで提供される内容は情報提供のみを目的としています。この情報のみに基づいて購入や計画に関する判断を行うことはお控えください。製品や機能の開発、リリース、提供時期は変更または遅延する可能性があり、GitLab Inc.の単独の裁量によって決定されます。

The GitLab CLI (glab) is the canonical way to set up and query Orbit from the command line.

Two top-level commands:

  • glab orbit remote: typed subcommands that call the Orbit Remote REST API. Available in glab 1.94 or later.
  • glab orbit setup: one-command install of the Orbit skill and MCP config for your AI agent. Planned for a future glab release. Until it ships, configure your MCP client manually.

Prerequisites

  • Orbit is enabled on your group.

  • glab is installed and authenticated:

    glab auth login
  • Your user has access to at least one top-level group with Orbit enabled.

Set up your AI agent

glab orbit setup is planned for a future glab release. When it ships, one command will install the Orbit skill and write the MCP config for your AI agent (Claude Code, OpenCode, Cursor, Codex, Gemini CLI).

Until it ships, configure your MCP client manually.

Query Orbit from the command line

Use glab orbit remote (or the r alias) to call the Orbit Remote API directly. Useful for scripting, debugging, and exploring the schema before writing queries. Requires glab 1.94 or later.

SubcommandEndpointPurpose
glab orbit remote statusGET orbit/statusCluster health.
glab orbit remote schema [node...]GET orbit/schemaGraph ontology. Positional args expand specific nodes.
glab orbit remote toolsGET orbit/toolsMCP tool manifest with the full DSL JSON Schema.
glab orbit remote query [file|-]POST orbit/queryRun a query from a file or stdin.
glab orbit remote graph-statusGET orbit/graph_statusIndexing progress for a namespace, project, or full path.

Discover the schema

glab orbit remote status
glab orbit remote schema
glab orbit remote schema MergeRequest Project
glab orbit remote tools

Run a query

echo '{"query":{"query_type":"traversal","node":{"id":"p","entity":"Project","filters":{"full_path":{"op":"starts_with","value":"your-group/"}}},"limit":5}}' \
  | glab orbit remote query -

The --format flag maps to the body’s response_format:

  • --format llm - compact text optimized for AI agent consumption.
  • --format raw - structured JSON, suitable for piping to jq.

If --format is unset, the body’s response_format wins, with llm as the final fallback.

Check indexing progress

Pass exactly one scope flag:

glab orbit remote graph-status --full-path gitlab-org/gitlab
glab orbit remote graph-status --namespace-id 24
glab orbit remote graph-status --project-id 2

Exit codes

glab orbit remote maps HTTP errors to stable exit codes so scripts and agents can branch on them without parsing stderr.

StatusExit codeMeaning
2000Success.
4042knowledge_graph feature flag is off, or path typo.
4013Missing or expired token.
4034No Knowledge Graph enabled namespaces available.
4295Rate limited. Inspect Retry-After and back off.
Other1Unstructured error. Response body, if any, is included.

Billing

glab orbit remote query consumes GitLab Credits the same way as MCP queries. status, schema, tools, and graph-status calls are free.