-
Notifications
You must be signed in to change notification settings - Fork 0
query command
Arham-Qureshi edited this page Jul 21, 2026
·
1 revision
Shows all dependencies (outbound edges) and dependents (inbound edges) for a given file in your project.
codebase-vis query <target>
- Resolves the target using fuzzy partial-name matching
- If multiple nodes match, shows an interactive selector
- Loads the graph from
graph.json - Prints all outbound edges (what this file imports) and inbound edges (what imports this file)
| Color | Symbol | Node Type |
|---|---|---|
| Cyan | ● |
Local file |
| Yellow | ◆ |
External package (npm, etc.) |
| Magenta | ◇ |
Entity (class, function, method) |
query uses case-insensitive partial matching. If the exact path isn't found, it searches all node keys and labels for matches. If multiple nodes match, you get an interactive picker:
$ codebase-vis query cache
? Multiple matches, pick one: (Use arrow keys)
❯ src/utils/cache.js
src/utils/cache.js::loadCache
src/utils/cache.js::saveCacheThe selector is capped at 25 matches.
# Query a file by full path
codebase-vis query src/utils/cache.js
# Query by partial name
codebase-vis query cache
# Query an entity
codebase-vis query "cache.js::loadCache"
# Query by visual label
codebase-vis query "loadCache"- Run
codebase-vis generatefirst —queryreads from the existinggraph.json - Parallel edges (multiple edges between the same two nodes in a multi-graph) are deduplicated in the output
- Useful for answering "what does this file depend on?" and "what depends on this file?" without opening the browser