A dynamic directory tree generator that skips the junk by default.
Project description
๐ฆ nestscan โ Pretty Directory Trees in One Command
"Because sometimes you just need to see what's actually in a folder without losing your mind."
๐ Install
pip install nestscan
โก Usage
Navigate to any folder and run:
nestscan
It prints a clean, readable tree of your current directory โ sorted, structured, color-coded, and easy on the eyes.
You can also point it anywhere:
nestscan /path/to/my/project
๐ All Options
| Flag | Description |
|---|---|
path |
Target directory to scan (default: current directory) |
-o, --output |
Save the tree to a text file (e.g., -o tree.txt) โ ANSI colors are automatically stripped for clean output |
--all |
Include hidden/junk directories like .git, node_modules, venv, etc. |
--stats |
Show file sizes next to every file |
--llm |
Format output for pasting directly into an LLM prompt (wraps in a code block, skips the banner) |
Examples
# Scan the current directory
nestscan
# Scan a specific path
nestscan /home/user/myproject
# Save output to a clean text file
nestscan -o tree.txt
# Show file sizes
nestscan --stats
# Include hidden and junk folders
nestscan --all
# Copy-paste ready output for ChatGPT, Claude, etc.
nestscan --llm
# Combine flags
nestscan /home/user/myproject --stats --all -o full_tree.txt
๐ Example Output
Directory Tree for: /home/user/myproject
==================================================
myproject/
โโโ src/
โ โโโ main.py [ 4.2KB]
โ โโโ utils.py [ 1.8KB]
โ โโโ models/
โ โโโ user.py [ 2.1KB]
โ โโโ post.py [ 1.3KB]
โโโ tests/
โ โโโ test_main.py [ 3.0KB]
โ โโโ test_utils.py [ 1.1KB]
โโโ README.md [ 2.4KB]
โโโ requirements.txt [ 89B]
Clean. Sorted. Directories first. Color-coded by file type.
๐จ Color Coding
| Color | File Types |
|---|---|
| ๐ก Yellow | .py, .pyc, .pyw |
| ๐ข Green | .md, .txt, .csv, .log |
| ๐ฃ Magenta | .json, .toml, .yaml, .yml, .ini, .cfg |
| ๐ด Red | .sh, .bat, .exe, .dll, .so |
| Bold Cyan | Directories |
โจ What It Does
- ๐ฒ Recursive tree generation โ walks the full directory structure with proper branch characters
- ๐จ Color-coded by file type โ instantly see what kind of files you're dealing with
- ๐ Directories first โ folders always listed before files at every level
- ๐ซ Respects
.gitignoreโ automatically reads your.gitignoreand skips what it says, plus a built-in fallback list of common junk folders - ๐ Optional file sizes โ
--statsshows human-readable sizes (KB,MB, etc.) next to each file - ๐ค LLM mode โ
--llmwraps the output in a code block and skips the banner so you can paste your project structure straight into an AI prompt without any cleanup - ๐พ Clean file output โ when saving with
-o, ANSI color codes are automatically stripped so your text file is actually readable - ๐ช Windows compatible โ ANSI colors work there too
๐ Requirements
- Python 3.6+
- No third-party dependencies โ pure stdlib, zero bloat
โ ๏ธ Notes
- Directories you don't have permission to read will show
[Permission Denied]instead of crashing .gitignoreis parsed from the root of the scanned directory โ nested.gitignorefiles are not currently supported- Output is sorted alphabetically within each level, with directories always above files
๐ค Contributing
Found a bug? Have a wild idea? PRs welcome.
๐ License
Do whatever you want with it. Just stop doing ls -la and squinting at terminal output like it's 1995.
By turnt ducky ๐ฆ โ also check out reqscan for auto-generating requirements.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nestscan-1.1.0.tar.gz.
File metadata
- Download URL: nestscan-1.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58f9866c67049d726e01caa83d7996793791a08e022bb5481236389e8bb4479a
|
|
| MD5 |
0ddb47a28eb78ade7898bf25d2cf3f43
|
|
| BLAKE2b-256 |
d796574bbf5f1b6fea991f3030fab09f69cae4b19c987b78b201774521c94efa
|
File details
Details for the file nestscan-1.1.0-py3-none-any.whl.
File metadata
- Download URL: nestscan-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b741db1f8696af29d3536f16cb9936d47b5ea4c652551276b19ad112728fc19
|
|
| MD5 |
4c7ae9fb55f924cf3ea49c94bbbe9b22
|
|
| BLAKE2b-256 |
697f947c019dcbcb20987bedfc3cc8a9155a526b15fec0bf5fb3585246df64f7
|