README
¶
hof - the high code framework
hof
combines data models, code generation, and modules
to help you write and maintain large amounts of code.
- data model - define & manage data models - the source of truth
- code generation - data + template = _ (anything) - technology agnostic
- modules - composable data models & generators - an ecosystem
hof
is a CLI tool you will add to your workflows.
It is technology agnostic, captures common patterns and boilerplate,
has modules that span technologies, and continues to work as your application evolves.
- data model management so you can checkpoint, diff, and calculate migrations
- code generation to scaffold consistent code and boilerplate across the stack
- diff3 to support custom code, data model updates, and code regeneration
- modular and composable code generators with dependency management
hof
uses CUE extensively to power the DX and implementation.
There are also several utilities subcommands for
adhoc file generation, data transformations, and
CUE powered scripting.
Install
You will have to download hof
the first time.
After that hof
will prompt you to update and
install new releases as they become available.
You can find the latest version from the
releases page
or use hof
to install a specific version of itself with hof update --version vX.Y.Z
.
# Latest Release
go install github.com/hofstadter-io/hof/cmd/hof@latest
# Latest Commit
go install github.com/hofstadter-io/hof/cmd/hof@_dev
# Shell Completions (bash, zsh, fish, power-shell)
echo ". <(hof completion bash)" >> $HOME/.profile
source $HOME/.profile
# Show the help text
hof --help
Documentation
Please see docs.hofstadter.io to learn more.
The first-example
will take you through the process
of creating and using a simple generator
Several demos in a separate repository
and various hofmod-*
repositories are available for you to use.
Join us on Slack! https://hofstadter-io.slack.com We are more than happy to answer your questions.
Main Commands
hof
hof - the high code framework
Learn more at https://docs.hofstadter.io
Usage:
hof [flags] [command] [args]
Main commands:
datamodel manage, diff, and migrate your data models
gen create arbitrary files from data with templates and generators
flow run CUE pipelines with the hof/flow DAG engine
mod polyglot dependency management based on go mods and MVS
Additional commands:
help help about any command
update check for new versions and run self-updates
version print detailed version information
completion generate completion helpers for your terminal
feedback send feedback, bug reports, or any message
Flags:
-h, --help help for hof
-p, --package string the Cue package context to use during execution
-q, --quiet turn off output and assume defaults at prompts
-v, --verbose int set the verbosity of output
Use "hof [command] --help / -h" for more information about a command.
Use "hof topic [subject]" for more information about a subject.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
context
This package provides a context for Tasks and a registry for their usage in flows.
|
This package provides a context for Tasks and a registry for their usage in flows. |
connector
Package connector ...
|
Package connector ... |
datamodel
package datamodel - for modeling and managing that model
|
package datamodel - for modeling and managing that model |
diff3
Package diff3 implements a three-way merge algorithm Original version in Javascript by Bryan Housel @bhousel: https://github.com/bhousel/node-diff3, which in turn is based on project Synchrotron, created by Tony Garnock-Jones.
|
Package diff3 implements a three-way merge algorithm Original version in Javascript by Bryan Housel @bhousel: https://github.com/bhousel/node-diff3, which in turn is based on project Synchrotron, created by Tony Garnock-Jones. |
gotils/cache
Package cache implements a build artifact cache.
|
Package cache implements a build artifact cache. |
gotils/cmd/txtar-addmod
The txtar-addmod command adds a module as a txtar archive to the a testdata module directory as understood by the goproxytest package (see https://godoc.org/github.com/hofstadter-io/hof/lib/gotils/goproxytest).
|
The txtar-addmod command adds a module as a txtar archive to the a testdata module directory as understood by the goproxytest package (see https://godoc.org/github.com/hofstadter-io/hof/lib/gotils/goproxytest). |
gotils/cmd/txtar-c
The txtar-c command archives a directory tree as a txtar archive printed to standard output.
|
The txtar-c command archives a directory tree as a txtar archive printed to standard output. |
gotils/cmd/txtar-goproxy
The txtar-goproxy command runs a Go module proxy from a txtar module directory (as manipulated by the txtar-addmod command).
|
The txtar-goproxy command runs a Go module proxy from a txtar module directory (as manipulated by the txtar-addmod command). |
gotils/cmd/txtar-x
The txtar-x command extracts a txtar archive to a filesystem.
|
The txtar-x command extracts a txtar archive to a filesystem. |
gotils/dirhash
Package dirhash defines hashes over directory trees.
|
Package dirhash defines hashes over directory trees. |
gotils/fmtsort
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.
|
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages. |
gotils/goproxytest
Package goproxytest serves Go modules from a proxy server designed to run on localhost during tests, both to make tests avoid requiring specific network servers and also to make them significantly faster.
|
Package goproxytest serves Go modules from a proxy server designed to run on localhost during tests, both to make tests avoid requiring specific network servers and also to make them significantly faster. |
gotils/gotooltest
Package gotooltest implements functionality useful for testing tools that use the go command.
|
Package gotooltest implements functionality useful for testing tools that use the go command. |
gotils/intern/syscall/windows/sysdll
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself.
|
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself. |
gotils/intern/textutil
package textutil contains text processing utilities.
|
package textutil contains text processing utilities. |
gotils/lockedfile
Package lockedfile creates and manipulates files whose contents should only change atomically.
|
Package lockedfile creates and manipulates files whose contents should only change atomically. |
gotils/modfile
Package modfile implements parsing and formatting for go.mod files.
|
Package modfile implements parsing and formatting for go.mod files. |
gotils/module
Package module defines the module.Version type along with support code.
|
Package module defines the module.Version type along with support code. |
gotils/par
Package par implements parallel execution helpers.
|
Package par implements parallel execution helpers. |
gotils/renameio
Package renameio writes files atomically by renaming temporary files.
|
Package renameio writes files atomically by renaming temporary files. |
gotils/semver
Package semver implements comparison of semantic version strings.
|
Package semver implements comparison of semantic version strings. |
gotils/testenv
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
|
Package testenv provides information about what functionality is available in different testing environments run by the Go team. |
gotils/txtar
Package txtar implements a trivial text-based file archive format.
|
Package txtar implements a trivial text-based file archive format. |
mod/parse/lazyregexp
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
|
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init. |
yagu/configdir
Package configdir provides a cross platform means of detecting the system's configuration directories.
|
Package configdir provides a cross platform means of detecting the system's configuration directories. |
yagu/par
Package par implements parallel execution helpers.
|
Package par implements parallel execution helpers. |
Package testscript provides support for defining filesystem-based tests by creating scripts in a directory.
|
Package testscript provides support for defining filesystem-based tests by creating scripts in a directory. |
shell
Package ishell implements an interactive shell.
|
Package ishell implements an interactive shell. |