Verified Commit 3e106b14 authored by Dmitry Gruzd's avatar Dmitry Gruzd 2️⃣ Committed by GitLab
Browse files

docs(skill): document glab orbit local in orbit skill

parent 3a257a1e
Loading
Loading
Loading
Loading
+27 −2
Original line number Diff line number Diff line
---
name: orbit
description: Query the GitLab Knowledge Graph (Orbit) via the typed `glab orbit remote` CLI subcommands. Use for code-structure questions (who calls this function, where is this symbol defined), cross-project dependency and blast-radius analysis, merge-request and contributor queries, and any question answerable by traversing GitLab's unified entity graph (projects, users, MRs, issues, pipelines, files, definitions, vulnerabilities).
version: 0.5.0
description: Query the GitLab Knowledge Graph (Orbit) via `glab orbit remote` CLI subcommands or run a local copy with `glab orbit local`. Use for code-structure questions (who calls this function, where is this symbol defined), cross-project dependency and blast-radius analysis, merge-request and contributor queries, and any question answerable by traversing GitLab's unified entity graph (projects, users, MRs, issues, pipelines, files, definitions, vulnerabilities).
version: 0.6.0
license: MIT
metadata:
  audience: developers
@@ -75,6 +75,31 @@ and `max_hops` are capped at 3 server-side.
| Full DSL reference | [`references/query_language.md`](references/query_language.md) |
| Paste-ready bodies per `query_type` | [`references/recipes.md`](references/recipes.md) |
| CLI exit codes (1-5) and common errors | [`references/troubleshooting.md`](references/troubleshooting.md) |
| `glab orbit local` install, update, config, and usage | [`references/local_cli.md`](references/local_cli.md) |

## Local CLI (glab orbit local)

`glab orbit local` downloads and runs a managed Orbit CLI binary for indexing
and querying a local copy of the Knowledge Graph. Key commands:

```bash
glab orbit local             # install (first run) and run
glab orbit local --install   # install only
glab orbit local --update    # update to latest compatible version
```

**Supported platforms:** macOS and Linux only (x86_64/aarch64; no Windows).

### When to prefer `glab orbit local` vs `glab orbit remote`

| Scenario | Recommended |
|---|---|
| Query the production GitLab Knowledge Graph | `glab orbit remote` |
| Index a local repository for offline analysis | `glab orbit local` |
| Use a custom or pre-built binary instead of the managed one | Set `orbit_local_binary_path` / `GLAB_ORBIT_LOCAL_BINARY_PATH` |

See [`references/local_cli.md`](references/local_cli.md) for full config keys,
pass-through args, and usage examples.

## Contributing

+70 −0
Original line number Diff line number Diff line
# `glab orbit local` reference

`glab orbit local` downloads, installs, and runs the Orbit local CLI binary
(project: `gitlab-org/orbit/knowledge-graph`, package: `orbit-local`). The binary
is managed for you — verified, cached in `<config-dir>/bin/orbit`, and kept up to
date automatically.

**Supported platforms:** macOS and Linux (x86_64 and aarch64). Windows is not
supported (the binary is not published for Windows).

See [`SKILL.md`](../SKILL.md) for a quick summary and when to prefer `local` over
`remote`.

## First run / install

```bash
# Download and install the managed binary, then run it
glab orbit local

# Install only (do not run)
glab orbit local --install

# Skip all confirmation prompts (for CI/scripts)
glab orbit local --install --yes
```

## Update

```bash
# Check for and install the latest compatible version
glab orbit local --update
```

`--install` and `--update` are mutually exclusive; passing both returns an error.

## Pass-through args

All arguments that are not `--install`, `--update`, `--yes`/`-y`, or `--help` are
passed directly to the Orbit local binary:

```bash
glab orbit local <subcommand> [flags...]
glab orbit local --help           # shows this glab wrapper's help
glab orbit local help             # shows the orbit binary's top-level help
glab orbit local index --help     # shows orbit's help for the 'index' subcommand
```

> **Note:** `glab orbit local -- --help` does **not** show orbit's help. glab forwards
> `--` and `--help` as-is, but orbit's argument parser treats `--` as end-of-flags and
> then sees `--help` as an unknown subcommand name, resulting in an error. Use
> `glab orbit local help` instead.

## Configuration

| Config key | Env var | Purpose |
|---|---|---|
| `orbit_local_auto_run` | — | When `true`, skip the "Run the Orbit local CLI?" confirmation prompt. |
| `orbit_local_auto_download` | — | When `true`, skip the "Download the binary?" confirmation prompt. |
| `orbit_local_binary_path` | `GLAB_ORBIT_LOCAL_BINARY_PATH` | Use a custom/local binary instead of the managed one. Skips download, version checks, and updates. |
| `orbit_local_binary_version` | — | (managed by glab) Installed version; used to detect when updates are available. |
| `orbit_local_binary_checksum` | — | (managed by glab) Checksum of the installed binary for integrity verification. |
| `orbit_local_last_update_check` | — | (managed by glab) Timestamp of the last background update check. |

Set config keys via `glab config set`:

```bash
glab config set orbit_local_auto_run true
glab config set orbit_local_auto_download true
glab config set orbit_local_binary_path /path/to/custom/orbit
```