genfile 0.6.0

CLI for genfile_core template archive management - create, manage, and materialize code generation templates.
Documentation

Module :: genfile

stable rust-status docs.rs discord

Crates.io docs.rs License: MIT

CLI for template archive management - create, manage, and materialize code generation templates.

Quick Start

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"

Features

  • Archive Management - Create, load, save template archives
  • File Operations - Add, remove, list template files
  • Parameter System - Define and manage template parameters
  • Value Management - Set parameter values for materialization
  • Content Control - Inline or reference-based file storage
  • REPL Mode - Interactive command-line interface
  • Dual Mode - Works as single command or interactive REPL

Interactive REPL

Run without arguments for interactive mode:

genfile
genfile REPL v0.4.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

Documentation

CLI Documentation

Complete command-line interface reference:

API Documentation

Architecture

genfile is built on:

  • genfile_core - Core template archive library
  • unilang - Universal CLI framework with REPL support
  • error_tools - Structured error handling

Commands Overview

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
Materialization .materialize, .unpack
Serialization .pack
Analysis .info, .status, .analyze, .discover.parameters
Help .help, ., .command.help

Development Status

Current version: 0.4.0

All core features implemented and tested (74 integration tests, 100% passing):

  • ✅ Archive lifecycle management (FR1: .archive.*)
  • ✅ File operations (FR2: .file.*)
  • ✅ Parameter and value management (FR3/FR4: .parameter.*, .value.*)
  • ✅ Content transformation (FR5: .content.*)
  • ✅ Template materialization (FR6: .materialize, .unpack)
  • ✅ Archive serialization (FR7: .pack)
  • ✅ Analysis and introspection (FR8: .info, .status, .analyze, .discover.*)
  • ✅ Help system (FR9: .help, ., .command.help)
  • ✅ REPL mode with state persistence

Contributing

See wTools repository for contribution guidelines.

License

MIT - see LICENSE for details.