COGS: COnfiguration manaGement S

cogs is a cli tool that allows generation of configuration files through different references sources.

Sources of reference can include:

cogs allows one to deduplicate sources of truth by maintaining a source of reference (the cog file) that points to the location of values (such as port numbers and password strings).

installation:

With go:

Clone this repo and cd into it.

go build -o $GOPATH/bin/ ./cmd/cogs

Without go

PLatform can be Linux/Windows/Darwin:

PL="Darwin" VR="0.9.1" \
  curl -SLk \
  "github.com/Bestowinc/cogs/releases/download/v${VR}/cogs_${VR}_${PL}_x86_64.tar.gz" | \
  tar xvz -C /usr/local/bin cogs

help string:

<div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="COGS COnfiguration manaGement S

Usage:
cogs gen [options]

Options:
-h –help Show this screen.
–version Show version.
–no-enc, -n Skips fetching encrypted vars.
–no-decrypt Skipts decrypting encrypted vars.
–envsubst, -e Perform environmental substitution on the given cog file.
–keys= Include specific keys, comma separated.
–not= Exclude specific keys, comma separated.
–out= Configuration output type [default: json].
: json, toml, yaml, dotenv, raw.

–export, -x If –out=dotenv: Prepends "export " to each line.
–preserve, -p If –out=dotenv: Preserves variable casing.
–sep= If –out=raw: Delimits values with a arator.
“>

COGS COnfiguration manaGement S

Usage:
  cogs gen <ctx> <cog-file> [options]

Options:
  -h --help        Show this screen.
  --version        Show version.
  --no-enc, -n     Skips fetching encrypted vars.
  --no-decrypt	   Skipts decrypting encrypted vars.
  --envsubst, -e   Perform environmental substitution on the given cog file.
  --keys=<key,>    Include specific keys, comma separated.
  --not=<key,>     Exclude specific keys, comma separated.
  --out=<type>     Configuration output type [default: json].
                   <type>: json, toml, yaml, dotenv, raw.

  --export, -x     If --out=dotenv: Prepends "export " to each line.
  --preserve, -p   If --out=dotenv: Preserves variable casing.
  --sep=<sep>      If --out=raw:    Delimits values with a <sep>arator.