Metadata-Version: 2.4
Name: ReqScan
Version: 1.0.2
Summary: A dynamic requirements.txt builder that sifts through AST imports.
Author: turnt ducky
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# 🦆 ReqScan — Auto-generate `requirements.txt` in one command

> *"I got tired of manually tracking every import across every project. So I automated the suffering away."*

---

## 😤 The Problem

You know the drill. You've been smacking away on your keyboard for weeks. It's beautiful. It works. You're proud. Then someone says:

> *"Hey, can you send me the requirements?"*

And suddenly you're doing **archaeology** on your own code. Scrolling through 30 files. Squinting at imports. Trying to remember if you actually used `requests` or just thought about it. Manually checking versions. Forgetting one. Breaking their environment. Apologizing.

**No more.** Just `cd` in and run `reqscan`. Done.

---

## 🚀 Install

```bash
pip install reqscan
```

---

## ⚡ Usage

Navigate to your project and run:

```bash
reqscan
```

That's it. It scans the current directory, figures out what you actually imported, and writes a clean versioned `requirements.txt` right there.

You can also point it at a specific folder:

```bash
reqscan /path/to/my/project
```

And if you want to blow away an existing `requirements.txt` without being asked:

```bash
reqscan --overwrite
```

---

## 📋 Example Output

```
requirements.txt
────────────────
fastapi==0.111.0
httpx==0.27.0
pydantic==2.7.1
rich==13.7.1
uvicorn==0.29.0
```

Clean. Sorted. Versioned. Done.

---

## ✨ What It Does

- 🔍 **Recursively scans** your entire project tree for `.py` files
- 🧠 **Classifies imports** — filters out stdlib modules and local files so you don't end up with `os==3.11` in your requirements
- ⚡ **Parallel parsing** — uses multiprocessing to chew through large projects fast, with a live progress bar
- 🔄 **Non-destructive by default** — merges with your existing `requirements.txt` instead of nuking it
- 🚫 **Skips the junk** — ignores `venv`, `.venv`, `node_modules`, `__pycache__`, `build`, `dist`, and all the other folders we don't talk about
- 🪟 **Windows compatible** — ANSI colors work there too

---

## 🛠 Requirements

- Python 3.10+
- No third-party dependencies — reqscan is pure stdlib all the way down

---

## ⚠️ Caveats & Known Quirks

- **Dynamic imports** (`importlib.import_module(...)`, `__import__`) won't be detected — reqscan uses static AST analysis
- **Version detection** only works for packages installed in your current Python environment — run it from inside your virtualenv for best results
- Some packages import under a different name than their PyPI name (e.g., `import cv2` → `opencv-python`). reqscan resolves most of these via package metadata, but the occasional oddball may slip through

---

## 🤝 Contributing

Found a bug? Have a wild idea? PRs welcome. This started as a personal itch-scratcher, so there's plenty of room to grow.

---

## 📜 License

Do whatever you want with it. Just don't manually maintain a `requirements.txt` ever again. That's the only rule.

---

*Also available as a full interactive CLI — see [ReqScan Github](https://github.com/turntducky/reqscan) for the complete experience.*
