Use Orbit Local with the Orbit CLI (orbit)
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
- Status: Experiment
The Orbit CLI (orbit) builds a code graph for any local repository and queries it
against a local DuckDB file. No GitLab connection required.
Orbit Local is experimental. Until packaged binaries ship,
you must build from source. The packaged install path will be glab orbit local.
Prerequisites
- Rust toolchain (stable)
misefor tool management- A local Git repository to index
Install
Build from source:
git clone https://gitlab.com/gitlab-org/orbit/knowledge-graph.git
cd knowledge-graph
mise install
mise run build:cliThe compiled binary is at target/release/orbit. Add it to your PATH or
invoke it directly.
Index a repository
orbit index /path/to/your/repoOrbit parses the repository and writes a DuckDB graph to ~/.orbit/graph.duckdb.
You can index multiple repositories. Each is scoped by project ID and branch
in the manifest table.
| Flag | Purpose |
|---|---|
--threads |
Worker thread count. 0 (default) auto-detects from CPU cores. |
--stats |
Include detailed statistics in the JSON output. |
--verbose |
Verbose logging to stderr. |
Inspect the schema
orbit schema
orbit schema --raworbit schema reads information_schema.columns from the local DuckDB
and prints every table and column. Pass --raw for JSON output.
Run SQL against the local graph
orbit sql 'SELECT count(*) FROM gl_definition'
orbit sql -F json 'SELECT name FROM gl_definition LIMIT 3'
echo 'SELECT 1+1' | orbit sql -
orbit sql --file query.sql| Flag | Purpose |
|---|---|
-F, --format |
table (default), json, ndjson, or csv. |
-f, --file |
Read the SQL from a file. |
--db |
Override the DuckDB path. Defaults to ~/.orbit/graph.duckdb. |
Storage
The graph is stored at ~/.orbit/graph.duckdb. Multiple repositories share
the same database. Delete the file to start over.
Billing
Orbit Local does not consume GitLab Credits. All processing is local.
What to try next
- Connect via MCP - expose the local graph to Claude Code or Codex.
- Use Orbit Local with glab - call the CLI through
glab orbit local. - Schema reference - available node types and properties.
- Cookbook - copy-paste queries for common use cases.