A CLI tool to generate ASCII tree representation of a project structure.
Project description
Indastructa
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
- Clear Output: Generates a beautiful and easy-to-read ASCII tree.
- Automatic Saving: The result is automatically saved to a
project_structure.txtfile in the project root. - Smart Exclusions: By default, it ignores unnecessary files and folders (such as
.git,venv,__pycache__,.idea, and others). - Integration with
.gitignore: Automatically reads rules from.gitignoreand.dockerignoreto 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
You can install indastructa from PyPI or TestPyPI.
Stable Version (from PyPI)
This is the recommended way to install the latest stable release.
pip install indastructa
Development Version (from TestPyPI)
To install the latest pre-release version from our test repository:
pip install --index-url https://test.pypi.org/simple/ indastructa
How to Use
Basic Usage
To scan the current directory, simply run the command:
indastructa
The result will be printed to the console and saved to project_structure.txt.
Specifying a Path
You can scan any directory by providing a relative or absolute path:
# Scan a subdirectory
indastructa ./src
# Scan a directory using an absolute path
indastructa C:\Users\YourUser\Projects\MyProject
Advanced Usage
You can combine flags to customize the output.
-
Limit scan depth with
--depth:indastructa --depth 2
-
Exclude files and folders with
--exclude(use quotes for multiple patterns):indastructa --exclude "*.md,docs,build"
-
Force include files with
--includeto show them even if they are in.gitignore:indastructa --include .env
-
Save to a different file with
-oor--output:indastructa -o custom_structure.md
-
Perform a dry run with
--dry-runto see the output without saving the file:indastructa --dry-run
Full Example
Here is a complex example combining all options:
indastructa ./src --depth 3 --exclude "*.pyc" --include ".env" -o src_structure.txt
Exclusion Logic
indastructa uses a filtering system with the following priority:
--includerules: Patterns passed via--includehave the highest priority. If a file matches, it will always be shown.- Built-in rules: A default set of common exclusions like
.git,venv,__pycache__, etc. - Rules from
.gitignoreand.dockerignore: Automatically loaded from your project. --excluderules: Patterns passed via--exclude.
Future Ideas
For more advanced feature ideas, see the FUTURE_FEATURES.md file in this repository.
- Selectable ignore files
- Interactive mode
- Support for exporting to JSON/YAML
Have ideas or found a bug? Create an Issue on GitHub.
License
The 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
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 indastructa-0.1.0.tar.gz.
File metadata
- Download URL: indastructa-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef85de4de57030fca71c1802e2760724164931f7fc3e61bd092cfd4992d52672
|
|
| MD5 |
170f0e6cb0ca4de67a75c2cdf4fbd751
|
|
| BLAKE2b-256 |
281356c2fd65a06dfd7f60946e1d252827abf2641783c0037cfaeb545f4e243f
|
File details
Details for the file indastructa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: indastructa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3998dcf956df502f4c07eab5edac4e56dedaa20cd219fa3f93c3bec6e05f2bde
|
|
| MD5 |
aea3f2f27447e64ec78cdfcf770aa03b
|
|
| BLAKE2b-256 |
0df2541ed36b24a760258cac5028f152cf93d0de9248cdcb9e48ba7f42dbb700
|