Files
beads/cmd/bd/testdata/init.txt
Steve Yegge 0215e73780 Fix config system: rename config.json → metadata.json, fix config.yaml loading
- Renamed config.json to metadata.json to clarify purpose (database metadata)
- Fixed config.yaml/config.json conflict by making Viper explicitly load only config.yaml
- Added automatic migration from config.json to metadata.json on first read
- Fixed jsonOutput variable shadowing across 22 command files
- Updated bd init to create both metadata.json and config.yaml template
- Fixed 5 failing JSON output tests
- All tests passing

Resolves config file confusion and makes config.yaml work correctly.
Closes #178 (global flags), addresses config issues from #193

Amp-Thread-ID: https://ampcode.com/threads/T-e6ac8192-e18f-4ed7-83bc-4a5986718bb7
Co-authored-by: Amp <amp@ampcode.com>
2025-11-02 14:31:22 -08:00

17 lines
543 B
Plaintext

# Test bd init command
bd init --prefix test
stdout 'initialized successfully'
exists .beads/beads.db
exists .beads/metadata.json
exists .beads/.gitignore
grep '^\*\.db$' .beads/.gitignore
grep '^\*\.db-journal$' .beads/.gitignore
grep '^\*\.db-wal$' .beads/.gitignore
grep '^\*\.db-shm$' .beads/.gitignore
grep '^daemon\.log$' .beads/.gitignore
grep '^daemon\.pid$' .beads/.gitignore
grep '^bd\.sock$' .beads/.gitignore
grep '^!\*\.jsonl$' .beads/.gitignore
grep '^!metadata\.json$' .beads/.gitignore
grep '^!config\.json$' .beads/.gitignore