Your config archaeology sidekick. Point it at a directory (or pipe stuff in) and it flattens JSON / YAML / XML / key=value blobs so you can actually see what you're running in prod (or blindly copied from Stack Overflow in 2014). It doesn’t judge your configs. Much.
- Scan current dir or explicit path (falls back to OS defaults only if CWD somehow explodes)
- Auto-detect & parse: JSON, YAML, XML, .conf/.ini/.properties/.txt key=value, raw text fallback
- Case-insensitive filtering: filename (-filter), key (-key), value (-value)
- Flatten nested structures (dot notation)
- Output: text (default), json, table
- Profiles & defaults via
~/.konfetti.yaml - Pipe stdin into
scanorexplain - Warnings for unreadable paths (silence with
-no-warn)
go build -o konfetti # build binary
./konfetti scan -key debugOr just: go run main.go scan -key debug
Cross-compile example: GOOS=linux GOARCH=amd64 go build -o konfetti-linux.
scan– find & parse config filesexplain– very lightweight heuristic summary (stdin or file)explore– placeholder for future TUItips– show a small helpful nudge
| Flag | Purpose |
|---|---|
-path |
Directory to scan (single or comma-separated list) |
-filter |
Filename substring filter |
-key |
Match setting key (case-insensitive substring) |
-value |
Match setting value (case-insensitive substring) |
-output |
text (default) |
-no-warn |
Suppress unreadable path warnings |
-profile |
Use profile from config file |
-interactive |
Prompt before scanning when path empty |
Defaults if no path given: scan current working directory. If that fails, OS fallbacks:
- macOS / Linux:
/etc,~/.config(+~/Library/Application Supporton macOS) - Windows:
%ProgramData%,%APPDATA%,%LOCALAPPDATA%
cat app.yaml | ./konfetti scan -key log
curl -s https://example.com/config.json | ./konfetti explain
echo -e 'MODE=prod\nLOG_LEVEL=info' | ./konfetti scan -value prod -output table~/.konfetti.yaml structure:
defaults:
output: text
profiles:
debug:
key: debug
output: table
prod:
value: prod
output: jsonPrecedence: defaults < profile < CLI flag.
File: /etc/app/config.yaml [yaml]
server.port = 8080
logging.level = error
logging.level = warn
logging.level = info
---
File: ./app/settings.json [json]
database.host = db.example.com
database.port = 5432
feature.enabled = true
---
- 0 matches? Loosen filters or point at a richer path (
-path ~/.config). - Multiple paths?
-path "./cfg,/etc,/opt/app". - Too noisy? Add
-no-warn. - Want structured scripting?
-output json. - Stdin parse failed? It probably wasn’t valid JSON/YAML/XML; fell back to raw key=value or plain text.
- Windows Defender flagged the exe? New unsigned Go binaries sometimes trigger generic ML detections (e.g.
Win32/Sabsik.FL.A!ml). SeeAV-SUBMISSION.mdfor false positive submission steps or use a signed release when available.
- Real explain engine
- TUI explorer
- Sensitive key detector
MIT (unless entropy wins). Built with coffee & sarcasm.
Enjoy responsibly. Spray confetti, not secrets.