CtrlK
BlogDocsLog inGet started
Tessl Logo

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. Works on the working tree and unpushed branches. Not a fit: text or config search, reading one known file, or hosted GitLab data (use the `orbit` skill).

SKILL.md
Quality
Evals
Security

Orbit local CLI skill

The local CLI parses a checkout into a DuckDB property graph. grep finds definitions. 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. Add --yes in non-interactive shells. Run orbit <command> --help before you guess a flag. Run orbit skills to read this skill; it lists additional skill trees afterward when any are available. Use orbit skills get orbit [path] to read a file from this tree. The path defaults to SKILL.md.

Wrapper details: references/local/cli.md.

Find, then read

orbit index .
orbit grep "rate limit" --path src --kind Method,Function
orbit context Definition:<id>          # or one file path

grep returns Definition:<id> references. Pass them to context. Definition targets list connections by edge kind: <-- is a caller, --> is a callee. Connections from test, fixture, and generated files are hidden but counted, and --tests shows them. Reuse the returned source. Never truncate Orbit output.

Query and map

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

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.
  • The graph holds every indexed checkout. sql scopes to the current commit, and --all spans them all. Re-index after you check out a different commit.

References

TopicLocation
CLI wrapper flags, config keys, pass-through argsreferences/cli.md
DuckDB tables and paste-ready SQL recipesreferences/sql.md
Repository-map workflow (orbit repo-map)references/repo_map.md
Repository
gitlabhq/orbit-knowledge-graph
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.