Quick Start¶
This guide walks from a fresh install to a fully wired agent integration in five steps.
Step 1: Install¶
Python 3.12+ is required. See Installation for extras and Redis setup.
Step 2: Ingest a repo¶
Point navegador at any local source tree:
On first run this builds the graph from scratch. Re-run anytime to pick up changes. Use --clear to wipe and rebuild:
Use --json to get a machine-readable summary of what was indexed:
Navegador walks the tree, parses every .py and .ts/.tsx file with tree-sitter, and writes nodes and edges for: files, modules, classes, functions, methods, imports, decorators, and call relationships.
Step 3: Query the graph¶
Explain anything by name — works for functions, classes, files, concepts, rules, and decisions:
navegador explain AuthService
navegador explain validate_token
navegador explain src/payments/processor.py
Search across code and knowledge together:
Inspect a function (callers, callees, decorators, source):
Inspect a class (hierarchy, methods, references):
Step 4: Add business knowledge¶
Code alone doesn't capture why. Add concepts, rules, and decisions and link them to code.
Add a concept:
navegador add concept "Idempotency" \
--desc "Operations that can be retried safely without side effects" \
--domain Payments
Add a rule:
navegador add rule "PaymentsMustBeIdempotent" \
--desc "All payment endpoints must handle duplicate submissions" \
--domain Payments \
--severity critical \
--rationale "Card networks retry on timeout; double-charging causes chargebacks"
Annotate code with a concept or rule:
navegador annotate process_payment \
--type Function \
--concept Idempotency \
--rule PaymentsMustBeIdempotent
Add a decision:
navegador add decision "UseStripeForPayments" \
--desc "Stripe is the primary payment processor" \
--domain Payments \
--rationale "Best fraud tooling for SaaS" \
--alternatives "Braintree, Adyen" \
--date 2025-01-15 \
--status accepted
Now navegador explain process_payment returns code structure and the rules that govern it.
Step 5: Wire an agent hook¶
Use the bootstrap script to ingest your repo and install the hook for your AI coding assistant in one command:
Options:
| Flag | Effect |
|---|---|
--repo owner/repo |
GitHub repo to clone + ingest |
--wiki |
Also ingest the GitHub wiki |
--agent claude |
Install .claude/hooks/claude-hook.py |
--agent gemini |
Install .gemini/hooks/gemini-hook.py |
--agent openai |
Install openai-hook.py + openai-tools.json |
After bootstrap, every file the agent edits triggers a re-ingest so the graph stays in sync. See Agent Hooks for manual setup and the NAVEGADOR.md template.