Treelyze
Treelyze is a powerful CLI tool for analyzing directory structures and optionally summarizing file contents using Language Models (LLMs). It provides an easy-to-use interface for exploring and understanding complex directory hierarchies.
Features
- Analyze directory structures with customizable depth
- Exclude specific directories from analysis
- Summarize file contents using LLMs (optional)
- Configurable settings for model and prompt customization
- Output results to file or console
Installation
You can install Treelyze using pip:
pip install treelyze
Usage
Basic Usage
To analyze the current directory:
treelyze run
To analyze a specific directory:
treelyze run /path/to/directory
Options
--max-depth, -d: Set the maximum depth for directory traversal--exclude, -e: Specify directories to exclude (can be used multiple times)--summarize, -s: Enable file content summarization using LLM--output, -o: Specify an output file for the analysis results--model: Override the default language model for summarization--prompt: Override the default summarization prompt
Examples
Analyze a directory with a maximum depth of 3, excluding 'node_modules':
treelyze run /path/to/directory --max-depth 3 --exclude node_modules
Analyze and summarize files, outputting results to a file:
treelyze run /path/to/directory --summarize --output results.txt
Configuration
You can manage Treelyze configuration using the config subcommand:
# Show current configuration
treelyze config --show
# Set a configuration value
treelyze config --set model "gpt-3.5-turbo"
treelyze config --set prompt "Summarize this file concisely:"
Note: The configuration file is located at ~/.treelyze/config.yaml in your home folder.
Contributing
Contributions to Treelyze are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for treelyze 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| treelyze-0.1.2.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| treelyze-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / treelyze-0.1.2.tar.gz
| Download URL | treelyze-0.1.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c59cdd833f8f68dc322cb62350f3ccc75ac20c8f993228df9edabfe945b5d22
|
|
BLAKE2b-256 checksum How to use checksums |
07a9f0c9641a7fa06f9cf32e042bef8d67a9fe00e922cfcf8a1a6e5369dd0397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.11.10 Darwin/24.1.0
|
Release files / treelyze-0.1.2-py3-none-any.whl
| Download URL | treelyze-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81460a273d55b269adb44a536f3781c4f1dc0d1671b068c0eca41d87892789df
|
|
BLAKE2b-256 checksum How to use checksums |
8d41c1ab06e82131820e978b3c87ab20655f8446f83c861e55f5d59d26d446a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.11.10 Darwin/24.1.0
|