CLI
The @config-bound/cli package provides the configbound command — a set of tools for working with ConfigBound configurations from the terminal.
Installation
npm install --save-dev @config-bound/cliAfter installation, npx configbound runs the CLI. For global use:
npm install --global @config-bound/cliCommands
| Command | Description |
|---|---|
configbound list | Discover and display all ConfigBound configurations in a directory tree |
configbound export | Export a configuration schema to JSON, YAML, or .env format |
configbound generate bind | Scaffold a new bind — embedded class or publishable package |
How discovery works
list and export both use config discovery — scanning source files for ConfigBound configurations. Discovery reads the actual exports from your TypeScript files. No separate manifest or registration step is required.
export auto-selects a config when only one is found. When multiple configs exist in the same project, it prompts for selection. Pass --config and --name explicitly to skip discovery entirely.
CLI vs. library
The CLI is a companion to the library, not a replacement for it. Schema definition, validation, and value resolution all happen in code. The CLI's job is to inspect what the library produces — listing what configs exist and exporting their schemas as artifacts.