7000pctAUTO ef344031f7
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
Add formatters, utils, schemas and version
2026-01-29 10:50:32 +00:00
2026-01-29 10:47:55 +00:00
2026-01-29 10:47:55 +00:00
2026-01-29 10:47:55 +00:00
2026-01-29 10:47:56 +00:00
2026-01-29 10:47:57 +00:00

ConfigForge

Python Version License Version

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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Description
A CLI tool for validating, converting, and generating schemas for configuration files. Supports JSON, YAML, TOML, and ENV formats.
Readme MIT 80 KiB
2026-01-29 10:52:25 +00:00
Languages
Python 100%