Skip to content

Conversation

@amberpixels
Copy link
Owner

No description provided.

…amespaced structure

- Add config package with JSON file storage in ~/.pho/config.json
- Support namespaced config keys (mongo.*, postgres.*, app.*, etc)
- Implement config CLI commands: get, set, list
- Add environment variable override support for all config settings
- Integrate config defaults with CLI flags and environment sources
- Design future-proof architecture for PostgreSQL support
- Add comprehensive test coverage for config functionality
- Maintain backward compatibility with existing MongoDB workflow

Features:
• Configuration file: ~/.pho/config.json with proper permissions
• CLI commands: pho config get/set/list with validation and aliases
• Environment override: All settings can be overridden via PHO_* env vars
• Database agnostic: Separate mongo.* and postgres.* namespaces
• Full integration: CLI flags use config defaults with env var precedence
• Type safety: Proper validation for timeouts, limits, boolean values
• Extensible: Easy to add new config sections and settings
- Replace JSON serialization with TOML using github.com/BurntSushi/toml
- Update all struct tags from json to toml format
- Change configuration file from config.json to config.toml
- Move config directory from ~/.pho to ~/.config/pho following XDG spec
- Update config parsing and marshaling logic accordingly
- Update tests to use TOML format and new file paths
- All functionality remains the same, only storage format changed
- Remove PostgreSQL configuration struct and related code (not supported yet)
- Remove PostgreSQL environment variable handling
- Remove PostgreSQL config keys from Set/Get methods
- Update tests to remove PostgreSQL references
- Add support for pho config list [section] command
- Update configuration path references from ~/.pho to ~/.config/pho
- Add section shortcuts: mongo, database, query, app, output, directories
- Improve error handling for unknown sections
@amberpixels amberpixels self-assigned this Jul 16, 2025
@amberpixels amberpixels merged commit f939946 into main Jul 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants