A modular 3-in-1 CLI toolkit to explore, search, and reconstruct directory structures with LLM-ready context support.
Project description
๐ฒ Seedling (v2.3.0)
Seedling is a high-performance, 3-in-1 CLI toolkit designed for developers to explore, search, and reconstruct directory structures. Whether you need a beautiful image of your project architecture, a way to spawn a project from a text blueprint, or a context-optimized codebase skeleton for LLMs, Seedling has you covered.
๐ Key Features
- LLM-Optimized Code Skeletons (
--skeleton): Harnesses Python's AST (Abstract Syntax Tree) to strip away complex logic while perfectly preserving classes, functions, and docstrings. Instantly generate a "birds-eye view" of your codebase that drastically saves LLM context window tokens. - Smart Exclusions: The
--excludeflag is now context-aware! Pass a file like.gitignoreand Seedling will automatically read and apply its rules line-by-line. Features intelligent typo-detection and interactive prompts. - Streamlined Search & True Power Mode:
findnow directly outputs exact and fuzzy matches to the terminal for blazing-fast navigation. Combine it with--fullto bypass prompts and instantly generate a comprehensive Markdown report containing the directory tree ๐ฏ highlights and full source code. - True OOM Protection: Intelligently probes your host's physical RAM and calculates precise decoded UTF-8 memory allocation. The
--fullcontext aggregator enforces a strict 10% memory ceiling, preventing system crashes when parsing massive monorepos. - Cross-Platform Rehydration: Generate a project snapshot on Windows (with
\paths), and flawlessly restore the entire directory structure and source code on a Mac or Linux machine. - Public Python API (True Quiet Mode): Seedling is a library! You can
import seedlingin your scripts to use its powerful engines programmatically. With the new centralized logger,quiet=Trueensures absolute zero stdout pollution. - Smart Text Filter & Magic Number Check: Strictly ignore binary and media files during tree scanning. Features an advanced Heuristic Binary Check that scans for Magic Numbers (PNG, ELF, ZIP, PDF, etc.) to dynamically block disguised non-text files.
- Dangerous Deletion (
--delete): Search for files or folders and permanently wipe them out with a built-in TTY interactive lock requiring explicit confirmation. Now features secondary safety locks for fuzzy matches and symlinks.
๐ ๏ธ Installation
Seedling is designed to be installed globally via pipx for a clean, isolated environment.
One-Click Setup
- Windows: Run
./install.bat - macOS / Linux: Run
bash install.sh
Developer / Manual Install
If you are modifying the source code, use Editable Mode:
pipx install -e . --force
๐ Python Library Usage
You can now use Seedling's core features directly in your Python code:
import seedling
# Generate directory tree lines (Use quiet=True to suppress all console logs)
lines = seedling.scan_dir_lines("./src", max_depth=2, quiet=True)
print("\n".join(lines))
# Search for specific items
exact, fuzzy = seedling.search_items(".", keyword="utils", quiet=True)
# Reconstruct a project from a blueprint
seedling.build_structure_from_file("blueprint.md", "./new_project")
๐ CLI Reference
Seedling 2.3.0 uses a clean, explicit argument system. All commands now support unified logging controls (-v / -q).
1. scan - The Explorer
Used for scanning directories, extracting code skeletons, or searching for items.
| Argument | Description |
|---|---|
target |
Target directory for scanning or searching (Defaults to .). |
--version |
Show program's version number and exit. |
--find, -f |
Search Mode. Fast CLI search (Exact & Fuzzy). Combine with --full to export a code report. |
--format, -F |
Output format: md (default), txt, or image. |
--name, -n |
Custom output filename. |
--outdir, -o |
Where to save the result. |
--showhidden |
Include hidden files in the scan. |
--depth, -d |
Maximum recursion depth. |
--exclude, -e |
List of items to ignore. Smart parse: auto-reads .gitignore files or accepts globs. |
--full |
Power Mode. Appends the full text content of all scanned source files. |
--skeleton |
[Experimental] AST Code Skeleton extraction. Strips logic, retains classes/defs/docstrings. |
--text |
Smart Filter. Only scan text-based files (ignores binary/media). |
--delete |
Cleanup Mode. Permanently delete items matched by --find (Interactive TTY only). |
--verbose, -v |
Enable debug logging. |
--quiet, -q |
Silent mode. Only show critical errors. |
--noemoji |
Disable emojis for cleaner rendering on legacy/simple terminals. |
2. build - The Architect
Turn a text-based tree into a real file system, or restore a project from a snapshot.
| Argument | Description |
|---|---|
file |
The source tree blueprint file (.txt or .md). |
target |
Where to build the structure (Defaults to current directory). |
--version |
Show program's version number and exit. |
--direct, -d |
Direct Mode. Bypass prompts to instantly create a specific path. |
--check |
Dry-Run. Simulate the build and report missing/existing items. |
--force |
Force Mode. Overwrite existing files without skipping. |
--verbose, -v |
Enable debug logging. |
--quiet, -q |
Silent mode. Only show critical errors. |
๐ Project Structure (v2.3.0)
Seedling/
โโโ seedling/ # Core Package
โ โโโ commands/ # CLI Command Routers
โ โ โโโ build/ # Build logic
โ โ โ โโโ __init__.py
โ โ โ โโโ architect.py # Architect engine w/ Path Traversal defense
โ โ โโโ scan/ # Scan logic
โ โ โโโ __init__.py
โ โ โโโ exclude.py # Smart ignore-file parser (v2.3.0)
โ โ โโโ explorer.py # Standard directory traversal
โ โ โโโ full.py # Context aggregator
โ โ โโโ search.py # Overhauled search w/ Power Mode
โ โ โโโ skeleton.py # Python AST skeleton extractor (v2.3.0)
โ โโโ core/ # Shared Engines
โ โ โโโ __init__.py
โ โ โโโ filesystem.py # Iterative DFS & Advanced Exclusion rules
โ โ โโโ io.py # File R/W & Fence Collision parsing
โ โ โโโ logger.py # Centralized CLI Formatter
โ โ โโโ sysinfo.py # Hardware Probe (RAM & Depth limits)
โ โ โโโ ui.py # Animations, Progress bars & CI/CD checks
โ โโโ __init__.py # Public API & Metadata
โ โโโ main.py # CLI Entry Point Router
โโโ tests/ # Unit Tests
โ โโโ __init__.py
โ โโโ test_build_architect.py # Path safety tests
โ โโโ test_core_filesystem.py # Exclusion logic & File type tests
โ โโโ test_core_io.py # Markdown & Code block parsing tests
โ โโโ test_scan_exclude.py # Smart ignore-file parsing tests
โ โโโ test_scan_skeleton.py # AST extraction logic tests
โโโ CHANGELOG.md # Version history
โโโ install.bat # Windows one-click installer
โโโ install.sh # Linux/macOS one-click installer
โโโ LICENSE # MIT License
โโโ pyproject.toml # Build configuration & Package metadata
โโโ pytest.ini # Pytest configuration file
โโโ README.md # Project documentation
โโโ test_suite.sh # Ultimate E2E tests
๐ก๏ธ Stability & Hardening (The Ironclad Sandbox)
Seedling v2.3.0 has been fortified to survive extreme edge cases and chaotic inputs:
- Recursion & Mount Loop Defense: Directory traversal uses an iterative Stack-DFS tracking resolved physical paths. It mathematically eliminates
RecursionErrorand instantly blocks infinite OS-level bind mount or hard link loops. - Markdown Fence Collision Immunity: The parser calculates dynamic backtick boundaries, allowing Seedling to flawlessly bundle and reconstruct documents containing nested code blocks (like its own source code) without truncation.
- AST Graceful Degradation: The
skeletonextractor uses Python'sastengine. If it encounters syntax errors in legacy/broken code, it safely falls back to returning the raw text rather than crashing the pipeline. - Symlink Deletion Safety: Search and delete operations explicitly sever symbolic links without following them, protecting host systems from catastrophic cascade deletions.
- Pre-Processing Sandbox: The
buildengine executes a Phase 1 simulation resolving virtual paths. It intercepts zero-day path traversal attacks (e.g.,../../../) before any disk operations occur.
๐ Changelog
Detailed changes for each release are documented in the CHANGELOG.md file.
Latest Update: v2.3.0 (The "LLM Context" Update)
- AST Code Skeleton Extraction (
--skeleton): Introduced a powerful AST parsing engine for Python files. Strips out complex implementation logic while perfectly preserving class structures, function signatures, and docstrings. Drastically reduces LLM context window consumption. - Smart Rule File Parsing (
--exclude): The-eflag is now context-aware. Passing a file (like.gitignore) will automatically read and parse its contents line-by-line. Includes intelligent typo detection (e.g., typinggitignorewithout the dot) and interactive prompts. - Streamlined CLI Search: The
scan -fcommand now prints exact and fuzzy matches directly to the terminal and exits, keeping your disk clean. - True Power Mode for Search: Combining
--findwith--fullnow safely bypasses interactive prompts and instantly generates a comprehensive Markdown report pairing the highlighted directory tree with the complete source code of matched files.
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 seedling_tools-2.3.0.tar.gz.
File metadata
- Download URL: seedling_tools-2.3.0.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
760078c536b82accc82b0d22a735a5027e1b5b84501d08e7043dfddf0fdd6881
|
|
| MD5 |
be49ac0e3a131871553f98b5a41b9305
|
|
| BLAKE2b-256 |
7485c9ad99bbbf0320619a5a9bc23daee62bcac6e2d145db489d0074c9fda403
|
File details
Details for the file seedling_tools-2.3.0-py3-none-any.whl.
File metadata
- Download URL: seedling_tools-2.3.0-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c583c5dd58cb1e3a9e35ff4b83744387e9b528f8e5e451eb66a38323689805c
|
|
| MD5 |
827e8290f60cfec3b8975f5169e56ed1
|
|
| BLAKE2b-256 |
5d4301bde1dca71825ebf378710e8216a573d9ce29f9002a7642df847f6ecacd
|