| Name | f2llm JSON |
| Version |
0.1.5
JSON |
| download |
| home_page | None |
| Summary | A CLI tool to parse files and create LLM prompts |
| upload_time | 2025-08-11 09:36:46 |
| maintainer | None |
| docs_url | None |
| author | Mate Dravucz |
| requires_python | >=3.9 |
| license | MIT |
| keywords |
cli
llm
file parsing
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# F2LLM - Folder to LLM CLI Tool
A simple command-line tool for converting folder structures to JSON format for LLM processing and applying LLM-generated changes back to your project.
## Installation
Requires Python 3.6+ and the `pathspec` library:
```bash
pip install pathspec
```
## Usage
F2LLM has two main modes:
### 1. Parse Mode (Default)
Convert a folder structure into JSON format:
```bash
python f2llm.py <folder_path> <output.json>
```
**Example:**
```bash
python f2llm.py my_project project_files.json
```
This creates a JSON file containing all files in the folder with their content wrapped in code fences.
### 2. Apply Mode
Apply LLM-generated changes from JSON back to your project:
```bash
python f2llm.py --apply <changes.json> <target_folder>
```
**Example:**
```bash
python f2llm.py --apply llm_response.json my_project
```
## JSON Schema
The tool expects/produces JSON files with this structure:
```json
{
"modified_files": [
{
"file_path": "src/main.py",
"notes": "Updated function logic",
"content": "```python\n# file content here\n```"
}
],
"added_files": [
{
"file_path": "src/new_file.py",
"notes": "New utility module",
"content": "```python\n# new file content\n```"
}
],
"moved_files": [
{
"old_path": "old/location.py",
"new_path": "new/location.py",
"notes": "Reorganized project structure"
}
],
"unchanged_files": [
"README.md",
"package.json"
],
"deleted_files": [
{
"file_path": "obsolete_file.py",
"notes": "No longer needed"
}
]
}
```
## Features
- **Gitignore Support**: Automatically respects `.gitignore` files during parsing
- **File Operations**: Handles create, modify, move, and delete operations
- **Code Fences**: Automatically wraps file content with appropriate language syntax highlighting
- **Safe Paths**: Creates necessary directories when applying changes
- **Error Handling**: Graceful handling of file read/write errors
## Common Workflow
1. **Extract your project** for LLM analysis:
```bash
python f2llm.py my_project prompt.json
```
2. **Send `prompt.json` to your LLM** with instructions
3. **Apply the LLM's response** back to your project:
```bash
python f2llm.py --apply llm_response.json my_project
```
## Notes
- The tool preserves file permissions and creates directories as needed
- Binary files or files that can't be read as UTF-8 will show an error message in their content
- When moving files, the tool creates necessary parent directories automatically
Raw data
{
"_id": null,
"home_page": null,
"name": "f2llm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "cli, llm, file parsing",
"author": "Mate Dravucz",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/71/68/39408cfc3b17d9d01c69488897a57b68ad059bde41b88fe78fcbe094971b/f2llm-0.1.5.tar.gz",
"platform": null,
"description": "# F2LLM - Folder to LLM CLI Tool\n\nA simple command-line tool for converting folder structures to JSON format for LLM processing and applying LLM-generated changes back to your project.\n\n## Installation\n\nRequires Python 3.6+ and the `pathspec` library:\n\n```bash\npip install pathspec\n```\n\n## Usage\n\nF2LLM has two main modes:\n\n### 1. Parse Mode (Default)\nConvert a folder structure into JSON format:\n\n```bash\npython f2llm.py <folder_path> <output.json>\n```\n\n**Example:**\n```bash\npython f2llm.py my_project project_files.json\n```\n\nThis creates a JSON file containing all files in the folder with their content wrapped in code fences.\n\n### 2. Apply Mode\nApply LLM-generated changes from JSON back to your project:\n\n```bash\npython f2llm.py --apply <changes.json> <target_folder>\n```\n\n**Example:**\n```bash\npython f2llm.py --apply llm_response.json my_project\n```\n\n## JSON Schema\n\nThe tool expects/produces JSON files with this structure:\n\n```json\n{\n \"modified_files\": [\n {\n \"file_path\": \"src/main.py\",\n \"notes\": \"Updated function logic\",\n \"content\": \"```python\\n# file content here\\n```\"\n }\n ],\n \"added_files\": [\n {\n \"file_path\": \"src/new_file.py\", \n \"notes\": \"New utility module\",\n \"content\": \"```python\\n# new file content\\n```\"\n }\n ],\n \"moved_files\": [\n {\n \"old_path\": \"old/location.py\",\n \"new_path\": \"new/location.py\",\n \"notes\": \"Reorganized project structure\"\n }\n ],\n \"unchanged_files\": [\n \"README.md\",\n \"package.json\"\n ],\n \"deleted_files\": [\n {\n \"file_path\": \"obsolete_file.py\",\n \"notes\": \"No longer needed\"\n }\n ]\n}\n```\n\n## Features\n\n- **Gitignore Support**: Automatically respects `.gitignore` files during parsing\n- **File Operations**: Handles create, modify, move, and delete operations\n- **Code Fences**: Automatically wraps file content with appropriate language syntax highlighting\n- **Safe Paths**: Creates necessary directories when applying changes\n- **Error Handling**: Graceful handling of file read/write errors\n\n## Common Workflow\n\n1. **Extract your project** for LLM analysis:\n ```bash\n python f2llm.py my_project prompt.json\n ```\n\n2. **Send `prompt.json` to your LLM** with instructions\n\n3. **Apply the LLM's response** back to your project:\n ```bash\n python f2llm.py --apply llm_response.json my_project\n ```\n\n## Notes\n\n- The tool preserves file permissions and creates directories as needed\n- Binary files or files that can't be read as UTF-8 will show an error message in their content\n- When moving files, the tool creates necessary parent directories automatically\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI tool to parse files and create LLM prompts",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/mattdravucz/f2llm",
"Issues": "https://github.com/mattdravucz/f2llm/issues"
},
"split_keywords": [
"cli",
" llm",
" file parsing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3ee9f8ce35d3c75f520086c186027a0f93e0c3df9950b4bf9c9a220e366697bb",
"md5": "405cbd6730e40846e0c51d2f7be2c0fe",
"sha256": "8079ea1fa1abcd4b33366c919c8b4ea85d66ac06ffda98b89dedc754b993ff51"
},
"downloads": -1,
"filename": "f2llm-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "405cbd6730e40846e0c51d2f7be2c0fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 5673,
"upload_time": "2025-08-11T09:36:45",
"upload_time_iso_8601": "2025-08-11T09:36:45.312837Z",
"url": "https://files.pythonhosted.org/packages/3e/e9/f8ce35d3c75f520086c186027a0f93e0c3df9950b4bf9c9a220e366697bb/f2llm-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "716839408cfc3b17d9d01c69488897a57b68ad059bde41b88fe78fcbe094971b",
"md5": "cd281640362945cda3b50eca8fe95ce7",
"sha256": "ed38b8e4e61ec62afa8b56bfc05d6ccf63a83468c1705066ab9e1de31c063305"
},
"downloads": -1,
"filename": "f2llm-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "cd281640362945cda3b50eca8fe95ce7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 7028,
"upload_time": "2025-08-11T09:36:46",
"upload_time_iso_8601": "2025-08-11T09:36:46.296405Z",
"url": "https://files.pythonhosted.org/packages/71/68/39408cfc3b17d9d01c69488897a57b68ad059bde41b88fe78fcbe094971b/f2llm-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-11 09:36:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mattdravucz",
"github_project": "f2llm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "f2llm"
}