life-manager/codebase/apps/cli/docs/COMMANDS.md
2026-03-18 14:16:41 -07:00

333 lines
11 KiB
Markdown

# CLI Command Reference
All commands run via `./run <command>` (passes through to `lm` CLI).
---
## Daily Overview
| Command | Description |
|---------|-------------|
| `today` | Today overview (schedule + tasks + habits) |
| `today next-action` | Suggest next action based on priorities |
## Tasks
| Command | Description |
|---------|-------------|
| `tasks list` | List tasks (filters: `-s`, `-p`, `-d`, `--status`, `--domain`) |
| `tasks get <id>` | Show task detail |
| `tasks create` | Create a task (options: `--title`, `--priority`, `--domain`, etc.) |
| `tasks update <id>` | Update a task |
| `tasks complete <id>` | Mark task completed |
| `tasks delete <id>` | Delete a task |
| `tasks recurring` | List recurring task templates |
| `tasks instances <id>` | List instances of a recurring task |
## Goals
| Command | Description |
|---------|-------------|
| `goals list` | List goals |
| `goals tree` | Show goal hierarchy tree |
| `goals get <id>` | Show goal detail |
| `goals create` | Create a goal |
| `goals update <id>` | Update a goal |
| `goals delete <id>` | Delete a goal |
## Habits
| Command | Description |
|---------|-------------|
| `habits list` | List habits |
| `habits due` | Show habits due today |
| `habits get <id>` | Show habit detail |
| `habits create` | Create a habit |
| `habits update <id>` | Update a habit |
| `habits check-in <id>` | Log a habit check-in |
| `habits stats <id>` | Show habit statistics |
## Schedule
| Command | Description |
|---------|-------------|
| `schedule blocks [--date YYYY-MM-DD]` | List time blocks for a date |
| `schedule plan [--date YYYY-MM-DD]` | Show daily plan |
| `schedule add-block` | Create a time block (`-t`, `--date`, `--start`, `--end`, `--type`, `--notes`) |
| `schedule update-block <id>` | Update a time block (`--status`, `--end`, `--title`, `--type`, `--notes`) |
| `schedule set-intention` | Set morning intention (`--text`, `--date`) |
| `schedule reflect` | Set evening reflection (`--text`, `--mood`, `--date`) |
| `schedule log [--date]` | Show daily log entries |
| `schedule log-add` | Add a daily log entry |
| `schedule log-delete <id>` | Delete a daily log entry |
**Block types**: `work`, `personal`, `health`, `break`, `transit`, `available`
**Block statuses**: `planned`, `in_progress`, `completed`, `skipped`, `rescheduled`
## Medications
> **Command name is `meds`** (not `medications`)
| Command | Description |
|---------|-------------|
| `meds list` | List medication schedules |
| `meds due` | Show medications due now |
| `meds get <id>` | Show medication detail |
| `meds create` | Create a medication schedule |
| `meds update <id>` | Update a medication schedule |
| `meds deactivate <id>` | Deactivate a medication |
| `meds log <id>` | Log a dose (`--taken-at`, `--notes`, `--skipped`, `--skip-reason`) |
| `meds logs <id>` | Show dose history |
## Labs
| Command | Description |
|---------|-------------|
| `labs list` | List lab results (`--start`, `--end`, `--panel`, `--page`, `--limit`) |
| `labs get <id>` | Show full lab result with all markers |
| `labs trends <marker>` | Trend for one marker (`--months <n=24>`, e.g. `labs trends Hemoglobin`) |
| `labs anemia` | Anemia marker trends — Hgb, Hct, Ferritin, Iron, MCV, RBC, TIBC (`--months <n=60>`) |
| `labs import` | Import FHIR R4 bundle (`--file <path>`, `--project <id>`) — idempotent |
| `labs epic-status` | Show Epic MyChart connection status |
| `labs epic-connect` | Print OAuth URL — open in browser to authenticate |
| `labs epic-sync --project <id>` | Pull latest labs from Epic FHIR API |
| `labs epic-disconnect` | Clear Epic tokens and disconnect |
**File import flow:**
1. MyChart → Profile → Download My Health Data → FHIR R4 format → unzip
2. `./run labs import --file ~/Downloads/fhir-bundle.json --project <medical-project-id>`
3. Re-running with same file skips already-imported panels (dedup by FHIR DiagnosticReport ID)
**Live sync flow (Epic OAuth2):**
1. Register app at fhir.epic.com — set `EPIC_CLIENT_ID` + `EPIC_REDIRECT_URI` in `.env`
2. `./run labs epic-connect` → open URL in browser → authenticate with MyChart
3. `./run labs epic-status` → confirm connected
4. `./run labs epic-sync --project <medical-project-id>` → import all panels
5. `./run labs epic-disconnect` to revoke local tokens
## Health
| Command | Description |
|---------|-------------|
| `health measurements` | List health measurements |
| `health log-measurement` | Log a measurement |
| `health medical` | List medical records |
| `health log-medical` | Log a medical event |
## Finance
| Command | Description |
|---------|-------------|
| `finance summary` | Financial summary for current month |
| `finance list` | List transactions |
| `finance log` | Log a transaction |
| `finance recurring list` | List recurring transactions |
| `finance recurring add` | Add recurring transaction |
| `finance recurring mark-paid` | Mark recurring as paid |
| `finance trend` | Show financial trends |
| `finance budget list` | List budgets |
| `finance budget set` | Set a budget |
## Income
| Command | Description |
|---------|-------------|
| `income list` | List income entries |
| `income log` | Log income |
| `income summary` | Income summary |
| `income billable list` | List billable hours |
| `income billable log` | Log billable hours |
## Projects
| Command | Description |
|---------|-------------|
| `projects list` | List projects |
| `projects get <id>` | Show project detail |
| `projects create` | Create a project |
| `projects update <id>` | Update a project |
| `projects sprints` | List sprints |
| `projects sprint <id>` | Show sprint detail |
| `projects create-sprint` | Create a sprint |
| `projects update-sprint <id>` | Update a sprint |
| `projects board <sprintId>` | Show sprint board |
| `projects content` | List project content |
| `projects create-content` | Create project content |
## Domains
| Command | Description |
|---------|-------------|
| `domains list` | List domains |
| `domains create` | Create a domain |
| `domains update <id>` | Update a domain |
| `domains delete <id>` | Delete a domain |
## Contacts
| Command | Description |
|---------|-------------|
| `contacts list` | List contacts |
| `contacts get <id>` | Show contact detail |
| `contacts create` | Create a contact |
| `contacts update <id>` | Update a contact |
| `contacts delete <id>` | Delete a contact |
## Phone
| Command | Description |
|---------|-------------|
| `phone list` | List phone numbers |
| `phone search <query>` | Search phone numbers |
| `phone add <name> <number>` | Add a phone number |
## Chat (AI Assistant)
| Command | Description |
|---------|-------------|
| `chat` | Interactive chat session |
| `chat send` | Send a one-shot message |
| `chat list` | List conversations |
| `chat history` | Show conversation history |
## Reminders
| Command | Description |
|---------|-------------|
| `reminders list` | List reminders |
| `reminders upcoming` | Show upcoming reminders |
| `reminders get <id>` | Show reminder detail |
| `reminders create` | Create a reminder |
| `reminders update <id>` | Update a reminder |
| `reminders dismiss <id>` | Dismiss a reminder |
| `reminders preview <id>` | Preview a reminder |
| `reminders fire <id>` | Fire a reminder immediately |
## Checklists
| Command | Description |
|---------|-------------|
| `checklists list` | List checklists |
| `checklists get <id>` | Show checklist detail |
| `checklists create` | Create a checklist |
| `checklists update <id>` | Update a checklist |
| `checklists delete <id>` | Delete a checklist |
| `checklists add-item <checklistId>` | Add item to checklist |
| `checklists toggle <checklistId> <itemId>` | Toggle checklist item |
## Content
| Command | Description |
|---------|-------------|
| `content list` | List content items |
| `content add` | Add content |
| `content batches` | List content batches |
| `content batch` | Show batch detail |
| `content outfits` | List outfits |
| `content outfit` | Show outfit detail |
## iMessage Bridge
| Command | Description |
|---------|-------------|
| `imessage status` | Show bridge config, phone, last poll, and rate limits |
| `imessage self [--since <iso>] [-l <n>]` | Show recent self-messages (default: last hour) |
| `imessage send <text>` | Send a message to self via the iMessage send queue |
| `imessage test <text>` | Inject text directly into the AI pipeline and print the reply (no iMessage delivery) |
## Settings
| Command | Description |
|---------|-------------|
| `settings list` | List all settings |
| `settings get <key>` | Get a setting value |
| `settings set <key> <value>` | Set a setting value |
## Auth (Encryption Lock)
| Command | Description |
|---------|-------------|
| `auth status` | Show encryption lock status |
| `auth set-pin` | Set or change encryption PIN |
| `auth remove-pin` | Remove encryption PIN |
| `auth unlock` | Unlock encrypted data |
| `auth lock` | Lock encrypted data |
## Services
| Command | Description |
|---------|-------------|
| `services status` | Show service cluster status |
| `services gpu` | Show GPU status |
## Analytics
| Command | Description |
|---------|-------------|
| `analytics overview` | Analytics overview |
| `analytics trends` | Show trends |
| `analytics domains` | Domain analytics |
## Check-In
| Command | Description |
|---------|-------------|
| `checkin log [platform]` | Log a check-in |
| `checkin stats` | Check-in statistics |
| `checkin recent` | Recent check-ins |
| `checkin reminder-status [platform]` | Reminder status |
## Call Log
| Command | Description |
|---------|-------------|
| `call log <service>` | Log a call |
| `call pending` | Show pending calls |
| `call complete <id>` | Complete a call |
| `call list` | List calls |
## Timer
| Command | Description |
|---------|-------------|
| `timer <duration> [message]` | Set a timer (e.g., `timer 5m "check beans"`) |
## Curriculum
| Command | Description |
|---------|-------------|
| `curriculum list` | List all curricula |
| `curriculum get [slug]` | Show curriculum details (defaults to first active) |
| `curriculum progress [slug]` | Show level, XP, streak, skills completed |
| `curriculum skills [slug]` | List skills (`--pillar`, `--tier`, `--status`) |
| `curriculum start-skill <id> [slug]` | Start working on a skill |
| `curriculum complete-skill <id> [slug]` | Mark a skill completed |
| `curriculum challenges [slug]` | List challenges (`--status`, `--pillar`) |
| `curriculum start-challenge <id> [slug]` | Start a challenge |
| `curriculum role-models [slug]` | List role models (`--type`, `--domain`, `--page`) |
| `curriculum random [slug]` | Get a random role model for inspiration |
| `curriculum motivate [slug]` | Get motivational message (`--context`, `--state`) |
| `curriculum food-today` | Today's food alignment score |
| `curriculum food-weekly` | Weekly food alignment summary |
## Training (ML)
| Command | Description |
|---------|-------------|
| `training fine-tune` | Start fine-tuning |
| `training export` | Export training data |
| `training list-steps` | List training steps |
| `training eval` | Run evaluation |
| `training gpu` | GPU status for training |
## Database
| Command | Description |
|---------|-------------|
| `db sync-to-prod` | Sync dev database to production |
## Global Options
All commands support:
- `--json` — Output as JSON (for scripting/piping)
- `--api-url <url>` — Override API URL (default: `http://localhost:3700`)