Skip to content
/ cfold Public

CLI tool for folding files into prompt/json

License

Notifications You must be signed in to change notification settings

wr1/cfold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

215 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoverageTestsVersion

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

uv pip install https://github.com/wr1/cfold.git

Usage

CLI help

Help

Example output

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.

About

CLI tool for folding files into prompt/json

Topics

Resources

License

Stars

Watchers

Forks

Languages