Summary
Implement the render subcommand and internal/render package for template rendering with environment variable substitution and optional Go templates.
Requirements
internal/render package:
envsubst mode: replace ${VAR} and $VAR patterns with environment variable values
- Go
text/template mode: full Go template support with env vars as data
- Mode selection via
--mode envsubst|gotemplate (default: envsubst)
render subcommand:
--template flag: path to template file (required)
--output flag: relative output path within workdir (required)
--workdir flag: output directory (default /work)
- Path traversal prevention via
internal/safety
- Create intermediate directories as needed
Acceptance Criteria
Summary
Implement the
rendersubcommand andinternal/renderpackage for template rendering with environment variable substitution and optional Go templates.Requirements
internal/renderpackage:envsubstmode: replace${VAR}and$VARpatterns with environment variable valuestext/templatemode: full Go template support with env vars as data--mode envsubst|gotemplate(default:envsubst)rendersubcommand:--templateflag: path to template file (required)--outputflag: relative output path within workdir (required)--workdirflag: output directory (default/work)internal/safetyAcceptance Criteria
internal/render/render.gowith envsubst and Go template implementationsinternal/render/render_test.gowith tests for: envsubst, Go templates, missing vars, empty input, special charactersinternal/cmd/render.gowith full subcommand implementationinternal/cmd/render_test.gowith command-level testscmd/initium/main.godocs/usage.mdupdatedCHANGELOG.mdupdated