Configuration file viewer, editor, and validator. Parse, inspect, modify, compare, and validate config files across many formats -- all from a single binary.
- YAML
- JSON
- TOML
- INI
- .env
- SSH config
- nginx
- Apache / httpd
- sysctl
- /etc/hosts
Download the latest release for your platform from the releases page.
go install github.com/jmsperu/confedit@latestgit clone https://github.com/jmsperu/confedit.git
cd confedit
make buildconfedit /etc/nginx/nginx.conf # view parsed config
confedit .env # view .env file
confedit get .env DATABASE_URL # get a specific value
confedit set .env DATABASE_URL "new" # set a value
confedit validate config.yml # validate syntax
confedit diff config.yml config.prod.yml # compare two filesParse and display a config file as a formatted table.
confedit <file>
confedit -o json <file> # output as JSON
confedit -o flat <file> # output as KEY=VALUE lines
confedit -s server <file> # filter by section
confedit -f password <file> # filter keys/values by substring| Flag | Description |
|---|---|
-o, --output |
Output format: table (default), json, flat |
-s, --section |
Filter entries by section name |
-f, --filter |
Filter keys or values by substring match |
Retrieve a single config value by key.
confedit get .env DATABASE_URL
confedit get config.yml server.portUpdate a config value in-place.
confedit set .env DATABASE_URL "postgres://localhost/mydb"
confedit set config.ini max_connections 100Validate config file syntax and report errors.
confedit validate config.yml
confedit check nginx.confCompare two config files side-by-side, showing added, removed, and changed keys.
confedit diff config.yml config.prod.yml
confedit diff .env .env.productionSearch for keys or values matching a pattern (case-insensitive).
confedit search .env PASSWORD
confedit search config.yml databaseDetect and display the config file format.
confedit type /etc/nginx/nginx.conf
# /etc/nginx/nginx.conf: nginxMIT