Skip to main content

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 CI PyPI version Python Versions License

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 seedling in your scripts to use its powerful scanning and building engines programmatically, now with a silent quiet=True mode for clean server logs.
  • Context Rehydration ๐ŸŒŸ: Generate a project snapshot using scan --full, and use build to 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-fidelity PNG images with full Chinese character support and automatic trailing slashes for directories.
  • Reverse Scaffolding: Use the build command 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 --full scans to prevent crashes.
  • Graceful Interruptions: Ctrl+C safe. 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 NameError startup crash affecting Windows users.
  • API Quiet Mode: Added quiet=True support 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seedling_tools-2.2.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seedling_tools-2.2.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

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

Hashes for seedling_tools-2.2.1.tar.gz
Algorithm Hash digest
SHA256 b591df4983f8f045d4bf8252b1c02a14ba8583068be0d2495553f31efd2140f1
MD5 6e0d1bc71a14416e60673cd6dc443141
BLAKE2b-256 7846726c158a50fd986d8603105f29a5edc8a8a522d861ded29265b00a6220ad

See more details on using hashes here.

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

Hashes for seedling_tools-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02d8732236bebcef27c9b6bbf0fe3c586bd17f31ea148a2f3be043f85618c2ce
MD5 1308de384982dfec171b16be33c5c6a0
BLAKE2b-256 87d06f341aab4779c5006071f3ed4c1b56e8aef16e0d0bb8788e505e9a591fae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page