You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLI_Commands.md
+67-9Lines changed: 67 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,19 @@
3
3
4
4
Here is the **complete list** of all CLI commands available in `CodeGraphContext`, categorized by workflow scenario.
5
5
6
+
## Global Flags
7
+
8
+
These flags can be used with any command:
9
+
10
+
| Flag | Aliases | Description |
11
+
| :--- | :--- | :--- |
12
+
|**`--visual`**|`--viz`, `-V`| Shows results as an interactive graph visualization in your browser. Works with analyze, find, and query commands. |
13
+
|**`--database`**|`-d`| Temporarily override the database backend (`falkordb` or `neo4j`) for any command. |
14
+
|**`--version`**|`-v`| Show version and exit. |
15
+
|**`--help`**|`-h`| Show help and exit. |
16
+
17
+
> **Note:** The visual flag uses uppercase `-V` to avoid conflict with `-v` which is reserved for `--version`.
18
+
6
19
## 1. Project Management
7
20
Use these commands to manage the repositories in your code graph.
8
21
@@ -29,22 +42,23 @@ Understand the structure, quality, and relationships of your code.
29
42
30
43
| Command | Arguments | Description |
31
44
| :--- | :--- | :--- |
32
-
|**`cgc analyze calls`**|`<func_name>` <br> `--file`| Shows **outgoing** calls: what functions does this function call? |
33
-
|**`cgc analyze callers`**|`<func_name>` <br> `--file`| Shows **incoming** calls: who calls this function? |
34
-
|**`cgc analyze chain`**|`<start> <end>` <br> `--depth`| Finds the call path between two functions. Default depth is 5. |
35
-
|**`cgc analyze deps`**|`<module>` <br> `--no-external`| Inspects dependencies (imports and importers) for a module. |
36
-
|**`cgc analyze tree`**|`<class_name>` <br> `--file`| Visualizes the Class Inheritance hierarchy for a given class. |
45
+
|**`cgc analyze calls`**|`<func_name>` <br> `--file`<br> `--visual`| Shows **outgoing** calls: what functions does this function call? Use `--visual` or `-V` for graph view.|
46
+
|**`cgc analyze callers`**|`<func_name>` <br> `--file`<br> `--visual`| Shows **incoming** calls: who calls this function? Use `--visual` or `-V` for graph view.|
47
+
|**`cgc analyze chain`**|`<start> <end>` <br> `--depth`<br> `--visual`| Finds the call path between two functions. Default depth is 5. Use `--visual` or `-V` for graph view. |
48
+
|**`cgc analyze deps`**|`<module>` <br> `--no-external`<br> `--visual`| Inspects dependencies (imports and importers) for a module. Use `--visual` or `-V` for graph view. |
49
+
|**`cgc analyze tree`**|`<class_name>` <br> `--file`<br> `--visual`| Visualizes the Class Inheritance hierarchy for a given class. Use `--visual` or `-V` for graph view. |
37
50
|**`cgc analyze complexity`**|`[path]` <br> `--threshold` <br> `--limit`| Lists functions with high Cyclomatic Complexity. Default threshold: 10. |
38
51
|**`cgc analyze dead-code`**|`--exclude`| Finds potentially unused functions (0 callers). Use `--exclude` for decorators. |
52
+
|**`cgc analyze overrides`**|`<func_name>` <br> `--visual`| Finds all implementations of a function across different classes. Use `--visual` or `-V` for graph view. |
39
53
40
54
## 4. Discovery & Search
41
55
Find code elements when you don't know the exact structure.
42
56
43
57
| Command | Arguments | Description |
44
58
| :--- | :--- | :--- |
45
-
|**`cgc find name`**|`<name>` <br> `--type`| Finds code elements (Class, Function) by their **exact** name. |
46
-
|**`cgc find pattern`**|`<pattern>` <br> `--case-sensitive`| Finds elements using fuzzy substring matching (e.g. "User" finds "UserHelper"). |
47
-
|**`cgc find type`**|`<type>` <br> `--limit`| Lists all nodes of a specific type (e.g. `function`, `class`, `module`). |
59
+
|**`cgc find name`**|`<name>` <br> `--type`<br> `--visual`| Finds code elements (Class, Function) by their **exact** name. Use `--visual` or `-V` for graph view. |
60
+
|**`cgc find pattern`**|`<pattern>` <br> `--case-sensitive`<br> `--visual`| Finds elements using fuzzy substring matching (e.g. "User" finds "UserHelper"). Use `--visual` or `-V` for graph view. |
61
+
|**`cgc find type`**|`<type>` <br> `--limit`<br> `--visual`| Lists all nodes of a specific type (e.g. `function`, `class`, `module`). Use `--visual` or `-V` for graph view. |
48
62
49
63
## 5. Configuration & Setup
50
64
Manage your environment and database connections.
@@ -65,7 +79,7 @@ Helper commands for developers and the MCP server.
0 commit comments