A modular 3-in-1 CLI toolkit to explore, search, and reconstruct directory structures with LLM-ready context support.
Project description
๐ฒ Seedling (v2.2.1)
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 or a way to spawn a project from a text blueprint, Seedling has you covered.
๐ Key Features
- Modular Architecture: A completely rebuilt core engine, separating commands and core logic for infinite scaling and professional maintenance.
- Public Python API (Quiet Mode) [NEW]: Seedling is now a library! You can
import seedlingin your scripts to use its powerful scanning and building engines programmatically, now with a silentquiet=Truemode for clean server logs. - Context Rehydration ๐: Generate a project snapshot using
scan --full, and usebuildto flawlessly restore the entire directory structure along with the original source code. - Smart Text Filter (
--text): Strictly ignore binary and media files during tree scanning and searching. Intelligently whitelists extension-less files (Makefile, Dockerfile) and hidden dotfiles. - C++/CUDA Ecosystem Support [NEW]: Deeply integrated support for low-level system files (
.cc,.cxx,.hpp,.cu,.cuh,.cs) ensuring zero code loss during context aggregation. - Dangerous Deletion (
--delete): Search for files or folders and permanently wipe them out with a built-in safety lock. - Scan & Export: Export directory trees to
Markdown,Plain Text, or high-fidelityPNGimages with full Chinese character support and automatic trailing slashes for directories. - Reverse Scaffolding: Use the
buildcommand to read any tree diagram (even those copied from a README) and instantly recreate the folder/file hierarchy.
๐ ๏ธ 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 CLI output)
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.2.1 uses a clean, explicit argument system. All ambiguous short flags have been removed to ensure readability.
1. scan - The Explorer
Used for scanning directories or searching for items.
| Argument | Description |
|---|---|
target |
Target directory for scanning or searching (Defaults to .). |
--version |
Show program's version number and exit. |
--find |
Search Mode. Returns exact and fuzzy matches + a saved report. |
--format |
Output format: md (default), txt, or image. |
--name |
Custom output filename. |
--outdir |
Where to save the result. |
--show-hidden |
Include hidden files in the scan. |
--depth |
Maximum recursion depth. |
--exclude |
List of files/directories to ignore. |
--full |
Power Mode. Appends the full text content of all scanned source files. |
--text |
Smart Filter. Only scan text-based files (ignores binary/media). |
--delete |
Cleanup Mode. Permanently delete items matched by --find. |
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 |
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. |
๐ Project Structure (v2.2.1)
Seedling/
โโโ seedling/ # Core Package
โ โโโ commands/ # CLI Command Routers
โ โ โโโ scan/ # Scan logic (explorer, search, full)
โ โ โโโ build/ # Build logic (architect)
โ โโโ core/ # Shared Engines
โ โ โโโ ui.py # Animations & Progress bars
โ โ โโโ io.py # File R/W & Image rendering
โ โ โโโ filesystem.py # Traversal & Text verification
โ โโโ __init__.py # Public API & Metadata
โ โโโ main.py # Entry Point Router
โโโ pyproject.toml # Build configuration
โโโ install.sh/bat # One-click installers
โโโ test_suite.sh # Ultimate E2E tests
๐ก๏ธ Stability & Hardening
Seedling is built to be unbreakable. It includes:
- Path Traversal Prevention [NEW]: Strict
.is_relative_to()boundary checks during build operations to completely prevent zero-day directory escape attacks. - Memory Protection: Automatically skips files larger than 2MB during
--fullscans to prevent crashes. - Graceful Interruptions:
Ctrl+Csafe. It saves your progress even if you stop a scan midway. - Symlink Loop Defense: Detects and ignores infinite directory loops.
- Terminal Safety: Built-in UTF-8 encodings to prevent Windows terminal startup crashes.
๐ Changelog
Detailed changes for each release are documented in the CHANGELOG.md file.
Latest Update: v2.2.1 (The Sentinel Patch)
- Security Hotfix: Patched a critical Path Traversal vulnerability in the build engine.
- Windows Fix: Resolved a fatal
NameErrorstartup crash affecting Windows users. - API Quiet Mode: Added
quiet=Truesupport for clean library integration without CLI pollution. - Expanded Ecosystem: Full context aggregation support for C/C++, CUDA, and C# files.
- Search Robustness: Fixed a severe fuzzy search bug where identically named files would overwrite each other in the index.
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.2.1.tar.gz.
File metadata
- Download URL: seedling_tools-2.2.1.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b591df4983f8f045d4bf8252b1c02a14ba8583068be0d2495553f31efd2140f1
|
|
| MD5 |
6e0d1bc71a14416e60673cd6dc443141
|
|
| BLAKE2b-256 |
7846726c158a50fd986d8603105f29a5edc8a8a522d861ded29265b00a6220ad
|
File details
Details for the file seedling_tools-2.2.1-py3-none-any.whl.
File metadata
- Download URL: seedling_tools-2.2.1-py3-none-any.whl
- Upload date:
- Size: 21.2 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 |
02d8732236bebcef27c9b6bbf0fe3c586bd17f31ea148a2f3be043f85618c2ce
|
|
| MD5 |
1308de384982dfec171b16be33c5c6a0
|
|
| BLAKE2b-256 |
87d06f341aab4779c5006071f3ed4c1b56e8aef16e0d0bb8788e505e9a591fae
|