Skip to content

refactor(config): simplify configuration by removing profiles and email#69

Merged
daisuke8000 merged 2 commits intomainfrom
refactor/simplify-config-remove-profiles
Dec 21, 2025
Merged

refactor(config): simplify configuration by removing profiles and email#69
daisuke8000 merged 2 commits intomainfrom
refactor/simplify-config-remove-profiles

Conversation

@daisuke8000
Copy link
Owner

Summary

  • Remove legacy multi-profile and email-based authentication support
  • Adopt simpler 12-factor app style configuration
  • Simplify Config struct from profiles: HashMap<String, Profile> to single url: Option<String>

Changes

  • Remove Profile struct and multi-profile HashMap
  • Remove --profile CLI option
  • Remove --email option and validate_email() function
  • Simplify ConfigService to handle only URL
  • Update TUI service to use get_url() instead of get_profile()
  • Update documentation (README.md, ARCHITECTURE.md)

Configuration (After)

url = "https://metabase.example.com"

Environment variables:

Variable Description
MBR_API_KEY Authentication (required)
MBR_URL Server URL (alternative to config file)

Test plan

  • All 127 tests pass (mbr-core: 87, mbr-tui: 40)
  • Clippy clean
  • Build successful

Remove legacy multi-profile and email-based authentication support,
adopting a simpler 12-factor app style configuration.

Changes:
- Remove `Profile` struct and multi-profile HashMap from Config
- Remove `--profile` CLI option
- Remove `--email` option and `validate_email()` function
- Simplify Config to single `url: Option<String>` field
- Simplify ConfigService to handle only URL
- Update TUI service to use `get_url()` instead of `get_profile()`
- Update documentation to reflect simplified configuration

Configuration now uses:
- `MBR_API_KEY` env var for authentication (required)
- `MBR_URL` env var or config.toml for server URL (optional)
@daisuke8000 daisuke8000 merged commit 9a2e0b6 into main Dec 21, 2025
1 check passed
@daisuke8000 daisuke8000 deleted the refactor/simplify-config-remove-profiles branch December 21, 2025 00:33
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.

1 participant