https://github.com/wr1/cfold
CLI tool for folding files into prompt/json
https://github.com/wr1/cfold
grok-api vibecoding
Last synced: 2 months ago
JSON representation
CLI tool for folding files into prompt/json
- Host: GitHub
- URL: https://github.com/wr1/cfold
- Owner: wr1
- License: mit
- Created: 2025-03-31T12:42:27.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-12-01T11:41:34.000Z (4 months ago)
- Last Synced: 2025-12-03T23:41:23.717Z (4 months ago)
- Topics: grok-api, vibecoding
- Language: Python
- Homepage:
- Size: 2.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# cfold
- Fold files and instructions into json
- Unfold LLM return jsons in same format
- Intended to let LLM's produce codebase changes in a controlled manner
## Installation
```bash
uv pip install https://github.com/wr1/cfold.git
```
## Usage
### CLI help

### Example output

## Fold File Format
- JSON structure with keys: `instructions` (list of objects), `files`.
- Each instruction object: `{type: 'system'|'user'|'assistant', content: string, name: string (optional)}`.
- `files`: Array of objects with `path` (relative to CWD), `content` (full file content, optional if deleting), and `delete` (bool, default false).
- Modify files by updating `content` (with `delete: false`).
- Delete files with `delete: true` (content optional).
- Add new files by adding new objects with `path` and `content`.
- Move/rename: Delete old (`delete: true`) and add new with updated path and content.