CLI

The Configu CLI is the best interface for start using Configu, it provides you all the functionallity you need for start managing configuration locally or with stores.

Installation

The CLI code is available an an open-source, and the installaition is lightweight binary available for every major operating system, CI/CD platform, and Docker.

Installation script

Linux
MacOS
Windows
Docker
1curl https://configu.io/cli/install.sh | shell

CI/CD snippets

GitHub Action
GitLab CI/CD
Jenkins
Circle CI
Azure DevOps Pipelines
Bitbucket
TeamCity
Buddy
1- uses: configu/setup-cli-action@v1.0.0
2  with:
3    org: ${{ secrets.CONFIGU_ORG }}
4    token: ${{ secrets.CONFIGU_TOKEN }}
5- run: configu [COMMAND]

Init command

Init a config schema (.cfgu.json) file in the current working directory

Configu init --name "some-schema" --examples

Store command

A store specifies the location of the data. You can connect the CLI to multiple stores (each one of them needs to have a different name (--name) and if non of them is "default" the default store will be the first one). The --uri flag supports full paths and interactive logins; to log in interactively, simply provide the store name and end with -. You can specify the whole path, including the user/organization and password/token. for example, using Configiu's store interactively:

Configu store --name "default" --uri "configu://-"

If you want the complete path, please enter:

Configu store --name "default" --uri "configu://my-access-token@my-org"

Upsert command

The upsert (update/insert) command creates/updates a set of values for your schema.

Required flags:

  • --set: a set name built as an absolute path from the root set /
  • --schema: schema path can be an absolute or relative path (to the .cfgu.json on your file system); if you have linked values you need to provide all related schemas as well

Optional flags:

  • --store: provide the name of a saved store or specify the store URI; the "default" store will be used by default.
  • --configu: config lets you assign values to the schema keys directly from the CLI as a key-value pair or as a linked to value on a another store
  • --interactive: it will open Configu's app when used with Configu store
  • --import: values can be imported from existing configuration files like .env, JSON and etc (the file must be flat and without hierarchy)
Configu upsert \
[--store "store-name"]
--set "/production/example" --schema "./some-schema.cfgu.json" [--schema "./other/schema.cfgu.json"] \
[--config "key=value" --config "key2={ type: 'HashiCorpVault', path: 'kv/production/some-secret' }"]
[--interactive]
[--import "file-path"]

Export command

Export allows you to export and synchronize your configuration across all your deployments, and it runs easily locally, on your CI/CD servers, on your clusters, or anywhere else you need it. You can use Configu CLI with any automation or orchestration software.

configu export /
--set "/production/example" --schema "./some-schema.cfgu.json" [--schema "./other/schema.cfgu.json"] \
[--matrix "['/development', './some-schema.cfgu.json'] ['/staging', './other/schema.cfgu.json']" ]
[--format] \
[--template] \
[--runtime]

As it has many options and flags, we recommend using the CLI command generator if this is your first time, navigate to IntegrationsConfigu CLI).

Check out the Exporting page for more information on the formats and runtime integrations.

Delete command

Help command