cosmos-sdk/tools/confix
dependabot[bot] a7d8477a19
build(deps): Bump github.com/decred/dcrd/dcrec/secp256k1/v4 from 4.1.0 to 4.2.0 (#15839)
Bumps [github.com/decred/dcrd/dcrec/secp256k1/v4](https://github.com/decred/dcrd) from 4.1.0 to 4.2.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="bacf8444a8"><code>bacf844</code></a> secp256k1: Prepare v4.2.0.</li>
<li><a href="e0ad9b8687"><code>e0ad9b8</code></a> secp256k1: Update PrivKeyFromBytes comment.</li>
<li><a href="6c5b953d28"><code>6c5b953</code></a> secp256k1: Add GeneratePrivateKeyFromRand tests.</li>
<li><a href="bd0b82d0be"><code>bd0b82d</code></a> secp256k1: Require concerete rand for privkey gen.</li>
<li><a href="b4fab9efd8"><code>b4fab9e</code></a> chaincfg/chainhash: Prepare v1.0.4.</li>
<li><a href="d71616bddb"><code>d71616b</code></a> secp256k1: Add GeneratePrivateKeyFromRand function</li>
<li><a href="9aa79ec168"><code>9aa79ec</code></a> chaincfg: Introduce subsidy split change r2 agenda.</li>
<li><a href="7db7325c42"><code>7db7325</code></a> chaincfg: Introduce BLAKE3 PoW agenda.</li>
<li><a href="ce46220cf7"><code>ce46220</code></a> secp256k1: Fix typo in a doc comment</li>
<li><a href="ca02bcaf5a"><code>ca02bca</code></a> docs: Add release notes for v1.7.7.</li>
<li>Additional commits viewable in <a href="https://github.com/decred/dcrd/compare/blockchain/v4.1.0...dcrec/secp256k1/v4.2.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/decred/dcrd/dcrec/secp256k1/v4&package-manager=go_modules&previous-version=4.1.0&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
2023-04-14 10:14:21 +00:00
..
cmd Style: lints for tools (#15637) 2023-03-31 08:15:27 +00:00
data chore: clean-up after go-plugin system pr (#15402) 2023-03-14 23:03:48 +00:00
testdata feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
.gitignore feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
.goreleaser.yml feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
CHANGELOG.md feat: add diff and home command in confix (#14568) 2023-01-16 13:27:41 +00:00
diff.go style: more linting (#15616) 2023-03-30 12:05:50 +00:00
doc.go feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
file.go feat: add diff and home command in confix (#14568) 2023-01-16 13:27:41 +00:00
go.mod build(deps): Bump github.com/decred/dcrd/dcrec/secp256k1/v4 from 4.1.0 to 4.2.0 (#15839) 2023-04-14 10:14:21 +00:00
go.sum build(deps): Bump github.com/decred/dcrd/dcrec/secp256k1/v4 from 4.1.0 to 4.2.0 (#15839) 2023-04-14 10:14:21 +00:00
log.go feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
Makefile feat: create config fix tool (#14342) 2023-01-10 10:28:41 +00:00
migrations.go refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00
README.md docs: replace Tendermint references in docs with CometBFT (#15339) 2023-03-14 20:41:35 +01:00
sonar-project.properties ci: make sonarcloud more quiet (#14585) 2023-01-12 10:24:56 +00:00
upgrade_test.go refactor: rename to CometBFT (#14914) 2023-02-06 18:11:14 +00:00
upgrade.go refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00

sidebar_position
1

Confix

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:

import "cosmossdk.io/tools/confix/cmd"

Find the following line:

initRootCmd(rootCmd, encodingConfig)

After that line, add the following:

rootCmd.AddCommand(
    confixcmd.ConfigCommand(),
)

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:

go install cosmossdk.io/tools/confix/cmd/confix@latest

:::warning 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:

confix --help

Use in simd:

simd config fix --help

Get

Get a configuration value, e.g.:

simd config get app pruning # gets the value pruning from app.toml
simd config get client chain-id # gets the value chain-id from client.toml
confix get ~/.simapp/config/app.toml pruning # gets the value pruning from app.toml
confix get ~/.simapp/config/client.toml chain-id # gets the value chain-id from client.toml

Set

Set a configuration value, e.g.:

simd config set app pruning "enabled" # sets the value pruning from app.toml
simd config set client chain-id "foo-1" # sets the value chain-id from client.toml
confix set ~/.simapp/config/app.toml pruning "enabled" # sets the value pruning from app.toml
confix set ~/.simapp/config/client.toml chain-id "foo-1" # sets the value chain-id from client.toml

Migrate

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

simd config migrate v0.47 # migrates defaultHome/config/app.toml to the latest v0.47 config
confix migrate v0.47 ~/.simapp/config/app.toml # migrate ~/.simapp/config/app.toml to the latest v0.47 config

Diff

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

simd config diff v0.47 # gets the diff between defaultHome/config/app.toml and the latest v0.47 config
confix diff v0.47 ~/.simapp/config/app.toml # gets the diff between ~/.simapp/config/app.toml and the latest v0.47 config

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.