doctor Command
Diagnose FluxLoop environment setup and detect common configuration issues.
Overview
The doctor command performs a comprehensive health check of your FluxLoop installation, including:
- Python Environment: Version, virtual environment detection, and executable path
- FluxLoop CLI: Installation status and version
- FluxLoop MCP: Installation status and availability
- MCP Index: Knowledge base presence and integrity
- Project Configuration: Config directory structure and files
This command is essential for troubleshooting installation issues and verifying that all FluxLoop components are correctly set up.
Basic Usage
# Run diagnostics for current environment
fluxloop doctor
# Specify a project
fluxloop doctor --project my-agent
# Output as JSON for programmatic parsing
fluxloop doctor --json
Command Options
| Option | Description | Default |
|---|---|---|
--project, -p | Project name under the FluxLoop root directory | None (uses current) |
--root | FluxLoop root directory | ./fluxloop |
--index-dir | Override FluxLoop MCP index directory | ~/.fluxloop/mcp/index/dev |
--json | Output diagnostic information as JSON | false |
What Gets Checked
1. Python Environment
Verifies:
- Python executable path
- Python version (requires 3.11+ for SDK/MCP, 3.8+ for CLI)
- Platform information
- Virtual environment detection (venv, conda, uv)
Environment Variables Checked:
VIRTUAL_ENVCONDA_PREFIXUV_PROJECT_ENV
2. FluxLoop CLI
Checks:
fluxloopcommand availability on PATH- CLI version
- Installation location
3. FluxLoop MCP Server
Checks:
fluxloop-mcpcommand availability- MCP server installation
- Help output accessibility
4. MCP Knowledge Index
Verifies:
- Index directory existence
chunks.jsonlpresence and size- Default location:
~/.fluxloop/mcp/index/dev
5. Project Configuration
Validates:
- Project root directory
configs/directory structureconfigs/project.yamlexistence
Output Examples
Successful Diagnosis
╭──────────────────────────────────╮
│ FluxLoop Environment Doctor │
╰──────────────────────────────────╯
Component Status Details
Python ✓ 3.11.5 (/Users/user/.venv/bin/python)
Virtual Env ✓ /Users/user/project/.venv
FluxLoop CLI ✓ /Users/user/.venv/bin/fluxloop
FluxLoop MCP ✓ /Users/user/.venv/bin/fluxloop-mcp
MCP Index ✓ ~/.fluxloop/mcp/index/dev • chunks.jsonl (1.2M bytes)
Project Config ✓ fluxloop/my-agent/configs/project.yaml
╭─ fluxloop --version ──────────────╮
│ FluxLoop CLI v0.2.27 │
╰────────────────────── ─────────────╯
╭──────────────────╮
│ Doctor completed │
╰──────────────────╯
Issues Detected
╭──────────────────────────────────╮
│ FluxLoop Environment Doctor │
╰──────────────────────────────────╯
Component Status Details
Python ✓ 3.11.5 (/usr/bin/python3)
Virtual Env – Global interpreter
FluxLoop CLI ✓ /usr/local/bin/fluxloop
FluxLoop MCP ✗ Not found
MCP Index – ~/.fluxloop/mcp/index/dev
Project Config – Run: fluxloop init project
Errors
• fluxloop-mcp: fluxloop-mcp not found on PATH
╭──────────────────╮
│ Doctor completed │
╰──────────────────╯
JSON Output
Use --json flag for machine-readable output:
fluxloop doctor --json
{
"python": {
"executable": "/Users/user/.venv/bin/python",
"version": "3.11.5",
"platform": "macOS-14.0-arm64",
"command_output": "Python 3.11.5"
},
"virtual_environment": {
"python_executable": "/Users/user/.venv/bin/python",
"python_version": "3.11.5",
"platform": "macOS-14.0-arm64",
"virtual_env": true,
"virtual_env_path": "/Users/user/project/.venv",
"environment_variables": {
"VIRTUAL_ENV": "/Users/user/project/.venv"
}
},
"fluxloop_cli": {
"success": true,
"path": "/Users/user/.venv/bin/fluxloop",
"output": "FluxLoop CLI v0.2.27",
"error": null
},
"fluxloop_mcp": {
"success": true,
"path": "/Users/user/.venv/bin/fluxloop-mcp",
"output": "Usage: fluxloop-mcp [OPTIONS]",
"error": null
},
"project": {
"root": "/Users/user/project/fluxloop",
"config_directory": "/Users/user/project/fluxloop/my-agent/configs",
"project_yaml": "/Users/user/project/fluxloop/my-agent/configs/project.yaml",
"project_yaml_exists": true,
"config_directory_exists": true
},
"mcp_index": {
"exists": true,
"path": "/Users/user/.fluxloop/mcp/index/dev",
"chunks_exists": true,
"chunks_size": 1245678
}
}
Common Issues and Solutions
Issue: FluxLoop CLI Not Found
Symptom:
FluxLoop CLI ✗ fluxloop not found on PATH
Solution:
# Install in active virtual environment
pip install fluxloop-cli
# Or install globally
pip install --user fluxloop-cli
# Or with uv
uv pip install fluxloop-cli