Doctor
Doctor
Section titled “Doctor”The doctor command diagnoses common issues with your atlcli setup, authentication, and connectivity.
Quick Start
Section titled “Quick Start”# Run all checksatlcli doctor
# Auto-fix safe issuesatlcli doctor --fix
# JSON output for scriptingatlcli doctor --jsonWhat It Checks
Section titled “What It Checks”| Check | Category | Description |
|---|---|---|
| Config exists | Config | Verifies ~/.atlcli/config.json exists |
| Config valid | Config | Validates config file is proper JSON |
| Profile exists | Auth | At least one profile is configured |
| Active profile | Auth | Active profile has valid credentials |
| Confluence API | Connectivity | Tests Confluence authentication and latency |
| Jira API | Connectivity | Tests Jira authentication and latency |
| Log directory | Permissions | Verifies ~/.atlcli/logs/ is writable |
Output
Section titled “Output”Successful Run
Section titled “Successful Run”atlcli doctor
Config ✓ Config file exists ✓ Config file is valid JSON
Authentication ✓ 1 profile(s) configured ✓ Active profile: work
Connectivity ✓ Confluence API OK (245ms) ✓ Jira API OK (198ms)
Permissions ✓ Log directory writable
7 passedWith Failures
Section titled “With Failures”atlcli doctor
Config ✓ Config file exists ✓ Config file is valid JSON
Authentication ✓ 1 profile(s) configured ✗ Active profile missing credentials → Run: atlcli auth login
Connectivity ✗ Confluence auth failed → Run: atlcli auth login ✓ Jira API OK (198ms)
Permissions ⚠ Log directory missing → Run: atlcli doctor --fix
4 passed, 1 warning, 2 failedOptions
Section titled “Options”Automatically fix safe issues:
- Create missing config directory
- Create empty config file
- Create missing log directory
atlcli doctor --fixIssues that require manual intervention (like invalid credentials) will still be reported but cannot be auto-fixed.
--json
Section titled “--json”Output results as JSON for scripting and CI/CD integration:
atlcli doctor --jsonExample output:
{ "schemaVersion": "1", "checks": [ { "name": "config_exists", "category": "config", "status": "pass", "message": "Config file exists", "details": { "path": "~/.atlcli/config.json" } }, { "name": "confluence_api", "category": "connectivity", "status": "pass", "message": "Confluence API OK (245ms)", "details": { "url": "https://acme.atlassian.net/wiki", "latencyMs": 245 } } ], "summary": { "passed": 7, "warnings": 0, "failed": 0 }}Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | All checks passed (or only warnings) |
| 1 | One or more checks failed |
Use exit codes in scripts:
if atlcli doctor --json > /dev/null 2>&1; then echo "atlcli is healthy"else echo "atlcli has issues"fiCI/CD Integration
Section titled “CI/CD Integration”Run doctor in your pipeline to verify atlcli is configured correctly:
# GitHub Actions- name: Check atlcli setup run: atlcli doctor --json continue-on-error: falseTroubleshooting
Section titled “Troubleshooting”Config file missing
Section titled “Config file missing”✗ Config file missing → Run: atlcli auth loginRun atlcli auth login to create a profile and config file.
Credentials invalid
Section titled “Credentials invalid”✗ Confluence auth failed → Run: atlcli auth loginYour API token may have expired or been revoked. Generate a new one at id.atlassian.com and run atlcli auth login.
API slow (warning)
Section titled “API slow (warning)”⚠ Confluence API slow (2500ms)Response times over 2 seconds are flagged as warnings. This could indicate:
- Network latency
- Atlassian Cloud performance issues
- VPN or proxy overhead
Log directory not writable
Section titled “Log directory not writable”✗ Log directory not writable → Check permissions on ~/.atlcli/logs/Fix permissions:
chmod 755 ~/.atlcli/logs/Or let doctor create it:
atlcli doctor --fixRelated Topics
Section titled “Related Topics”- Troubleshooting - Manual troubleshooting steps
- Authentication - Profile setup
- Configuration - Config file options
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.