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

Use Orbit Local with the GitLab CLI (glab)

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

The GitLab CLI (glab) is the canonical way to install, run, and integrate Orbit Local with your AI agent. glab orbit local mirrors glab orbit remote, so the same patterns work whether you query the GitLab instance or your local machine.

Both glab orbit local and glab orbit setup are planned for a future glab release. Every command on this page is the future shape, not the current one. Until they ship, build from source - see use orbit directly.

Two top-level commands (both planned, not yet shipped):

  • glab orbit setup: install the Orbit skill and point your AI agent at the local graph.
  • glab orbit local: typed subcommands that wrap the orbit binary. Includes glab orbit local mcp serve to run Orbit Local as an MCP server.

Prerequisites

  • glab is installed and authenticated:

    glab auth login
  • A local Git repository to index.

No GitLab account or network connection is required to use glab orbit local once the binary is installed.

Set up your AI agent

glab orbit setup is planned, not yet shipped. Until it ships, configure your MCP client manually.

Once shipped, glab orbit setup will install the Orbit skill and write the MCP config in one command. It prompts for Local or Remote and auto-detects your agent.

glab orbit setup
# Pick "Local" when prompted to point the MCP config at your local graph.

Supported agents: Claude Code, OpenCode, Cursor, Codex, Gemini CLI.

FlagPurpose
--agent=<name>Override auto-detection.
--skill-onlyInstall the skill files only; skip MCP config.
--mcp-onlyWrite MCP config only; skip skill install.
--dry-runPrint what would change without writing anything.

The MCP config points at orbit mcp serve instead of the remote endpoint. Your agent can call query_graph and get_graph_schema against the local DuckDB graph.

Index a repository

glab orbit local index /path/to/your/repo
FlagPurpose
--threadsWorker thread count. 0 (default) auto-detects from CPU cores.
--statsInclude detailed statistics in the JSON output.
--verboseVerbose logging to stderr.

Run a query

echo '{"query_type":"traversal","node":{"id":"d","entity":"Definition","columns":["name","definition_type"],"filters":{"definition_type":"Method"}},"limit":10}' \
  | glab orbit local query -

Pass a file path or - for stdin. The query language is identical to Orbit Remote.

FlagPurpose
--format llmCompact text optimized for AI agent consumption.
--format rawStructured JSON, suitable for piping to jq.

Inspect the schema

glab orbit local schema
glab orbit local schema --expand Definition File
glab orbit local schema --query

Run as an MCP server

Expose the local graph to any MCP-compatible AI agent:

glab orbit local mcp serve

This serves query_graph and get_graph_schema over the MCP protocol against ~/.orbit/graph.duckdb. See Connect via MCP for the full agent integration guide.

List indexed repositories

glab orbit local status

Shows which repositories are present in the local graph, their indexing state, and the database path.

Exit codes

glab orbit local maps errors to stable exit codes so scripts and agents can branch on them.

StatusExit codeMeaning
Success0Command completed.
No graph2~/.orbit/graph.duckdb not found. Run index first.
Bad query4Query DSL failed validation or compilation.
Other1Unstructured error. Stderr contains details.

Billing

Orbit Local does not consume GitLab Credits. All processing is local.