Skip to content

Commit d362ac4

Browse files
docs: add doctor/upgrade/install-mentor to user-facing documentation
- README: add doctor to Quick Start, verify install section, AI-guided setup section, health commands to CLI reference, install-mentor to docs links - cli-reference: add full doctor/update/upgrade command reference with exit codes, check categories, and flags - setup-guide: add Verify Installation section with doctor workflow, AI-guided setup instructions, and troubleshooting entry point Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba6e582 commit d362ac4

3 files changed

Lines changed: 111 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,32 @@ cd socratic-study-mentor
122122

123123
```bash
124124
studyctl setup # Interactive configuration wizard
125+
studyctl doctor # Verify everything is healthy
125126
studyctl web # Launch the study web app
126-
studyctl --help # See all commands
127127
```
128128

129+
### Verify your install
130+
131+
`studyctl doctor` checks your entire installation — Python version, packages, config, databases, optional dependencies, and agent definitions. Run it any time something feels off:
132+
133+
```bash
134+
studyctl doctor # Rich table with pass/warn/fail indicators
135+
studyctl doctor --json # Machine-readable output (used by AI agents)
136+
studyctl doctor --quiet # One-line summary
137+
```
138+
139+
If issues are found, `studyctl upgrade` fixes what it can automatically:
140+
141+
```bash
142+
studyctl update # Check what's available (no changes)
143+
studyctl upgrade # Apply fixes (packages, DB migrations, agents)
144+
studyctl upgrade --dry-run # Preview changes first
145+
```
146+
147+
### AI-guided setup
148+
149+
If you're using an AI coding assistant (Claude Code, Kiro, Gemini CLI, etc.), the **install-mentor agent** can walk you through the entire setup conversationally. It uses `studyctl doctor --json` to detect issues and fix them automatically. See [agents/shared/install-mentor.md](agents/shared/install-mentor.md).
150+
129151
### Optional extras
130152

131153
```bash
@@ -234,6 +256,13 @@ studyctl topics # List configured topics
234256
studyctl audio TOPIC # Generate NotebookLM audio overview
235257
studyctl dedup [TOPIC] --all --dry-run # Remove duplicate notebook sources
236258

259+
# Health & updates
260+
studyctl doctor # Check installation health
261+
studyctl doctor --json # Machine-readable diagnostics
262+
studyctl update # Check for available updates
263+
studyctl upgrade # Apply updates (packages, DB, agents)
264+
studyctl upgrade --dry-run # Preview what would change
265+
237266
# Configuration & scheduling
238267
studyctl config init # Interactive setup wizard
239268
studyctl config show # Display current configuration
@@ -361,6 +390,7 @@ study-speak TEXT -v af_heart -s 1.2 # Custom voice and speed
361390
## Documentation
362391

363392
- [Setup Guide](docs/setup-guide.md) — Installation, configuration, Obsidian setup
393+
- [Install Mentor](agents/shared/install-mentor.md) — AI-guided setup agent (works with any AI coding tool)
364394
- [Agent Installation](docs/agent-install.md) — AI agent setup for kiro-cli, Claude Code, Gemini CLI, OpenCode, and Amp
365395
- [AuDHD Learning Philosophy](docs/audhd-learning-philosophy.md) — Why this exists and how it works
366396
- [MCP Integrations](agents/mcp/README.md) — Calendar, reminders, and other MCP server configs

‎docs/cli-reference.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,37 @@ studyctl tui # Launch interactive TUI dashboard
2929
studyctl docs read PAGE # Read a page aloud via study-speak
3030
```
3131

32+
### Health & Updates
33+
34+
Check your installation and keep it current:
35+
36+
```bash
37+
studyctl doctor # Full health check (Rich table)
38+
studyctl doctor --json # JSON output (for AI agents and CI)
39+
studyctl doctor --quiet # One-line summary
40+
studyctl doctor --category core # Check specific category only
41+
studyctl update # Check for available updates (no changes)
42+
studyctl update --json # Machine-readable update info
43+
studyctl upgrade # Apply all available updates
44+
studyctl upgrade --dry-run # Preview what would change
45+
studyctl upgrade --component packages # Upgrade only packages
46+
studyctl upgrade --component database # Run DB migrations only
47+
studyctl upgrade --component agents # Update agent definitions only
48+
studyctl upgrade --force # Upgrade even if already current
49+
```
50+
51+
**Exit codes for `studyctl doctor`:**
52+
53+
| Code | Meaning |
54+
|------|---------|
55+
| `0` | All checks pass — installation is healthy |
56+
| `1` | Warnings or failures that can be fixed — run `studyctl upgrade` |
57+
| `2` | Core failure — a fundamental component is broken (e.g. wrong Python version) |
58+
59+
**Check categories:** `core` (Python, packages, config), `database` (review DB, sessions DB), `config` (Obsidian vault, review dirs, pandoc), `deps` (optional packages), `agents` (AI tool definitions), `updates` (PyPI versions).
60+
61+
**AI-guided setup:** The install-mentor agent at `agents/shared/install-mentor.md` uses `studyctl doctor --json` to walk users through setup conversationally. It works with any AI coding tool (Claude Code, Kiro, Gemini CLI, OpenCode, Amp).
62+
3263
### Confidence Levels
3364

3465
Used with `studyctl progress`:

‎docs/setup-guide.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,57 @@ obsidian_base: /mnt/c/Users/YourName/Obsidian
544544

545545
For better performance, consider keeping the vault inside WSL2's native filesystem (`~/Obsidian/`) and syncing with Obsidian Sync or Git.
546546

547+
## Verify Installation
548+
549+
After installing and configuring, run the health check to make sure everything is working:
550+
551+
```bash
552+
studyctl doctor
553+
```
554+
555+
This checks Python version, installed packages, config validity, databases, optional dependencies, and AI agent definitions. You'll see a colour-coded table:
556+
557+
- Green tick = healthy
558+
- Yellow ! = warning (often auto-fixable)
559+
- Red cross = failure (needs attention)
560+
- Blue i = informational (optional)
561+
562+
If issues are found:
563+
564+
```bash
565+
studyctl upgrade # Fix auto-fixable issues (packages, DB, agents)
566+
studyctl upgrade --dry-run # Preview changes first
567+
```
568+
569+
For machine-readable output (used by CI pipelines and AI agents):
570+
571+
```bash
572+
studyctl doctor --json
573+
```
574+
575+
### AI-Guided Setup
576+
577+
If you're using an AI coding assistant, the **install-mentor agent** can guide you through the entire setup process conversationally. It automatically detects your environment, installs packages, runs `studyctl doctor`, and fixes issues.
578+
579+
The prompt lives at `agents/shared/install-mentor.md` and works with any AI tool that can run shell commands — Claude Code, Kiro CLI, Gemini CLI, OpenCode, or Amp.
580+
581+
To use it in Claude Code:
582+
```
583+
Read agents/shared/install-mentor.md and follow its instructions to set up studyctl
584+
```
585+
547586
## Troubleshooting
548587

588+
### First step: run `studyctl doctor`
589+
590+
Before investigating specific issues, always start with the health check:
591+
592+
```bash
593+
studyctl doctor
594+
```
595+
596+
This will identify most common problems and tell you how to fix them. If auto-fixable issues are found, run `studyctl upgrade` to resolve them.
597+
549598
### `studyctl: command not found`
550599

551600
The package isn't on your PATH. Either:

0 commit comments

Comments
 (0)