8fa0ee82c1e6b1d7a964a0b09b3c4c38ff431186
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / build-package (push) Has been cancelled
ConfigForge
A powerful CLI tool for validating, converting, and generating schemas for configuration files. Supports JSON, YAML, TOML, and ENV formats with JSON Schema validation, format conversion, TypeScript interface generation, and an interactive schema wizard.
Features
- Validate configuration files against JSON Schema with detailed error reporting
- Convert between configuration formats (JSON, YAML, TOML, ENV)
- Generate TypeScript interfaces from JSON Schema or sample data
- Interactive Schema Wizard for creating schemas without writing JSON
- Multiple Output Formats - JSON, YAML, table, and colored terminal output
- Dry Run Mode - Preview validation errors without failing
Installation
pip install -e .
Quick Start
# Validate a configuration file
configforge validate config.json schema.json
# Convert between formats
configforge convert config.yaml --format toml
# Generate TypeScript interfaces
configforge generate schema.json --interface-name AppConfig
# Create a new schema interactively
configforge schema --output schema.json
Commands
validate
Validate a configuration file against a JSON Schema:
configforge validate config.json schema.json
configforge validate config.yaml schema.json --format table
configforge validate config.toml schema.json --dry-run
convert
Convert a configuration file between formats:
configforge convert config.json --format yaml
configforge convert app.yaml --output app.toml
configforge convert config.toml --format env
generate
Generate TypeScript interfaces from JSON Schema or config data:
configforge generate schema.json --interface-name AppConfig
configforge generate config.json --from-data --output types.ts
schema
Interactively generate a JSON Schema:
configforge schema --output schema.json
configforge schema --format yaml
configforge schema --from-config config.json
Supported Formats
| Format | Extensions | Read | Write |
|---|---|---|---|
| JSON | .json | ✓ | ✓ |
| YAML | .yaml, .yml | ✓ | ✓ |
| TOML | .toml | ✓ | ✓ |
| ENV | .env | ✓ | ✓ |
Development
pip install -e ".[dev]"
pytest tests/
ruff check .
mypy configforge/
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
License
MIT License - see LICENSE file for details.
Releases
1
ConfigForge v1.0.0
Latest
Languages
Python
100%