hof / create

hof/create is a command for one-line bootstrapping and application blueprints. Add a Creator to any git repository to provide a “create-react-app” like experience.

$ hof help create

hof create enables you to easily bootstrap
code for full projects, components, and more.

Examples can be found in the documentation:


By adding one config file and templates to your repo
your users can quickly bootstrap full applications,
tooling configuration, and other code using your project.
Share consistent scaffolding, configurable to users.

Any hof generator can also support the create command
and most choose to bootstrap a generator at minimum.
This means you get all the same benefits from
hof's code generation engine, turning your
bootstrapped code into a living template.

Run create from any git repo and any ref

  hof create github.com/username/repo@v1.2.3
  hof create github.com/username/repo@a1b2c3f
  hof create github.com/username/repo@latest

-I supplies inputs as key/value pairs or from a file
when no flag is supplied, an interactive prompt is used

  hof create github.com/username/repo@v1.2.3 \
    -I name=foo -I val=bar \
    -I @inputs.cue

You can also reference local generators by their cue inputs.
This local lookup is indicated by ./ or ../ starting a path.
Use this mode when developing and testing locally.

  hof create ../my-gen

  hof create <module path> [extra args] [flags]

      --exec                    enable pre/post-exec support when generating code
  -G, --generator stringArray   generator tags to run, default is all
  -h, --help                    help for create
  -O, --outdir string           base directory to write all output to

Global Flags:
  -E, --all-errors           print all available errors
  -i, --ignore-errors        turn off output and assume defaults at prompts
  -D, --include-data         auto include all data files found with cue files
  -V, --inject-env           inject all ENV VARs as default tag vars
  -I, --input stringArray    extra data to unify into the root value
  -p, --package string       the Cue package context to use during execution
  -l, --path stringArray     CUE expression for single path component when placing data files
  -q, --quiet                turn off output and assume defaults at prompts
  -d, --schema stringArray   expression to select schema to apply to data files
      --stats                print generator statistics
  -0, --stdin-empty          A flag that ensure stdin is zero and does not block
  -t, --tags stringArray     @tags() to be injected into CUE code
  -v, --verbosity int        set the verbosity of output
      --with-context         add extra context for data files, usable in the -l/path flag