Skip to main content

orbit-cli

Index and query a local checkout offline with the Orbit CLI (`orbit`, or `glab orbit`). Reach for it when a question names a symbol or spans code structure. Examples: who calls or extends this, where it is defined, what a file defines, how definitions are distributed. One call replaces many file reads and text greps, including matches in config, templates, and docs. Works on the working tree and unpushed branches. Not a fit: reading one known file, or hosted GitLab data (use the `orbit` skill).

소스 정보

저장소
gitlabhq/orbit-knowledge-graph
최근 소스 활동
2026년 10월 23일 12:41
감지된 SKILL.md 언어
영어
스타
57
포크
15

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
4 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
orbit-cli
description
Index and query a local checkout offline with the Orbit CLI (`orbit`, or `glab orbit`). Reach for it when a question names a symbol or spans code structure. Examples: who calls or extends this, where it is defined, what a file defines, how definitions are distributed. One call replaces many file reads and text greps, including matches in config, templates, and docs. Works on the working tree and unpushed branches. Not a fit: reading one known file, or hosted GitLab data (use the `orbit` skill).
version
0.24.1
license
MIT
compatibility
Requires the Orbit CLI (directly or through glab); local indexing needs filesystem access to the checkout.
metadata
{"audience":"developers","keywords":"orbit, orbit-cli, orbit-local, knowledge-graph, code-graph, duckdb, sql, repo-map","workflow":"ai","source-project":"gitlab-org/orbit/knowledge-graph","source-path":"skills/orbit-cli"}
# Orbit local CLI skill The local CLI parses a checkout into a DuckDB property graph. `grep` finds every matching line in code, tests, config, and docs, labeled with its enclosing definition. `context` reads their source and relationships. `sql` runs read-only aggregations. `repo-map` orients you at the directory level. For production data, use the `orbit` skill. The binary is `orbit`, or `glab orbit` through the wrapper. In non-interactive shells, put glab's `--yes` before the subcommand so glab skips its install and run prompts: `glab orbit --yes sql "..."`. The binary rejects `--yes` after other subcommands. Only `setup` and `uninstall` take their own `--yes` (`glab orbit --yes setup --yes`). Run `orbit <command> --help` before you guess a flag. Run `orbit skills` to list available skills. Use `orbit skills get orbit [path]` to print the composed skill (`SKILL.md` by default), or specify a path to print a file from the skill tree. Wrapper details: [`references/local/cli.md`](references/local/cli.md). ## Fix inaccurate guidance If guidance is wrong or outdated (command, flag, or behavior), tell the user. With their confirmation, open a focused MR against `metadata.source-project` fixing `metadata.source-path` (one fix per MR, Conventional Commits). If they decline, note the discrepancy in one line and continue with the corrected command. ## Find, then read ```shell orbit index . orbit grep "rate limit" src --kind Method,Function orbit grep 'query_arrow|insert_batch|execute' crates/duckdb-client orbit context duckdb_client::search::DuckDbSearch::grep src/lib.rs:120-180 crates/duckdb-client ``` Quote `a|b|c` for OR alternatives. Plain words ignore case, `_`, and `-`; terms with regex characters match as regex. Each file is one row: matching lines are grouped under their enclosing definition as `Kind name:start-end`, followed by `←callers` and `→callees`. Files that define a term come first, then code, tests, and config or docs. A definition the query names prints first with its source. The usual rg and grep flags work: `-A`/`-B`/`-C`, `-l`, `-c`, `-w`, `-F`, `-g`. `--kind` takes definition kinds such as `Class,Method`. `--kind File` and `--kind Directory` list where the matches are, with their definitions. Pass names as printed by `grep`, paths, ranges, or directories to `context`. Definition targets show full source and indexed relationships. File targets show a compact map and at most ten connections per section, with omitted counts. `<--` is a caller and `-->` is a callee. Reuse the returned source. <!-- orbit:section quick-start --> ## Query and map ```shell orbit schema gl_definition orbit sql "SELECT definition_type, count(*) n FROM gl_definition GROUP BY 1 ORDER BY n DESC" orbit repo-map overview # then tree, api, class, extends, imports ``` <!-- /orbit:section --> Gotchas: - Queries are SQL against `gl_definition`, `gl_edge`, `gl_file`, `gl_directory`, and `gl_imported_symbol`. They are not the JSON DSL, which belongs to Orbit Remote. - `definition_type` values are capitalized. `WHERE definition_type='function'` returns zero rows. - `sql` queries all indexed revisions by default. Use `--repo .` for the current checkout revision, or `--db PATH` for one file. Index a commit before querying it. ## References | Topic | Location | |---|---| | CLI wrapper flags, config keys, pass-through args | [`references/cli.md`](references/local/cli.md) | | DuckDB tables and paste-ready SQL recipes | [`references/sql.md`](references/local/sql.md) | | Repository-map workflow (`orbit repo-map`) | [`references/repo_map.md`](references/local/repo_map.md) |
GitHub에서 보기