Doctor Command
mcli doctor runs a set of diagnostics to confirm the CLI can load configuration, connect to databases, and access library paths.
Usage
mcli doctor [OPTIONS]
Options
| Option | Default | Description |
|---|---|---|
--raw |
false |
Output structured JSON instead of formatted tables |
--verbose |
false |
Include extra diagnostic details |
--write-test |
false |
Create+delete a temp file in each library directory to validate write access |
What It Checks
- Configuration
- Confirms configuration is loadable and shows where it came from (
MELODEE_APPSETTINGS_PATHor localappsettings*.json) - Validates required connection strings exist
- Confirms configuration is loadable and shows where it came from (
- Database connectivity
- Postgres (
DefaultConnection) - MusicBrainz SQLite (
MusicBrainzConnection) - ArtistSearchEngine SQLite (
ArtistSearchEngineConnection)
- Postgres (
- Library paths
- Ensures each configured library path exists
- Optionally validates write access with
--write-test
Examples
Basic health check
./mcli doctor
Validate write permissions (recommended for deployments)
./mcli doctor --write-test
JSON output for automation
./mcli doctor --raw | jq '.checks[] | select(.success==false)'
Example Output
✓ Configuration
✓ Database: Postgres
✓ Database: MusicBrainz (SQLite)
✓ Database: ArtistSearchEngine (SQLite)
✓ Libraries
All checks passed.
Exit Codes
| Code | Meaning |
|---|---|
0 |
All checks passed |
1 |
One or more checks failed |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.