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]

  -G, --generator strings   generator tags to run, default is all
  -h, --help                help for create
  -I, --input strings       inputs to the create module
  -O, --outdir string       base directory to write all output to

Global Flags:
      --inject-env       inject all ENV VARs as default tag vars
  -p, --package string   the Cue package context to use during execution
  -q, --quiet            turn off output and assume defaults at prompts
  -t, --tags strings     @tags() to be injected into CUE code
  -v, --verbosity int    set the verbosity of output
2023 Hofstadter, Inc