Loading Context¶
These commands retrieve structured context from the graph. All commands support --format json for machine-readable output (useful in agent tool definitions) and default to rich terminal output.
explain — universal lookup¶
explain is the single command for "what is this thing?" It works for any node type: functions, classes, files, concepts, rules, decisions, and domains.
navegador explain AuthService
navegador explain validate_token
navegador explain src/auth/service.py
navegador explain PaymentsMustBeIdempotent
Output includes: - Node type, name, and properties - Source location and docstring (for code nodes) - Related knowledge (concepts, rules, decisions) via ANNOTATES edges - Related code (for knowledge nodes) that implements or is governed by the node
navegador explain AuthService --format json
navegador explain AuthService --file src/auth/service.py # disambiguate by file
context — file contents¶
Returns everything navegador knows about a file: the file node, its modules, classes, functions, imports, and their relationships.
navegador context src/auth/service.py
navegador context src/auth/service.py --format json
navegador context src/auth/service.py --format markdown
Useful as a pre-edit context load: give the agent the full graph context for a file before it starts editing.
function — call graph view¶
Returns a function node with its callers, callees, decorators, containing class, and source.
navegador function validate_token
navegador function validate_token --file src/auth/service.py
navegador function validate_token --depth 2
navegador function validate_token --format json
--depth controls how many hops of the call graph to traverse (default: 1). At depth 2, you get callers-of-callers and callees-of-callees.
class — hierarchy and references¶
Returns a class node with its methods, base classes, subclasses, and references from other files.
navegador class PaymentProcessor
navegador class PaymentProcessor --file src/payments/processor.py
navegador class PaymentProcessor --format json
Output includes: - Class properties (file, line, docstring) - Methods with signatures - INHERITS chain (parents and children) - IMPLEMENTS edges (for abstract base classes / interfaces) - Files that import or reference this class
concept — knowledge + implementing code¶
Returns a concept node with its rules, linked wiki pages, and annotated code nodes.
Output includes: - Concept description and domain - Rules in the same domain that reference this concept - WikiPage nodes linked via DOCUMENTS - All code nodes (functions, classes, files) annotated with this concept via ANNOTATES edges
domain — everything in a domain¶
Returns a domain and all nodes belonging to it: concepts, rules, decisions, people, and code annotated via those knowledge nodes.
Useful for onboarding: a new contributor can run navegador domain Payments to get the full business context before reading any code.
search — text search across the graph¶
By default, searches function and class names. Flags expand the scope:
| Flag | What it searches |
|---|---|
| (default) | Function, class, method names |
--all |
Names + docstrings + knowledge layer (concepts, rules, decisions, wiki) |
--docs |
Docstrings and wiki page content only |
--limit N |
Max results (default: 20) |
--format json |
JSON output |
Examples:
# find anything about rate limiting, anywhere
navegador search "rate limit" --all
# find code with docstrings mentioning retry logic
navegador search "retry" --docs
# search with a higher limit
navegador search "auth" --all --limit 50 --format json
decorated — find by decorator¶
Find all functions and classes that use a specific decorator:
navegador decorated login_required
navegador decorated pytest.mark.parametrize
navegador decorated --format json login_required
Returns function/class nodes with their file paths, line numbers, and the full decorator expression.