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
To narrow down the directories or files included in the graph, specify the paths or parts of the paths using either the argument or the `--include` option.
@@ -434,6 +391,49 @@ flowchart LR
434
391
435
392
It makes it easier to share problems within the team. 👍
436
393
394
+
### For AI Agents
395
+
396
+
When using TypeScript Graph with AI agents, the `--stdout` option provides structured output that's easy to parse and analyze:
397
+
398
+
```bash
399
+
# Analyze codebase architecture and get both dependency graph and metrics
400
+
tsg --stdout
401
+
402
+
# Get only code metrics for quality assessment
403
+
tsg --stdout metrics
404
+
405
+
# Get only dependency relationships for architecture analysis
406
+
tsg --stdout deps
407
+
```
408
+
409
+
**Example prompts for AI agents:**
410
+
411
+
```
412
+
Analyze this TypeScript codebase architecture:
413
+
$(tsg --stdout deps)
414
+
415
+
Identify circular dependencies and suggest refactoring strategies.
416
+
```
417
+
418
+
```
419
+
Review code quality metrics:
420
+
$(tsg --stdout metrics)
421
+
422
+
Identify files with low maintainability index and high complexity that need refactoring.
423
+
```
424
+
425
+
```
426
+
Full codebase analysis:
427
+
$(tsg --stdout)
428
+
429
+
Provide architectural insights and code quality recommendations.
430
+
```
431
+
432
+
```
433
+
Review code quality for changes in the current branch:
This is a beta feature for measuring code metrics such as the Maintainability Index, Cyclomatic Complexity, and Cognitive Complexity. While these metrics are widely recognized, their reliability in TypeScript-specific contexts is not guaranteed. Nonetheless, they can serve as helpful indicators for evaluating code quality.
To narrow down the directories or files included in the graph, specify the paths or parts of the paths using either the argument or the `--include` option.
@@ -434,6 +391,49 @@ flowchart LR
434
391
435
392
It makes it easier to share problems within the team. 👍
436
393
394
+
### For AI Agents
395
+
396
+
When using TypeScript Graph with AI agents, the `--stdout` option provides structured output that's easy to parse and analyze:
397
+
398
+
```bash
399
+
# Analyze codebase architecture and get both dependency graph and metrics
400
+
tsg --stdout
401
+
402
+
# Get only code metrics for quality assessment
403
+
tsg --stdout metrics
404
+
405
+
# Get only dependency relationships for architecture analysis
406
+
tsg --stdout deps
407
+
```
408
+
409
+
**Example prompts for AI agents:**
410
+
411
+
```
412
+
Analyze this TypeScript codebase architecture:
413
+
$(tsg --stdout deps)
414
+
415
+
Identify circular dependencies and suggest refactoring strategies.
416
+
```
417
+
418
+
```
419
+
Review code quality metrics:
420
+
$(tsg --stdout metrics)
421
+
422
+
Identify files with low maintainability index and high complexity that need refactoring.
423
+
```
424
+
425
+
```
426
+
Full codebase analysis:
427
+
$(tsg --stdout)
428
+
429
+
Provide architectural insights and code quality recommendations.
430
+
```
431
+
432
+
```
433
+
Review code quality for changes in the current branch:
This is a beta feature for measuring code metrics such as the Maintainability Index, Cyclomatic Complexity, and Cognitive Complexity. While these metrics are widely recognized, their reliability in TypeScript-specific contexts is not guaranteed. Nonetheless, they can serve as helpful indicators for evaluating code quality.
@@ -536,7 +536,7 @@ You can monitor file changes in real time and display metrics such as the Mainta
The values in `()` represent the difference from when monitoring started. Improvements are displayed in green, while regressions are shown in red. Whether an increase or decrease is better depends on the metric. The following table outlines the preferred directions for each metric:
0 commit comments