|
| 1 | +--- |
| 2 | +name: hey |
| 3 | +description: | |
| 4 | + Interact with HEY email via the HEY CLI. Read and send emails, manage boxes, |
| 5 | + calendars, todos, habits, time tracking, and journal entries. Use for ANY |
| 6 | + HEY-related question or action. |
| 7 | +triggers: |
| 8 | + # Direct invocations |
| 9 | + - hey |
| 10 | + - /hey |
| 11 | + # Email actions |
| 12 | + - hey boxes |
| 13 | + - hey box |
| 14 | + - hey topic |
| 15 | + - hey reply |
| 16 | + - hey compose |
| 17 | + - hey drafts |
| 18 | + # Calendar actions |
| 19 | + - hey calendars |
| 20 | + - hey recordings |
| 21 | + # Todos |
| 22 | + - hey todo |
| 23 | + # Habits |
| 24 | + - hey habit |
| 25 | + # Time tracking |
| 26 | + - hey timetrack |
| 27 | + # Journal |
| 28 | + - hey journal |
| 29 | + # Auth |
| 30 | + - hey auth |
| 31 | + # Common actions |
| 32 | + - check my email |
| 33 | + - read email |
| 34 | + - send email |
| 35 | + - reply to email |
| 36 | + - compose email |
| 37 | + - list mailboxes |
| 38 | + - check calendar |
| 39 | + - add todo |
| 40 | + - complete todo |
| 41 | + - track time |
| 42 | + - write journal |
| 43 | + # Questions |
| 44 | + - can I hey |
| 45 | + - how do I hey |
| 46 | + - what's in hey |
| 47 | + - what hey |
| 48 | + - does hey |
| 49 | + # My work |
| 50 | + - my emails |
| 51 | + - my inbox |
| 52 | + - my imbox |
| 53 | + - my todos |
| 54 | + - my calendar |
| 55 | + - my journal |
| 56 | + # URLs |
| 57 | + - hey.com |
| 58 | +invocable: true |
| 59 | +argument-hint: "[command] [args...]" |
| 60 | +--- |
| 61 | + |
| 62 | +# /hey - HEY Email Workflow Command |
| 63 | + |
| 64 | +CLI for HEY email: mailboxes, email threads, replies, compose, calendars, todos, habits, time tracking, and journal entries. |
| 65 | + |
| 66 | +## Agent Invariants |
| 67 | + |
| 68 | +**MUST follow these rules:** |
| 69 | + |
| 70 | +1. **Always use `--json`** for structured, predictable output |
| 71 | +2. **Authentication required** for all data commands — run `hey auth login` first |
| 72 | +3. **HTML output** is available via `--html` for commands that return HTML content |
| 73 | + |
| 74 | +## Quick Reference |
| 75 | + |
| 76 | +| Task | Command | |
| 77 | +|------|---------| |
| 78 | +| List mailboxes | `hey boxes --json` | |
| 79 | +| List emails in a box | `hey box imbox --json` | |
| 80 | +| Read email thread | `hey topic 123 --json` | |
| 81 | +| Reply to email | `hey reply 123 -m "Thanks!"` | |
| 82 | +| Compose email | `hey compose --to user@example.com --subject "Hello"` | |
| 83 | +| List drafts | `hey drafts --json` | |
| 84 | +| List calendars | `hey calendars --json` | |
| 85 | +| List calendar events | `hey recordings 123 --json` | |
| 86 | +| List todos | `hey todo list --json` | |
| 87 | +| Add todo | `hey todo add "Buy milk"` | |
| 88 | +| Complete todo | `hey todo complete 123` | |
| 89 | +| Uncomplete todo | `hey todo uncomplete 123` | |
| 90 | +| Delete todo | `hey todo delete 123` | |
| 91 | +| Complete habit | `hey habit complete` | |
| 92 | +| Uncomplete habit | `hey habit uncomplete` | |
| 93 | +| Start time tracking | `hey timetrack start` | |
| 94 | +| Stop time tracking | `hey timetrack stop` | |
| 95 | +| Current timer | `hey timetrack current --json` | |
| 96 | +| List time entries | `hey timetrack list --json` | |
| 97 | +| List journal entries | `hey journal list --json` | |
| 98 | +| Read journal entry | `hey journal read 2024-03-15 --json` | |
| 99 | +| Write journal entry | `hey journal write -m "Today was great"` | |
| 100 | +| Check auth status | `hey auth status` | |
| 101 | +| Print access token | `hey auth token` | |
| 102 | +| Launch TUI | `hey` | |
| 103 | + |
| 104 | +## Decision Trees |
| 105 | + |
| 106 | +### Reading Email |
| 107 | + |
| 108 | +``` |
| 109 | +Want to read email? |
| 110 | +├── Which mailbox? → hey boxes --json |
| 111 | +├── List emails in box? → hey box <name|id> --json |
| 112 | +├── Read full thread? → hey topic <id> --json |
| 113 | +└── Launch interactive UI? → hey (no args, launches TUI) |
| 114 | +``` |
| 115 | + |
| 116 | +### Sending Email |
| 117 | + |
| 118 | +``` |
| 119 | +Want to send email? |
| 120 | +├── Reply to thread? → hey reply <topic_id> -m "message" |
| 121 | +│ └── Open editor? → hey reply <topic_id> (omit -m to open $EDITOR) |
| 122 | +├── Compose new? → hey compose --to <email> --subject "Subject" |
| 123 | +│ └── With body? → hey compose --to <email> --subject "Subject" -m "Body" |
| 124 | +└── Check drafts? → hey drafts --json |
| 125 | +``` |
| 126 | + |
| 127 | +### Managing Todos |
| 128 | + |
| 129 | +``` |
| 130 | +Want to manage todos? |
| 131 | +├── List todos? → hey todo list --json |
| 132 | +├── Add todo? → hey todo add "Task description" |
| 133 | +├── Complete? → hey todo complete <id> |
| 134 | +├── Uncomplete? → hey todo uncomplete <id> |
| 135 | +└── Delete? → hey todo delete <id> |
| 136 | +``` |
| 137 | + |
| 138 | +## Resource Reference |
| 139 | + |
| 140 | +### Email - Boxes |
| 141 | + |
| 142 | +```bash |
| 143 | +hey boxes --json # List all mailboxes |
| 144 | +hey box imbox --json # List emails in Imbox (by name) |
| 145 | +hey box 123 --json # List emails in box (by ID) |
| 146 | +``` |
| 147 | + |
| 148 | +Box names: `imbox`, `the_feed`, `paper_trail`, `set_aside`, `reply_later`, `screened_out` |
| 149 | + |
| 150 | +**Response format:** `hey box` returns `{"box": {...}, "postings": [...]}`. Each posting has: `id`, `name` (subject), `seen` (read status), `created_at`, `contacts`, `summary`, `app_url`. |
| 151 | + |
| 152 | +### Email - Topics |
| 153 | + |
| 154 | +```bash |
| 155 | +hey topic 123 --json # Read full email thread |
| 156 | +hey topic 123 --html # Read with raw HTML content |
| 157 | +``` |
| 158 | + |
| 159 | +### Email - Reply & Compose |
| 160 | + |
| 161 | +```bash |
| 162 | +hey reply 123 -m "Thanks!" # Reply with inline message |
| 163 | +hey reply 123 # Reply via $EDITOR |
| 164 | +hey compose --to user@example.com --subject "Hello" # Compose new |
| 165 | +hey compose --to user@example.com --subject "Hi" -m "Body" # With body |
| 166 | +``` |
| 167 | + |
| 168 | +### Drafts |
| 169 | + |
| 170 | +```bash |
| 171 | +hey drafts --json # List drafts |
| 172 | +``` |
| 173 | + |
| 174 | +### Calendars |
| 175 | + |
| 176 | +```bash |
| 177 | +hey calendars --json # List calendars (returns array of {id, name, kind}) |
| 178 | +hey recordings 123 --json # List events in calendar |
| 179 | +``` |
| 180 | + |
| 181 | +**Response format:** `hey recordings` returns `{"Calendar::Event": [...]}`. Each event has: `id`, `title`, `starts_at`, `ends_at`, `all_day`, `recurring`, `starts_at_time_zone`. Access events via `.["Calendar::Event"]` in jq. |
| 182 | + |
| 183 | +### Todos |
| 184 | + |
| 185 | +```bash |
| 186 | +hey todo list --json # List all todos |
| 187 | +hey todo add "Task description" # Add a todo |
| 188 | +hey todo complete 123 # Mark complete |
| 189 | +hey todo uncomplete 123 # Mark incomplete |
| 190 | +hey todo delete 123 # Delete a todo |
| 191 | +``` |
| 192 | + |
| 193 | +### Habits |
| 194 | + |
| 195 | +```bash |
| 196 | +hey habit complete # Mark habit complete for today |
| 197 | +hey habit uncomplete # Unmark habit for today |
| 198 | +``` |
| 199 | + |
| 200 | +### Time Tracking |
| 201 | + |
| 202 | +```bash |
| 203 | +hey timetrack start # Start timer |
| 204 | +hey timetrack stop # Stop timer |
| 205 | +hey timetrack current --json # Show current timer |
| 206 | +hey timetrack list --json # List time entries |
| 207 | +``` |
| 208 | + |
| 209 | +### Journal |
| 210 | + |
| 211 | +```bash |
| 212 | +hey journal list --json # List journal entries |
| 213 | +hey journal read 2024-03-15 --json # Read entry by date |
| 214 | +hey journal write -m "Today's entry" # Write entry inline |
| 215 | +hey journal write # Write entry via $EDITOR |
| 216 | +``` |
| 217 | + |
| 218 | +### Authentication |
| 219 | + |
| 220 | +```bash |
| 221 | +hey auth login # Log in (browser-based OAuth) |
| 222 | +hey auth status # Check if authenticated |
| 223 | +hey auth logout # Log out |
| 224 | +``` |
| 225 | + |
| 226 | +If a command fails with an auth error, run `hey auth status` to check, then `hey auth login` to re-authenticate. |
0 commit comments