CLI
Categories:
Arguments
Arguments must be entered before commands.
-c [path]
Path to the JSON/Jsonnet configuration file.
-f [format]
Set log format (human, kv, raw, default: human).
-l [level]
Set minimum log level (none, debug, info, error, default: info).
-n
Disable colored log output.
-p
Disable paging via less.
-x [key=value]
Set config key=value (can be provided multiple times)
Commands
build
Import Pattern Jsonnet files from path, execute build Commands, sign a JWT, and output the JWT to the destination path.
compare
Compare two JWTs to see if they have the same etchaBuildManfiest, etchaPattern, and etchaVersion (can optionally ignore version mismatch).
config
Show the rendered config from all sources (file, environment variables, and command line arguments).
copy
Copy a local file or HTTP path to a destination path. Utilizes the same function as Jsonnet getFile and can set HTTP headers in the source path using #
.
dir
Manages a directory on the local machine using check/change/remove. Can optionally set permissions, owner, or group, otherwise permissions will be 0755
and the user and group will be inherited from the current user.
eula
View the Etcha End User License Agreement (EULA).
file
Manages a file on the local machine using check/change/remove. Can optionally provide contents directly or via stdin, or set permissions, owner, or group, otherwise permissions will be 0644
and the user and group will be inherited from the current user.
gen-keys
Generate cryptographic keys for use with signing and encryption. The keys will be output as JSON:
{
"privateKey": <private key>,
"publicKey": <public key>,
}
See Cryptography for more details around key formats and usage guides.
init
Create folders, files, and libraries for developing Patterns. Subsequent runs of init will only update the files under lib/etcha
. See libraries for documentation on the modules created by init.
jq
Query JSON from stdin using jq. Supports standard JQ filters, and the -r
flag to render raw values.
jwt
Show the contents of a JWT. Will also report any verification errors.
line
Manage a line in a file or in text on the local machine from stdin using check/change. Match is the regexp of the line to match, and the replacement text that will be set for the line. If the line does not exist, it will be appended to the end of the file. Replacement text can use capture groups from within the regexp, such as ${1}
.
link
Manage a symlink on the local machinge using check/change.
lint
Lint all .jsonnet
and .libsonnet
files in the path, checking the syntax and optionally the formatting of the files. Can also use external linters to provide more validation. See Linting Patterns for more information.
local
Import Pattern Jsonnet files from path, execute all Commands in the specified mode locally. Can optionally specify a source
and a Parent ID to filter Commands with.
push
Push ad-hoc commands or a signed pattern to a remote Etcha instance. See Running Commands for more information.
render
Render a Pattern from JWT or Jsonnet and display the result.
run
Run Etcha in listening mode, periodically pulling new patterns, receiving new patterns via push, and exposing metrics. Can specify an additional flag to only run once and exit.
shell
Start an interactive shell on the remote Etcha instance. See Shell Access for more information.
test
Test all patterns in path, optionally filtering for specific Command Parent IDs. See Testing Patterns for more information.