39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# CommandKit ckconfig
|
|
|
|
`ckconfig` adds configuration inspection commands to Go applications that use
|
|
CommandKit and ConfigKit. Operators can view settings, validate configuration,
|
|
find where values came from, and compare two configurations.
|
|
|
|
The application chooses which commands to install. Importing the package alone
|
|
does not install commands.
|
|
|
|
## Module
|
|
|
|
The module path is `go.maximumdirect.net/ckconfig`. It does not import PromptKit.
|
|
See the [consumer guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#module-selection)
|
|
for compatible releases and Go requirements.
|
|
|
|
## Example
|
|
|
|
To inspect one application configuration, pass your loader to `AppCommand`:
|
|
|
|
```go
|
|
app, err := commandkit.New(identity, ckconfig.AppCommand(loadAppConfig))
|
|
```
|
|
|
|
For multiple named configurations or application-specific flags, use
|
|
`ckconfig.Command` with a `ckconfig.Suite`. The
|
|
[integration guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#configkit-scopes)
|
|
explains loader setup, inputs, and shared state.
|
|
|
|
The maintained [simple example](examples/simple) shows a complete consumer.
|
|
The [CommandKit CLI reference](https://gitea.maximumdirect.net/eric/CommandKit/src/branch/main/docs/cli.md#configuration-scopes)
|
|
describes its operator-facing behavior.
|
|
|
|
## License and attribution
|
|
|
|
This module is licensed under the [GNU Lesser General Public License v3.0 or
|
|
later](COPYRIGHT). The accompanying [LICENSE](LICENSE) contains the full LGPL
|
|
v3 and GPL v3 texts. See [third-party attribution](docs/oss/attribution.md)
|
|
for incorporated and dependency notices.
|