Skip to main content
Confix is a configuration management tool that allows you to manage your configuration via CLI. It is based on the CometBFT RFC 019.

Installation

Add Config Command

To add the confix tool, it’s required to add the ConfigCommand to your application’s root command file (e.g. simd/cmd/root.go). Import the confixCmd package:
Find the following line:
After that line, add the following:
The ConfixCommand function builds the config root command and is defined in the confixCmd package (cosmossdk.io/tools/confix/cmd). An implementation example can be found in simapp. The command will be available as simd config.

Using Confix Standalone

To use Confix standalone, without having to add it in your application, install it with the following command:
Currently, due to the replace directive in the Confix go.mod, it is not possible to use go install. Building from source or importing in an application is required until that replace directive is removed.
Alternatively, for building from source, simply run make confix. The binary will be located in tools/confix.

Usage

Use standalone:
Use in simd:

Get

Get a configuration value, e.g.:

Set

Set a configuration value, e.g.:

Migrate

Migrate a configuration file to a new version, e.g.:

Diff

Get the diff between a given configuration file and the default configuration file, e.g.:

Maintainer

At each SDK modification of the default configuration, add the default SDK config under data/v0.XX-app.toml. This allows users to use the tool standalone.

Credits

This project is based on the CometBFT RFC 019 and their own implementation of confix.