| Name | llmdirtree JSON |
| Version |
0.1.5
JSON |
| download |
| home_page | https://github.com/arun477/dirtree |
| Summary | A simple directory tree generator for llm |
| upload_time | 2025-03-19 06:48:05 |
| maintainer | None |
| docs_url | None |
| author | arun |
| requires_python | >=3.6 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# llmdirtree
A directory tree generator and codebase context provider designed specifically for enhancing LLM interactions with your code.
## Purpose
`llmdirtree` helps you work more effectively with Large Language Models (LLMs) by:
- Generating visual directory trees for structural understanding
- Creating contextual summaries of your codebase that respect privacy settings
- Optimizing code information for LLM follow-up questions
## Installation
```bash
pip install llmdirtree
```
## Key Features
### Directory Tree Visualization
- Clean, standardized visualization of project structure
- Unicode box-drawing characters for optimal parsing
- Intelligent filtering of non-essential directories
- Full `.gitignore` pattern support for accurate representation of your project
### LLM Context Generation
- AI-powered analysis of your codebase using OpenAI API
- Security-focused with automatic `.gitignore` pattern recognition
- File-by-file summaries optimized for follow-up questions
- Intelligent handling of large files with automatic chunking and summarization
- Project overview that captures your codebase's essence
- Customizable OpenAI model selection
### Security and Privacy
- Respects `.gitignore` patterns to avoid exposing sensitive information
- Zero dependencies approach (uses system curl instead of libraries)
- Efficient token usage for minimal data exposure
## Usage Examples
### Basic Directory Tree
```bash
# Generate a simple directory tree
llmdirtree --root /path/to/project --output project_structure.txt
```
### With LLM Context Generation
```bash
# Generate both directory tree AND code context
llmdirtree --root /path/to/project --llm-context --openai-key YOUR_API_KEY
```
This creates two files:
- `directory_tree.txt` - Visual structure
- `llmcontext.txt` - AI-generated project overview and file summaries
### Additional Options
```bash
# Exclude specific directories
llmdirtree --exclude node_modules .git venv dist
# Customize output locations
llmdirtree --output custom_tree.txt --context-output custom_context.txt
# Control file selection for context generation
llmdirtree --max-files 150 --llm-context
# Override gitignore protection (not recommended)
llmdirtree --ignore-gitignore --llm-context
# Specify OpenAI model to use (avoids prompting)
llmdirtree --llm-context --model gpt-4
```
## Example Output
### Directory Tree
```
Directory Tree for: /project
Excluding: .git, node_modules, __pycache__, venv
--------------------------------------------------
project/
├── src/
│ ├── main.py
│ └── utils/
│ └── helpers.py
├── tests/
│ └── test_main.py
└── README.md
```
### LLM Context File
```markdown
# project-name
> A React web application for tracking personal fitness goals with a Node.js backend and MongoDB database.
## src/components/
- **Dashboard.jsx**: Main dashboard component that displays user fitness stats, recent activities, and goal progress.
- **WorkoutForm.jsx**: Form for creating and editing workout entries with validation and submission handling.
## src/utils/
- **api.js**: Contains functions for making API calls to the backend, handling authentication and data fetching.
- **formatters.js**: Utility functions for formatting dates, weights, and other fitness metrics consistently.
```
## Benefits for LLM Workflows
- **Comprehensive context** without uploading your entire codebase
- **More accurate responses** with both structural and semantic understanding
- **Security first** approach that protects sensitive information
- **Time savings** from clearer communication with AI assistants
- **Handles large codebases** by intelligently processing and summarizing large files
## Configuration
### OpenAI Model Selection
By default, llmdirtree will ask which OpenAI model you want to use once per run:
- Default for batch processing: `gpt-3.5-turbo-16k`
- Default for project overview: `gpt-3.5-turbo`
You can skip this prompt by specifying a model directly:
```bash
llmdirtree --llm-context --model gpt-4
```
### Large File Handling
llmdirtree automatically handles large files by:
1. Identifying files exceeding the token threshold (default: 8000 tokens)
2. Splitting them into meaningful chunks
3. Summarizing each chunk independently
4. Creating a cohesive final summary
You can adjust this threshold by modifying the `max_tokens_per_file` variable in the source code.
## Technical Details
- No external dependencies required for core functionality
- Progress bar available with optional `tqdm` installation
- Automatically respects `.gitignore` patterns for security
- Uses system curl instead of Python libraries for API calls
## License
MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/arun477/dirtree",
"name": "llmdirtree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "arun",
"author_email": "your.email@example.com",
"download_url": "https://files.pythonhosted.org/packages/4c/c6/983e80b5e1e7bbf19201a31ab7923dbb7b06a2e12ee1175d73a949f45a31/llmdirtree-0.1.5.tar.gz",
"platform": null,
"description": "# llmdirtree\n\nA directory tree generator and codebase context provider designed specifically for enhancing LLM interactions with your code.\n\n## Purpose\n\n`llmdirtree` helps you work more effectively with Large Language Models (LLMs) by:\n- Generating visual directory trees for structural understanding\n- Creating contextual summaries of your codebase that respect privacy settings\n- Optimizing code information for LLM follow-up questions\n\n## Installation\n\n```bash\npip install llmdirtree\n```\n\n## Key Features\n\n### Directory Tree Visualization\n- Clean, standardized visualization of project structure\n- Unicode box-drawing characters for optimal parsing\n- Intelligent filtering of non-essential directories\n- Full `.gitignore` pattern support for accurate representation of your project\n\n### LLM Context Generation\n- AI-powered analysis of your codebase using OpenAI API\n- Security-focused with automatic `.gitignore` pattern recognition\n- File-by-file summaries optimized for follow-up questions\n- Intelligent handling of large files with automatic chunking and summarization\n- Project overview that captures your codebase's essence\n- Customizable OpenAI model selection\n\n### Security and Privacy\n- Respects `.gitignore` patterns to avoid exposing sensitive information\n- Zero dependencies approach (uses system curl instead of libraries)\n- Efficient token usage for minimal data exposure\n\n## Usage Examples\n\n### Basic Directory Tree\n\n```bash\n# Generate a simple directory tree\nllmdirtree --root /path/to/project --output project_structure.txt\n```\n\n### With LLM Context Generation\n\n```bash\n# Generate both directory tree AND code context\nllmdirtree --root /path/to/project --llm-context --openai-key YOUR_API_KEY\n```\n\nThis creates two files:\n- `directory_tree.txt` - Visual structure\n- `llmcontext.txt` - AI-generated project overview and file summaries\n\n### Additional Options\n\n```bash\n# Exclude specific directories\nllmdirtree --exclude node_modules .git venv dist\n\n# Customize output locations\nllmdirtree --output custom_tree.txt --context-output custom_context.txt\n\n# Control file selection for context generation\nllmdirtree --max-files 150 --llm-context\n\n# Override gitignore protection (not recommended)\nllmdirtree --ignore-gitignore --llm-context\n\n# Specify OpenAI model to use (avoids prompting)\nllmdirtree --llm-context --model gpt-4\n```\n\n## Example Output\n\n### Directory Tree\n\n```\nDirectory Tree for: /project\nExcluding: .git, node_modules, __pycache__, venv\n--------------------------------------------------\nproject/\n\u251c\u2500\u2500 src/\n\u2502 \u251c\u2500\u2500 main.py\n\u2502 \u2514\u2500\u2500 utils/\n\u2502 \u2514\u2500\u2500 helpers.py\n\u251c\u2500\u2500 tests/\n\u2502 \u2514\u2500\u2500 test_main.py\n\u2514\u2500\u2500 README.md\n```\n\n### LLM Context File\n\n```markdown\n# project-name\n\n> A React web application for tracking personal fitness goals with a Node.js backend and MongoDB database.\n\n## src/components/\n\n- **Dashboard.jsx**: Main dashboard component that displays user fitness stats, recent activities, and goal progress.\n- **WorkoutForm.jsx**: Form for creating and editing workout entries with validation and submission handling.\n\n## src/utils/\n\n- **api.js**: Contains functions for making API calls to the backend, handling authentication and data fetching.\n- **formatters.js**: Utility functions for formatting dates, weights, and other fitness metrics consistently.\n```\n\n## Benefits for LLM Workflows\n\n- **Comprehensive context** without uploading your entire codebase\n- **More accurate responses** with both structural and semantic understanding\n- **Security first** approach that protects sensitive information\n- **Time savings** from clearer communication with AI assistants\n- **Handles large codebases** by intelligently processing and summarizing large files\n\n## Configuration\n\n### OpenAI Model Selection\nBy default, llmdirtree will ask which OpenAI model you want to use once per run:\n- Default for batch processing: `gpt-3.5-turbo-16k`\n- Default for project overview: `gpt-3.5-turbo`\n\nYou can skip this prompt by specifying a model directly:\n```bash\nllmdirtree --llm-context --model gpt-4\n```\n\n### Large File Handling\nllmdirtree automatically handles large files by:\n1. Identifying files exceeding the token threshold (default: 8000 tokens)\n2. Splitting them into meaningful chunks\n3. Summarizing each chunk independently\n4. Creating a cohesive final summary\n\nYou can adjust this threshold by modifying the `max_tokens_per_file` variable in the source code.\n\n## Technical Details\n\n- No external dependencies required for core functionality\n- Progress bar available with optional `tqdm` installation\n- Automatically respects `.gitignore` patterns for security\n- Uses system curl instead of Python libraries for API calls\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple directory tree generator for llm",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/arun477/dirtree"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4611021c99a463f3ef29f72e189a8e532ca783407da716fb01e8b5a4dd531679",
"md5": "c419ab0d66193129cd18a2372f44ce0a",
"sha256": "d1fbd0e6d16b268d406299c0fd42ecfafc1883165cdb3eef5233c72990401afb"
},
"downloads": -1,
"filename": "llmdirtree-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c419ab0d66193129cd18a2372f44ce0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 13934,
"upload_time": "2025-03-19T06:48:03",
"upload_time_iso_8601": "2025-03-19T06:48:03.983486Z",
"url": "https://files.pythonhosted.org/packages/46/11/021c99a463f3ef29f72e189a8e532ca783407da716fb01e8b5a4dd531679/llmdirtree-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4cc6983e80b5e1e7bbf19201a31ab7923dbb7b06a2e12ee1175d73a949f45a31",
"md5": "040adde576d9d7e3cd0c2c03449c745b",
"sha256": "ceab1e46cca5a0a3fb9c1427d7eae0f084de149c11d86a7004ec2fa5a3905fd3"
},
"downloads": -1,
"filename": "llmdirtree-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "040adde576d9d7e3cd0c2c03449c745b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15633,
"upload_time": "2025-03-19T06:48:05",
"upload_time_iso_8601": "2025-03-19T06:48:05.526211Z",
"url": "https://files.pythonhosted.org/packages/4c/c6/983e80b5e1e7bbf19201a31ab7923dbb7b06a2e12ee1175d73a949f45a31/llmdirtree-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-19 06:48:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "arun477",
"github_project": "dirtree",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "llmdirtree"
}