Skip to main content

A CLI tool for analyzing directory structures and summarizing files

Project description

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.

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

treelyze-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

treelyze-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file treelyze-0.1.1.tar.gz.

File metadata

  • Download URL: treelyze-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.4 Darwin/23.5.0

File hashes

Hashes for treelyze-0.1.1.tar.gz
Algorithm Hash digest
SHA256 faf8a06ef1ebe2f424c475f0993e6a0747d91fc3d507177f77ebcec3e5e62b8e
MD5 e94f1e8595d7a51bcee7ca5cb362806a
BLAKE2b-256 f6c89c872fb126071f8fb9f29e61043b5a8ab10378a0a1e200ae3a744b393167

See more details on using hashes here.

File details

Details for the file treelyze-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: treelyze-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.4 Darwin/23.5.0

File hashes

Hashes for treelyze-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc045ceecdcc444b43b3bc6b654d98f682346f701b61b194cd6422034deb1b4
MD5 22491741142dee1c8d498f6713566647
BLAKE2b-256 4a683bdfcb9b72f8e2c223c0730ca1fa217f1ae9008c85023cb01b5a79603f57

See more details on using hashes here.

Supported by

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