Smart config file generator — A Python CLI that generates configuration files (YAML, TOML, JSON, .env) from templates with smart defaults based on project type detection.
flowchart LR
A[Project Directory] --> B[Detect Project Type]
B --> C{Project Type}
C -->|Python| D[Python Templates]
C -->|Node| E[Node Templates]
C -->|Docker| F[Docker Templates]
C -->|CI| G[CI Templates]
D --> H[Generate Config]
E --> H
F --> H
G --> H
H --> I{Output Format}
I -->|YAML| J[.yaml]
I -->|TOML| K[.toml]
I -->|JSON| L[.json]
I -->|ENV| M[.env]
pip install configaiOr install from source:
git clone https://github.com/officethree/ConfigAI.git
cd ConfigAI
pip install -e .Auto-detect project type and generate config:
configai generate .Generate a specific format:
configai generate . --format yaml
configai generate . --format toml
configai generate . --format json
configai generate . --format envSpecify project type manually:
configai generate . --project-type python
configai generate . --project-type nodeMerge configs:
configai merge base.yaml override.yaml -o merged.yamlValidate a config against a schema:
configai validate config.yaml --schema schema.jsonList available templates:
configai templatesfrom configai import ConfigAI
ai = ConfigAI()
# Auto-detect project type
project_type = ai.detect_project("/path/to/project")
# Generate configs
env_config = ai.generate_env(project_type)
yaml_config = ai.generate_yaml({"app": {"name": "myapp", "port": 8080}})
# Export to file
ai.export(yaml_config, format="yaml", path="config.yaml")- Auto-detection of Python, Node.js, Docker, and CI projects
- Built-in templates with smart defaults for each project type
- Support for YAML, TOML, JSON, and
.envoutput formats - Config merging with deep override support
- Config validation against JSON schemas
- Extensible template system
- Clean CLI powered by Typer
make install # Install in dev mode
make test # Run tests
make lint # Run linter
make format # Format codeInspired by developer tooling and configuration management trends.
Built by Officethree Technologies | Made with love and AI