Skip to main content

A CLI tool to generate ASCII tree representation of a project structure.

Project description

Indastructa

PyPI version PyPI Downloads Python Versions License: MIT

Tests codecov Code style: black Code style: ruff Zero Dependencies

Indastructa is a convenient CLI tool for quickly creating a clear ASCII tree of your project's file structure.

Perfect for documentation, technical reviews, architecture discussions, or blog posts.


Key Features

  • Zero Dependencies: Built using only Python's standard library. No external packages are needed, ensuring a fast, secure, and conflict-free installation.
  • Clear Output: Generates a beautiful and easy-to-read ASCII tree.
  • Automatic Saving: Results are automatically saved to a project_structure.txt file in the project root.
  • Smart Exclusions: By default, ignores unnecessary files and folders (such as .git, venv, __pycache__, .idea, and others).
  • Integration with .gitignore: Automatically reads rules from .gitignore and .dockerignore to exclude everything unrelated to source code.
  • Flexible Configuration: Allows specifying target folder, limiting scan depth, and adding custom exclusions and inclusions via command-line arguments.

Installation

pip install indastructa
Advanced: Installing from TestPyPI (click to expand)

TestPyPI is our testing environment for validating releases before publishing to PyPI.

Versions there may be newer, older, or match the production release - use for testing purposes only.

To install from TestPyPI:

pip install -i https://test.pypi.org/simple/ indastructa

Latest test version: https://test.pypi.org/project/indastructa/


Usage

Basic Examples

Scan current directory:

indastructa

Scan specific directory:

indastructa ./src

Custom output file:

indastructa -o structure.txt

Advanced Options

Quiet mode (no console output):

indastructa --quiet

Preview without saving:

indastructa --dry-run

Limit scan depth:

indastructa --depth 2

Exclude single pattern:

indastructa --exclude "*.pyc"

Exclude multiple patterns:

indastructa --exclude "*.log,node_modules"

Force include single file (overrides exclude):

indastructa --include ".env"

Force include multiple files:

indastructa --include ".env,.secrets"

Combined Example

indastructa ./src --depth 3 --exclude "*.pyc,__pycache__" --include ".env" --quiet -o structure.md

Tips

  • Use quotes around patterns with wildcards: "*.log"
  • Separate multiple patterns with commas: "*.pyc,*.pyo"
  • Files matching --include are shown even if they match --exclude
  • Default output: project_structure.txt
  • Default depth: unlimited (-1)

Exclusion Logic

indastructa uses a filtering system with the following priority:

  1. --include rules: Highest priority. Matching files are always shown.
  2. Built-in rules: Default exclusions like .git, venv, __pycache__, etc.
  3. .gitignore and .dockerignore: Automatically loaded from your project.
  4. --exclude rules: Additional patterns passed via command line.

Future Ideas

Planned features for upcoming releases:

  • Selectable ignore files
  • Interactive mode for step-by-step configuration
  • Export to JSON/YAML formats
  • Color-coded output
  • Integration with project documentation generators

Have ideas or found a bug? Create an Issue on GitHub.


License

This project is distributed under the MIT License.

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

indastructa-0.1.2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

indastructa-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file indastructa-0.1.2.tar.gz.

File metadata

  • Download URL: indastructa-0.1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for indastructa-0.1.2.tar.gz
Algorithm Hash digest
SHA256 052e36d0bd578b46f16ac820ee876ede60a4ddaf2e58003b295b99497820f34c
MD5 e55e2915e7a8074c4214afec72273a9c
BLAKE2b-256 05c28fc537afba38c09718bebbdcc6292762b51cf68252d06f41659763b16f15

See more details on using hashes here.

Provenance

The following attestation bundles were made for indastructa-0.1.2.tar.gz:

Publisher: build-and-publish.yml on H-E-L-L-g-i/Indastructa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file indastructa-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: indastructa-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for indastructa-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd56e5c5993eb57e17a6a3d5afda33314fa68a093263805abbba12205c144527
MD5 90e6e02363c03a90d7a86204e6a92f54
BLAKE2b-256 d1370672fca0b4d379d98471259ebca16ed9926da8d2a1a92d40b121e537cb6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for indastructa-0.1.2-py3-none-any.whl:

Publisher: build-and-publish.yml on H-E-L-L-g-i/Indastructa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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