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.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

treelyze-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: treelyze-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/24.1.0

File hashes

Hashes for treelyze-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7c59cdd833f8f68dc322cb62350f3ccc75ac20c8f993228df9edabfe945b5d22
MD5 761b1b7db4a1ee53cab5130ef1b6eb41
BLAKE2b-256 07a9f0c9641a7fa06f9cf32e042bef8d67a9fe00e922cfcf8a1a6e5369dd0397

See more details on using hashes here.

File details

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

File metadata

  • Download URL: treelyze-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/24.1.0

File hashes

Hashes for treelyze-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81460a273d55b269adb44a536f3781c4f1dc0d1671b068c0eca41d87892789df
MD5 5e2399001c75d0c1a39e32360f9be974
BLAKE2b-256 8d41c1ab06e82131820e978b3c87ab20655f8446f83c861e55f5d59d26d446a1

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