Show related nodes for an entity in the knowledge graph
arc relate
command helps you explore relationships between different entities in the knowledge graph. It shows nodes that are connected to a specific entity, such as a commit, file, PR, or issue.
node
<type>:<id>
, where:
<type>
is the type of node (commit, file, pr, issue, etc.)<id>
is the identifier for that nodecommit:abc123
- A commit with hash abc123file:src/main.py
- A file at path src/main.pypr:123
- Pull request #123issue:456
- Issue #456Option | Description |
---|---|
--max-depth <depth> | Maximum depth to traverse in the knowledge graph (default: 2) |
--edge-types <types> | Comma-separated list of edge types to include |
--node-types <types> | Comma-separated list of node types to include |
--format <format> | Output format: text, json, or markdown (default: text) |
--output <file> | Write output to a file instead of stdout |
--debug | Enable debug logging |
Edge Type | Description |
---|---|
MODIFIES | A commit modifies a file |
MODIFIED_BY | A file is modified by a commit |
PART_OF | A commit is part of a PR |
REFERENCES | A PR references an issue |
AUTHORED_BY | A commit or PR is authored by a user |
REVIEWS | A user reviews a PR |
DEPENDS_ON | A file depends on another file |
Node Type | Description |
---|---|
commit | A Git commit |
file | A file in the repository |
pr | A pull request |
issue | An issue |
user | A user (author, reviewer, etc.) |
doc | A documentation file |
--max-depth
arc build
to ensure the knowledge graph is up to daterelate
command may take some time to execute. To improve performance:
arc build --incremental
relate
command