# TypeFlow - CLI Type Dependency Tracer
A CLI tool that traces TypeScript/JavaScript type dependencies through a codebase, visualizing type propagation, detecting type widening/narrowing issues, and identifying circular type dependencies.
## Features
- **Type Dependency Graph Visualization**: Generate visual dependency graphs showing how types relate to each other
- **Circular Dependency Detection**: Detect circular type dependencies that could cause issues
- **Type Widening Analysis**: Identify type widening issues like large unions, intersections, and use of `any`
- **Type Narrowing Analysis**: Detect excessive type narrowing and complex conditional types
- **Multiple Export Formats**: Export graphs to DOT, GraphML, or JSON formats
- **Watch Mode**: Monitor files for changes and incrementally analyze
- **CLI Interface**: Easy-to-use command-line interface with Commander.js
## Installation
```bash
npm install
npm run build
```
## Usage
### Analyze a directory
```bash
typeflow analyze ./src
```
### Analyze and export to DOT
```bash
typeflow analyze ./src -o output.dot -f dot
```
### Analyze and export to GraphML
```bash
typeflow analyze ./src -o output.graphml -f graphml
```
### Watch for changes
```bash
typeflow watch ./src
```
### Check for issues only
```bash
typeflow check ./src
```
### Initialize a config file
```bash
typeflow init
```
## Commands
| Command | Description |
|---------|-------------|
| `analyze [path]` | Analyze type dependencies |
| `watch [path]` | Watch files and incrementally analyze |
| `export