# DepTrace 🌳  
**Visualize why a dependency is in your Node.js project**  

[![License](https://img.shields.io/npm/l/deptrack)](LICENSE)
[![npm](https://img.shields.io/npm/v/deptrack)](https://npmjs.com/package/deptrack)
<!-- ![CI](https://github.com/yourusername/deptrack/actions/workflows/test.yml/badge.svg) -->

Tired of digging through `npm explain` or `yarn why`? **DepTrace** generates an interactive dependency tree to show:  
- **Why** a package is installed  
- **Which** parent dependencies brought it in  
- **How** versions were resolved  

![Demo GIF](demo.gif) *(Example: `npx deptrace lodash`)*  

```bash
npx deptrace <package-name>  # Try it now!
```

## Why DepTrace?  
🔍 **Debug faster** – No more guessing why `left-pad` is in your `node_modules`.  
🌳 **Visual tree** – Understand complex dependency chains at a glance.  
⚡ **Zero-config** – Works locally without external servers.  

## Usage  
1. Run in any Node.js project:  
   ```bash
   npx deptrace lodash
   ```  
2. Opens an interactive tree in your browser.  

### Flags  
| Flag           | Description                     |  
|----------------|---------------------------------|  
| `--depth=5`    | Limit tree depth (default: ∞)   |  
| `--dev`        | Include devDependencies         |  

## Use Cases  
- 🛡️ Audit security vulnerabilities  
- 📦 Reduce bundle size by finding unnecessary deps  
- 🧠 Learn how your dependency graph works  

## Roadmap  
- [ ] Support for `pnpm` and `bun`  
- [ ] GitHub Action for CI/CD dependency checks  

## Contributing  
PRs welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).  

---

📜 **License**: MIT  
🐛 **Report Issues**: [GitHub Issues](https://github.com/yourusername/deptrace/issues)  
✨ **Star This Project**: [![GitHub Stars](https://img.shields.io/github/stars/yourusername/deptrace?style=social)](https://github.com/yourusername/deptrace)