| Crates.io | genfile |
| lib.rs | genfile |
| version | 0.3.0 |
| created_at | 2025-10-27 05:37:05.319374+00 |
| updated_at | 2025-10-27 05:37:05.319374+00 |
| description | CLI for genfile_core template archive management - create, manage, and materialize code generation templates. |
| homepage | https://github.com/Wandalen/wTools/tree/master/module/core/genfile |
| repository | https://github.com/Wandalen/wTools/tree/master/module/core/genfile |
| max_upload_size | |
| id | 1902285 |
| size | 328,194 |
CLI for template archive management - create, manage, and materialize code generation templates.
Install via cargo:
cargo install genfile
Create a portable template archive from a directory:
# Pack directory into archive
genfile .pack input::"./my-template" output::"template.json"
# Load and materialize
genfile .archive.load path::"template.json"
genfile .value.set name::"project_name" value::"my-project"
genfile .materialize destination::"./output"
Run without arguments for interactive mode:
genfile
genfile REPL v0.1.0
Type '.help' for help, 'exit' to quit
genfile[0]> .archive.new name::"api-scaffold"
Created archive: api-scaffold
genfile[1]> .file.add path::"main.rs" content::"fn main() {}"
Added file: main.rs
genfile[2]> .archive.save path::"api.json"
Saved archive to: api.json
genfile is built on:
All command definitions are maintained as YAML specifications in commands/*.yaml:
commands/
├── archive.yaml - Archive lifecycle (.archive.*)
├── file.yaml - File operations (.file.*)
├── parameter.yaml - Parameter management (.parameter.*)
├── value.yaml - Value management (.value.*)
├── content.yaml - Content management (.content.*)
├── materialize.yaml - Template materialization (.materialize, .unpack)
├── pack.yaml - Archive serialization (.pack)
└── analysis.yaml - Analysis and introspection (.info, .status, .analyze, .discover.*)
These YAML files serve as the authoritative specification for all commands, including arguments, descriptions, examples, and functional requirement mappings. The Rust implementation in src/commands/ registers handlers that implement these specifications.
| Category | Commands |
|---|---|
| Archive | .archive.new, .archive.load, .archive.save, .archive.from_directory |
| Files | .file.add, .file.remove, .file.list, .file.show |
| Parameters | .parameter.add, .parameter.list, .parameter.remove |
| Values | .value.set, .value.list, .value.clear |
| Content | .content.internalize, .content.externalize, .content.list |
Current version: 0.2.0
All core features implemented and tested (53 integration tests, 100% passing):
.archive.*).file.*).parameter.*, .value.*).content.*).materialize, .unpack).pack).info, .status, .analyze, .discover.*).help, ., .command.help)See wTools repository for contribution guidelines.
MIT - see LICENSE for details.