Skip to content

[P2] Doctor command for diagnostics #3

@KalebCole

Description

@KalebCole

Priority: P2 (Medium)

Diagnostic command to verify setup and troubleshoot issues.

Proposed Command

$ partiful doctor

Partiful CLI Doctor
====================

Auth Configuration
  ✓ Config file exists: ~/.config/partiful/auth.json
  ✓ User ID: eBhI7Kx0hDTVW56uZHO519Ifm452
  ✓ Phone: +1206XXXXX77
  ✓ Refresh token: present (not expired)
  ✓ Access token: valid (expires in 45 min)

API Connectivity
  ✓ Can reach api.partiful.com
  ✓ Can reach securetoken.googleapis.com
  ✓ Token refresh working

Permissions
  ✓ Can list events
  ✓ Can create events

Environment
  ✓ Node.js: v22.22.0
  ✓ CLI version: 1.0.0

All checks passed!

Checks to Perform

  1. Config file exists and is valid JSON
  2. Required fields present (apiKey, refreshToken, userId)
  3. Token refresh succeeds
  4. API endpoints reachable
  5. Basic API call succeeds (list events)

Error Scenarios

$ partiful doctor

✗ Access token expired and refresh failed
  Error: Token has been revoked
  
  Fix: Run `partiful auth login` to re-authenticate

Acceptance Criteria

  • Checks config file existence and format
  • Validates auth tokens
  • Tests API connectivity
  • Clear actionable error messages
  • Exit code 0 if all pass, 1 if any fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions