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.0)

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 [NEW]: Version 2.2.0 introduces a completely rebuilt core engine, separating commands and core logic for infinite scaling and professional maintenance.
  • Public Python API [NEW]: Seedling is now a library! You can import seedling in your scripts to use its powerful scanning and building engines programmatically.
  • 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) [NEW]: Strictly ignore binary and media files during tree scanning and searching, ensuring your output remains clean and code-focused.
  • Dangerous Deletion (--delete) [NEW]: 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
lines = seedling.scan_dir_lines("./src", max_depth=2)
print("\n".join(lines))

# Search for specific items
exact, fuzzy = seedling.search_items(".", keyword="utils")

# Reconstruct a project from a blueprint
seedling.build_structure_from_file("blueprint.md", "./new_project")

๐Ÿ“– CLI Reference

Seedling 2.2.0 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.0)

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:

  • 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.
  • Path Traversal Prevention: Safely handles complex path combinations during construction.

๐Ÿ“œ Changelog

Detailed changes for each release are documented in the CHANGELOG.md file.

Latest Update: v2.2.0

  • Modular Architecture: Completely rebuilt core engine for scalability.
  • Public API: Use Seedling as a Python library.
  • Cleanup Mode: Added --delete to remove matched files.
  • Smart Filter: Added --text to ignore binary/media files.

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.0.tar.gz (16.3 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.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file seedling_tools-2.2.0.tar.gz.

File metadata

  • Download URL: seedling_tools-2.2.0.tar.gz
  • Upload date:
  • Size: 16.3 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.0.tar.gz
Algorithm Hash digest
SHA256 66062f5d6e05d71d834bdfbfee65a6d7665197ba5bd4f57fa0db39c2d8c1b81b
MD5 ea4122e77b0a74cfae82bbc0b3c7bf50
BLAKE2b-256 94b48600cb42159811331b322697da3ba5313ff5c755731499c93bab4d7004fc

See more details on using hashes here.

File details

Details for the file seedling_tools-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: seedling_tools-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35ee69483d4acf721f90a740e40329fba98a72143057398daf8db0f911aa4529
MD5 e01d3bb5994dbfff99f286ff99f0da5a
BLAKE2b-256 8a192b7b658474fe1f1f1880edd2b77bc83cb19fb8c709dfdae4aed1fdb9a59b

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