inboxd 1.0.13 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,7 +113,7 @@ When a user has a heavy inbox (>20 unread emails), use this optimized workflow:
113
113
  ### 1. Quick Assessment
114
114
 
115
115
  ```bash
116
- inbox summary --json
116
+ inboxd summary --json
117
117
  ```
118
118
 
119
119
  Identify which account(s) have the bulk of unread emails.
@@ -123,7 +123,7 @@ Identify which account(s) have the bulk of unread emails.
123
123
  For heavy inboxes, **always start with grouped analysis**:
124
124
 
125
125
  ```bash
126
- inbox analyze --count 100 --account <name> --group-by sender
126
+ inboxd analyze --count 100 --account <name> --group-by sender
127
127
  ```
128
128
 
129
129
  This reveals:
@@ -163,7 +163,7 @@ Delete all LinkedIn job alerts and old newsletters?
163
163
  For cleanup of old emails, use server-side filtering:
164
164
 
165
165
  ```bash
166
- inbox analyze --older-than 30d --group-by sender
166
+ inboxd analyze --older-than 30d --group-by sender
167
167
  ```
168
168
 
169
169
  Old emails (>30 days) are usually safe to batch delete:
@@ -198,15 +198,15 @@ Unread count?
198
198
 
199
199
  | Task | Command |
200
200
  |------|---------|
201
- | Check status | `inbox summary --json` |
202
- | Full triage | `inbox analyze --count 50` → classify → present |
203
- | Analyze by sender | `inbox analyze --count 50 --group-by sender` |
204
- | Find old emails | `inbox analyze --older-than 30d` |
205
- | Extract links from email | `inbox read --id <id> --links` |
206
- | Delete by ID | `inbox delete --ids "id1,id2" --confirm` |
207
- | Delete by sender | `inbox delete --sender "linkedin" --dry-run` → confirm → delete |
208
- | Delete by subject | `inbox delete --match "weekly digest" --dry-run` |
209
- | Undo deletion | `inbox restore --last N` |
201
+ | Check status | `inboxd summary --json` |
202
+ | Full triage | `inboxd analyze --count 50` → classify → present |
203
+ | Analyze by sender | `inboxd analyze --count 50 --group-by sender` |
204
+ | Find old emails | `inboxd analyze --older-than 30d` |
205
+ | Extract links from email | `inboxd read --id <id> --links` |
206
+ | Delete by ID | `inboxd delete --ids "id1,id2" --confirm` |
207
+ | Delete by sender | `inboxd delete --sender "linkedin" --dry-run` → confirm → delete |
208
+ | Delete by subject | `inboxd delete --match "weekly digest" --dry-run` |
209
+ | Undo deletion | `inboxd restore --last N` |
210
210
 
211
211
  ## Package Information
212
212
 
@@ -214,7 +214,7 @@ Unread count?
214
214
  |---|---|
215
215
  | **Package** | `inboxd` |
216
216
  | **Install** | `npm install -g inboxd` |
217
- | **Setup** | `inbox setup` (interactive wizard) |
217
+ | **Setup** | `inboxd setup` (interactive wizard) |
218
218
  | **Documentation** | https://github.com/dparedesi/inboxd |
219
219
  | **npm** | https://www.npmjs.com/package/inboxd |
220
220
 
@@ -224,10 +224,10 @@ Before any inbox operation, always verify the setup:
224
224
 
225
225
  ```bash
226
226
  # 1. Check if inboxd is installed
227
- inbox --version
227
+ inboxd --version
228
228
 
229
229
  # 2. Check if accounts are configured
230
- inbox accounts
230
+ inboxd accounts
231
231
  ```
232
232
 
233
233
  ## Account Management
@@ -235,24 +235,24 @@ inbox accounts
235
235
  ### Adding New Accounts
236
236
  If the user wants to add an account (e.g. "add my work email"):
237
237
  ```bash
238
- inbox auth -a <name>
239
- # Example: inbox auth -a work
238
+ inboxd auth -a <name>
239
+ # Example: inboxd auth -a work
240
240
  ```
241
241
 
242
242
  ### Listing Accounts
243
243
  ```bash
244
- inbox accounts
244
+ inboxd accounts
245
245
  ```
246
246
 
247
247
  ### Removing Accounts
248
248
  ```bash
249
- inbox logout -a <name> # Remove specific account
250
- inbox logout --all # Remove all accounts
249
+ inboxd logout -a <name> # Remove specific account
250
+ inboxd logout --all # Remove all accounts
251
251
  ```
252
252
 
253
253
  ### Re-authenticating (Token Expired)
254
254
  ```bash
255
- rm ~/.config/inboxd/token-<account>.json && inbox auth -a <account>
255
+ rm ~/.config/inboxd/token-<account>.json && inboxd auth -a <account>
256
256
  ```
257
257
 
258
258
  ### If Not Installed
@@ -264,7 +264,7 @@ rm ~/.config/inboxd/token-<account>.json && inbox auth -a <account>
264
264
  inboxd is not installed. To install:
265
265
 
266
266
  1. Run: npm install -g inboxd
267
- 2. Run: inbox setup
267
+ 2. Run: inboxd setup
268
268
  3. Follow the wizard to configure your Gmail account
269
269
 
270
270
  The setup requires creating OAuth credentials in Google Cloud Console.
@@ -272,7 +272,7 @@ The setup requires creating OAuth credentials in Google Cloud Console.
272
272
 
273
273
  ### If No Accounts Configured
274
274
  ```
275
- No Gmail accounts configured. Run: inbox setup
275
+ No Gmail accounts configured. Run: inboxd setup
276
276
 
277
277
  This will guide you through:
278
278
  1. Creating OAuth credentials in Google Cloud Console
@@ -281,22 +281,22 @@ This will guide you through:
281
281
 
282
282
  ### Optional: Automatic Background Monitoring
283
283
 
284
- Users can enable automatic inbox checking with macOS notifications:
284
+ Users can enable automatic inbox checking with notifications:
285
285
 
286
286
  ```bash
287
- inbox install-service # Check every 5 minutes
288
- inbox install-service --interval 10 # Check every 10 minutes
287
+ inboxd install-service # Check every 5 minutes
288
+ inboxd install-service --interval 10 # Check every 10 minutes
289
+ inboxd install-service --uninstall # Remove service
289
290
  ```
290
291
 
291
292
  This installs and starts a background service that:
292
293
  - Checks for new emails automatically
293
- - Sends macOS notifications when new emails arrive
294
+ - Sends desktop notifications when new emails arrive
294
295
  - Starts on login
295
296
 
296
- To stop: `launchctl unload ~/Library/LaunchAgents/com.yourname.inboxd.plist`
297
+ **macOS:** Uses launchd. To stop: `launchctl unload ~/Library/LaunchAgents/com.danielparedes.inboxd.plist`
297
298
 
298
- > [!NOTE]
299
- > This is macOS-only. Linux users can set up a cron job instead.
299
+ **Linux:** Uses systemd. To stop: `systemctl --user stop inboxd.timer`
300
300
 
301
301
  ## Command Reference
302
302
 
@@ -304,34 +304,43 @@ To stop: `launchctl unload ~/Library/LaunchAgents/com.yourname.inboxd.plist`
304
304
 
305
305
  | Command | Description | Output |
306
306
  |---------|-------------|--------|
307
- | `inbox summary --json` | Quick inbox overview | `{accounts: [{name, email, unreadCount}], totalUnread}` |
308
- | `inbox analyze --count 50` | Get email data for analysis | JSON array of email objects |
309
- | `inbox analyze --count 50 --all` | Include read emails | JSON array (read + unread) |
310
- | `inbox analyze --since 7d` | Only emails from last 7 days | JSON array (filtered by date) |
311
- | `inbox analyze --older-than 30d` | Only emails older than 30 days | JSON array (server-side filtered) |
312
- | `inbox analyze --group-by sender` | Group emails by sender domain | `{groups: [{sender, count, emails}], totalCount}` |
313
- | `inbox read --id <id>` | Read full email content | Email headers + body |
314
- | `inbox read --id <id> --links` | Extract links from email | List of URLs with optional link text |
315
- | `inbox read --id <id> --links --json` | Extract links as JSON | `{id, subject, from, linkCount, links}` |
316
- | `inbox search -q "query"` | Search using Gmail query syntax | JSON array of matching emails |
317
- | `inbox accounts` | List configured accounts | Account names and emails |
307
+ | `inboxd summary --json` | Quick inbox overview | `{accounts: [{name, email, unreadCount}], totalUnread}` |
308
+ | `inboxd analyze --count 50` | Get email data for analysis | JSON array of email objects |
309
+ | `inboxd analyze --count 50 --all` | Include read emails | JSON array (read + unread) |
310
+ | `inboxd analyze --since 7d` | Only emails from last 7 days | JSON array (filtered by date) |
311
+ | `inboxd analyze --older-than 30d` | Only emails older than 30 days | JSON array (server-side filtered) |
312
+ | `inboxd analyze --group-by sender` | Group emails by sender domain | `{groups: [{sender, count, emails}], totalCount}` |
313
+ | `inboxd read --id <id>` | Read full email content | Email headers + body |
314
+ | `inboxd read --id <id> --links` | Extract links from email | List of URLs with optional link text |
315
+ | `inboxd read --id <id> --links --json` | Extract links as JSON | `{id, subject, from, linkCount, links}` |
316
+ | `inboxd search -q "query"` | Search using Gmail query syntax | JSON array of matching emails |
317
+ | `inboxd accounts` | List configured accounts | Account names and emails |
318
318
 
319
319
  ### Actions
320
320
 
321
321
  | Command | Description |
322
322
  |---------|-------------|
323
- | `inbox delete --ids "id1,id2,id3" --confirm` | Move emails to trash by ID |
324
- | `inbox delete --sender "pattern" --dry-run` | Preview deletion by sender filter |
325
- | `inbox delete --match "pattern" --dry-run` | Preview deletion by subject filter |
326
- | `inbox delete --sender "X" --match "Y" --confirm` | Delete by combined filters (AND) |
327
- | `inbox delete --sender "X" --limit 100 --confirm` | Override 50-email safety limit |
328
- | `inbox delete --sender "ab" --force --confirm` | Override short-pattern warning |
329
- | `inbox restore --last N` | Restore last N deleted emails |
330
- | `inbox restore --ids "id1,id2"` | Restore specific emails |
331
- | `inbox mark-read --ids "id1,id2"` | Mark emails as read (remove UNREAD label) |
332
- | `inbox mark-unread --ids "id1,id2"` | Mark emails as unread (add UNREAD label) |
333
- | `inbox archive --ids "id1,id2" --confirm` | Archive emails (remove from inbox, keep in All Mail) |
334
- | `inbox deletion-log` | View recent deletions |
323
+ | `inboxd delete --ids "id1,id2,id3" --confirm` | Move emails to trash by ID |
324
+ | `inboxd delete --sender "pattern" --dry-run` | Preview deletion by sender filter |
325
+ | `inboxd delete --match "pattern" --dry-run` | Preview deletion by subject filter |
326
+ | `inboxd delete --sender "X" --match "Y" --confirm` | Delete by combined filters (AND) |
327
+ | `inboxd delete --sender "X" --limit 100 --confirm` | Override 50-email safety limit |
328
+ | `inboxd delete --sender "ab" --force --confirm` | Override short-pattern warning |
329
+ | `inboxd restore --last N` | Restore last N deleted emails |
330
+ | `inboxd restore --ids "id1,id2"` | Restore specific emails |
331
+ | `inboxd mark-read --ids "id1,id2"` | Mark emails as read (remove UNREAD label) |
332
+ | `inboxd mark-unread --ids "id1,id2"` | Mark emails as unread (add UNREAD label) |
333
+ | `inboxd archive --ids "id1,id2" --confirm` | Archive emails (remove from inbox, keep in All Mail) |
334
+ | `inboxd unarchive --last N` | Undo last N archived emails |
335
+ | `inboxd unarchive --ids "id1,id2"` | Unarchive specific emails |
336
+ | `inboxd stats` | Show email activity dashboard (deletions, sent counts) |
337
+ | `inboxd stats --days 7 --json` | Get stats as JSON for custom period |
338
+ | `inboxd cleanup-suggest` | Get smart cleanup suggestions based on deletion patterns |
339
+ | `inboxd deletion-log` | View recent deletions |
340
+ | `inboxd deletion-log --json` | Get deletion log as JSON |
341
+ | `inboxd accounts --json` | List accounts as JSON |
342
+ | `inboxd delete --dry-run --json` | Preview deletion as structured JSON |
343
+ | `inboxd restore --json` | Get restore results as JSON |
335
344
 
336
345
  ### Smart Filtering Options
337
346
 
@@ -396,7 +405,7 @@ You have 5 emails from LinkedIn. Delete them all?
396
405
 
397
406
  ### 1. Check Inbox Status
398
407
  ```bash
399
- inbox summary --json
408
+ inboxd summary --json
400
409
  ```
401
410
  Report the total unread count and per-account breakdown.
402
411
 
@@ -434,7 +443,7 @@ Want me to triage that first?
434
443
 
435
444
  ### 3. Fetch Emails for Analysis
436
445
  ```bash
437
- inbox analyze --count 50 --account <name>
446
+ inboxd analyze --count 50 --account <name>
438
447
  ```
439
448
  Parse the JSON output and classify each email.
440
449
 
@@ -536,7 +545,7 @@ Confirm deletion? (y/n)
536
545
 
537
546
  Only after explicit user confirmation:
538
547
  ```bash
539
- inbox delete --ids "id1,id2,id3,..." --account <name> --confirm
548
+ inboxd delete --ids "id1,id2,id3,..." --account <name> --confirm
540
549
  ```
541
550
 
542
551
  ### 8. Confirm & Remind About Undo
@@ -545,7 +554,7 @@ After deletion:
545
554
  ```
546
555
  Deleted 8 emails.
547
556
 
548
- To undo: `inbox restore --last 8`
557
+ To undo: `inboxd restore --last 8`
549
558
  ```
550
559
 
551
560
  ---
@@ -589,12 +598,14 @@ When user has job-related emails (LinkedIn, Indeed, recruiters) and wants to eva
589
598
  | "Delete all from [sender]" | Bulk sender cleanup | `--sender "X" --dry-run` → confirm → `--ids` |
590
599
  | "Delete [sender]'s emails" | Bulk sender cleanup | Two-step pattern with `--sender` filter |
591
600
  | "Delete the security emails" | Subject-based cleanup | `--match "security" --dry-run` → confirm → `--ids` |
592
- | "What senders have the most emails?" | Inbox analysis | `inbox analyze --group-by sender` |
593
- | "What links are in this email?" | Extract URLs | `inbox read --id <id> --links` |
594
- | "Find my old emails" / "Clean up old stuff" | Stale email review | `inbox analyze --older-than 30d` |
601
+ | "What senders have the most emails?" | Inbox analysis | `inboxd analyze --group-by sender` |
602
+ | "Show my email stats" | Activity summary | `inboxd stats` |
603
+ | "What should I clean up?" | Pattern analysis | `inboxd cleanup-suggest` |
604
+ | "What links are in this email?" | Extract URLs | `inboxd read --id <id> --links` |
605
+ | "Find my old emails" / "Clean up old stuff" | Stale email review | `inboxd analyze --older-than 30d` |
595
606
  | "I keep getting these" | Recurring annoyance | Suggest unsubscribe/filter, then delete batch |
596
607
  | "Check [specific account]" | Single-account focus | Skip other accounts entirely |
597
- | "Undo" / "Restore" | Recover deleted emails | `inbox restore --last N` |
608
+ | "Undo" / "Restore" | Recover deleted emails | `inboxd restore --last N` |
598
609
  | "What are these companies?" | Research job/opportunity emails | Fetch websites, assess legitimacy |
599
610
  | "Research these job opportunities" | Job alert evaluation | Job Research workflow (see below) |
600
611
 
@@ -609,11 +620,11 @@ When user has job-related emails (LinkedIn, Indeed, recruiters) and wants to eva
609
620
  1. **NEVER auto-delete** - Always confirm before deletion, but adapt confirmation style to batch size
610
621
  2. **NEVER delete Action Required emails** - Surface them, let user decide
611
622
  3. **NEVER delete without --confirm flag** - Command will hang otherwise
612
- 4. **Always remind about undo** - After every deletion, mention `inbox restore --last N`
623
+ 4. **Always remind about undo** - After every deletion, mention `inboxd restore --last N`
613
624
 
614
625
  ### State Change Safety
615
626
  5. **Confirm before mark-read** - Marking as read can hide important emails. Confirm batch operations (3+ emails)
616
- 6. **Remind about mark-unread undo** - After mark-read, mention: "To undo: `inbox mark-unread --ids \"id1,id2\"`"
627
+ 6. **Remind about mark-unread undo** - After mark-read, mention: "To undo: `inboxd mark-unread --ids \"id1,id2\"`"
617
628
  7. **Confirm before archive** - Archiving removes emails from inbox view. Always use `--confirm` flag
618
629
  8. **Never batch mark-read silently** - Show what will be marked read before executing
619
630
 
@@ -625,9 +636,9 @@ When user has job-related emails (LinkedIn, Indeed, recruiters) and wants to eva
625
636
  ### Undo Commands Reference
626
637
  | Action | Undo Command |
627
638
  |--------|--------------|
628
- | Deleted emails | `inbox restore --last N` |
629
- | Marked as read | `inbox mark-unread --ids "id1,id2,..."` |
630
- | Archived | No CLI undo - must use Gmail web |
639
+ | Deleted emails | `inboxd restore --last N` |
640
+ | Marked as read | `inboxd mark-unread --ids "id1,id2,..."` |
641
+ | Archived | `inboxd unarchive --last N` |
631
642
 
632
643
  ---
633
644
 
@@ -636,13 +647,13 @@ When user has job-related emails (LinkedIn, Indeed, recruiters) and wants to eva
636
647
  > [!IMPORTANT]
637
648
  > **ALWAYS use this pattern for filter-based deletions.** Filters are for DISCOVERY. IDs are for EXECUTION.
638
649
 
639
- This pattern prevents accidental mass deletion. When user says "delete LinkedIn emails", never run `inbox delete --sender "linkedin" --confirm` directly—it could delete hundreds of emails.
650
+ This pattern prevents accidental mass deletion. When user says "delete LinkedIn emails", never run `inboxd delete --sender "linkedin" --confirm` directly—it could delete hundreds of emails.
640
651
 
641
652
  ### The Pattern
642
653
 
643
654
  1. **Discover** - Find what matches the filter
644
655
  ```bash
645
- inbox delete --sender "linkedin" --dry-run
656
+ inboxd delete --sender "linkedin" --dry-run
646
657
  ```
647
658
  Output shows emails that would be deleted, plus IDs for programmatic use.
648
659
 
@@ -659,7 +670,7 @@ This pattern prevents accidental mass deletion. When user says "delete LinkedIn
659
670
 
660
671
  3. **Execute** - Delete with explicit IDs (from dry-run output)
661
672
  ```bash
662
- inbox delete --ids "id1,id2,id3,id4,id5" --confirm
673
+ inboxd delete --ids "id1,id2,id3,id4,id5" --confirm
663
674
  ```
664
675
 
665
676
  ### When to Use Each Approach
@@ -683,20 +694,20 @@ This pattern prevents accidental mass deletion. When user says "delete LinkedIn
683
694
 
684
695
  ❌ **Bad agent behavior:**
685
696
  ```bash
686
- inbox delete --sender "linkedin" --confirm # Deletes ALL LinkedIn emails!
697
+ inboxd delete --sender "linkedin" --confirm # Deletes ALL LinkedIn emails!
687
698
  ```
688
699
 
689
700
  ✅ **Good agent behavior:**
690
701
  ```bash
691
702
  # Step 1: Find LinkedIn emails
692
- inbox analyze --count 20
703
+ inboxd analyze --count 20
693
704
  # Sees: 3 LinkedIn emails - job alert, connection request, message
694
705
 
695
706
  # Step 2: Identify the specific one by subject
696
707
  # (job alert has subject containing "jobs for you")
697
708
 
698
709
  # Step 3: Delete precisely
699
- inbox delete --ids "18e9abc" --confirm # Just the job alert
710
+ inboxd delete --ids "18e9abc" --confirm # Just the job alert
700
711
  ```
701
712
 
702
713
  ### Ambiguity Handling
@@ -740,7 +751,7 @@ I've classified your emails. Here's the breakdown:
740
751
  - 8 LinkedIn alerts (deleted)
741
752
  - 27 remaining
742
753
 
743
- Done! To undo deletions: inbox restore --last 8
754
+ Done! To undo deletions: inboxd restore --last 8
744
755
  ```
745
756
 
746
757
  **Good (plan-first approach):**
@@ -808,7 +819,7 @@ If the user encounters a bug, friction point, or suggests a feature:
808
819
  | Listing 50 emails individually | Overwhelming, wastes time | Summarize by category for large batches |
809
820
  | Suggesting deletion of "Re:" emails | Often important replies | Classify as Action Required |
810
821
  | Batching >20 emails without summary | Hard to verify what's being deleted | Show category breakdown |
811
- | Skipping pre-flight check | Tool may not be installed | Always run `inbox --version` first |
822
+ | Skipping pre-flight check | Tool may not be installed | Always run `inboxd --version` first |
812
823
  | Forgetting `--account` flag | Ambiguity errors with multi-account | Always specify account |
813
824
  | Being passive after actions | User has to drive every step | Proactively suggest next step |
814
825
  | Executing mark-read on batch without confirmation | User loses unread status on important emails | Confirm 3+ emails, always mention undo |
@@ -834,10 +845,10 @@ If the user encounters a bug, friction point, or suggests a feature:
834
845
 
835
846
  | Problem | Solution |
836
847
  |---------|----------|
837
- | `command not found: inbox` | Run: `npm install -g inboxd` |
838
- | "No accounts configured" | Run: `inbox setup` |
839
- | Token expired / auth errors | Delete token and re-auth: `rm ~/.config/inboxd/token-<account>.json && inbox auth -a <account>` |
840
- | Permission errors on delete | Re-authenticate: `inbox logout -a <account> && inbox auth -a <account>` |
848
+ | `command not found: inboxd` | Run: `npm install -g inboxd` |
849
+ | "No accounts configured" | Run: `inboxd setup` |
850
+ | Token expired / auth errors | Delete token and re-auth: `rm ~/.config/inboxd/token-<account>.json && inboxd auth -a <account>` |
851
+ | Permission errors on delete | Re-authenticate: `inboxd logout -a <account> && inboxd auth -a <account>` |
841
852
 
842
853
  ---
843
854
 
package/CLAUDE.md CHANGED
@@ -7,11 +7,11 @@ CLI tool for Gmail monitoring with multi-account support and macOS notifications
7
7
  ```bash
8
8
  npm test # Run tests
9
9
  npm run test:watch # Watch mode
10
- inbox setup # First-time setup wizard
11
- inbox auth -a <name> # Add account
12
- inbox summary # Check all inboxes
13
- inbox check -q # Background check
14
- inbox install-service # Install launchd service (macOS only)
10
+ inboxd setup # First-time setup wizard
11
+ inboxd auth -a <name> # Add account
12
+ inboxd summary # Check all inboxes
13
+ inboxd check -q # Background check
14
+ inboxd install-service # Install background service (macOS/Linux)
15
15
  ```
16
16
 
17
17
  ## Architecture
@@ -20,9 +20,10 @@ inbox install-service # Install launchd service (macOS only)
20
20
  src/
21
21
  ├── cli.js # Entry point, command definitions (commander)
22
22
  ├── gmail-auth.js # OAuth2 flow, token storage, multi-account management
23
- ├── gmail-monitor.js # Gmail API: fetch, count, trash, restore
23
+ ├── gmail-monitor.js # Gmail API: fetch, count, trash, restore, archive
24
24
  ├── state.js # Tracks seen emails per account
25
25
  ├── deletion-log.js # Logs deleted emails for restore capability
26
+ ├── archive-log.js # Logs archived emails for unarchive capability
26
27
  ├── sent-log.js # Logs sent emails for audit trail
27
28
  ├── notifier.js # macOS notifications (node-notifier)
28
29
  └── skill-installer.js # Copies skill to ~/.claude/skills/
@@ -54,6 +55,7 @@ All user data lives in `~/.config/inboxd/`:
54
55
  | `token-<name>.json` | OAuth refresh/access tokens |
55
56
  | `state-<name>.json` | `{ seenEmailIds, lastCheck, lastNotifiedAt }` |
56
57
  | `deletion-log.json` | Audit log for deleted emails |
58
+ | `archive-log.json` | Audit log for archived emails |
57
59
  | `sent-log.json` | Audit log for sent emails |
58
60
 
59
61
  ## Code Patterns
@@ -66,11 +68,14 @@ All user data lives in `~/.config/inboxd/`:
66
68
 
67
69
  ## Key Behaviors
68
70
 
69
- - `inbox setup` guides first-time users through credentials and auth
70
- - `inbox check` marks emails as seen after notifying
71
- - `inbox delete` logs to `deletion-log.json` before trashing
72
- - `inbox restore` moves from Trash to Inbox, removes log entry
73
- - `install-service` creates and automatically enables launchd service (macOS only, warns on other platforms)
71
+ - `inboxd setup` guides first-time users through credentials and auth
72
+ - `inboxd check` marks emails as seen after notifying
73
+ - `inboxd delete` logs to `deletion-log.json` before trashing
74
+ - `inboxd restore` moves from Trash to Inbox, removes log entry
75
+ - `inboxd archive` logs to `archive-log.json` before archiving
76
+ - `inboxd unarchive` moves archived emails back to Inbox, removes log entry
77
+ - `inboxd send/reply` prompts for interactive confirmation (or use `--confirm` to skip)
78
+ - `install-service` creates and enables launchd (macOS) or systemd (Linux) service
74
79
 
75
80
  ## OAuth Notes
76
81
 
@@ -116,11 +121,11 @@ Traditional CLIs are for humans. Agent-ready CLIs add:
116
121
  The skill can be installed globally for all Claude Code sessions:
117
122
 
118
123
  ```bash
119
- inbox install-skill # Install to ~/.claude/skills/
120
- inbox install-skill --uninstall # Remove
124
+ inboxd install-skill # Install to ~/.claude/skills/
125
+ inboxd install-skill --uninstall # Remove
121
126
  ```
122
127
 
123
- The `inbox setup` wizard also offers to install the skill automatically.
128
+ The `inboxd setup` wizard also offers to install the skill automatically.
124
129
 
125
130
  ### Skill Location & Update Detection
126
131
 
@@ -131,7 +136,7 @@ The `inbox setup` wizard also offers to install the skill automatically.
131
136
 
132
137
  The skill uses content-hash detection (no version field). Updates are detected automatically:
133
138
  - On `npm install`: Auto-updates if skill already installed
134
- - Manual: Run `inbox install-skill` to update
139
+ - Manual: Run `inboxd install-skill` to update
135
140
 
136
141
  Safety features:
137
142
  - `source: inboxd` marker identifies ownership (won't overwrite user's own skills)
@@ -154,22 +159,31 @@ scripts/postinstall.js # npm postinstall hint about install-skill
154
159
  ### Key Commands for AI Use
155
160
  | Command | Purpose |
156
161
  |---------|---------|
157
- | `inbox summary --json` | Quick status check (unread counts) |
158
- | `inbox analyze --count 50` | Get email data as JSON for classification |
159
- | `inbox analyze --group-by sender` | Group emails by sender domain |
160
- | `inbox analyze --older-than 30d` | Find emails older than 30 days (server-side filtering) |
161
- | `inbox delete --ids "id1,id2" --confirm` | Delete specific emails by ID |
162
- | `inbox delete --sender "pattern" --dry-run` | Preview deletion by sender filter |
163
- | `inbox delete --match "pattern" --dry-run` | Preview deletion by subject filter |
164
- | `inbox restore --last N` | Undo last N deletions |
165
- | `inbox read --id <id>` | Read full email content |
166
- | `inbox read --id <id> --links` | Extract links from email |
167
- | `inbox search -q <query>` | Search using Gmail query syntax |
168
- | `inbox send -t <to> -s <subj> -b <body> --confirm` | Send email (requires --confirm) |
169
- | `inbox reply --id <id> -b <body> --confirm` | Reply to email (requires --confirm) |
170
- | `inbox mark-read --ids "id1,id2"` | Mark emails as read |
171
- | `inbox mark-unread --ids "id1,id2"` | Mark emails as unread (undo mark-read) |
172
- | `inbox install-skill` | Install/update the Claude Code skill |
162
+ | `inboxd summary --json` | Quick status check (unread counts) |
163
+ | `inboxd analyze --count 50` | Get email data as JSON for classification |
164
+ | `inboxd analyze --group-by sender` | Group emails by sender domain |
165
+ | `inboxd analyze --older-than 30d` | Find emails older than 30 days (server-side filtering) |
166
+ | `inboxd delete --ids "id1,id2" --confirm` | Delete specific emails by ID |
167
+ | `inboxd delete --sender "pattern" --dry-run` | Preview deletion by sender filter |
168
+ | `inboxd delete --match "pattern" --dry-run` | Preview deletion by subject filter |
169
+ | `inboxd restore --last N` | Undo last N deletions |
170
+ | `inboxd read --id <id>` | Read full email content |
171
+ | `inboxd read --id <id> --links` | Extract links from email |
172
+ | `inboxd search -q <query>` | Search using Gmail query syntax |
173
+ | `inboxd send -t <to> -s <subj> -b <body> --confirm` | Send email (requires --confirm) |
174
+ | `inboxd reply --id <id> -b <body> --confirm` | Reply to email (requires --confirm) |
175
+ | `inboxd mark-read --ids "id1,id2"` | Mark emails as read |
176
+ | `inboxd mark-unread --ids "id1,id2"` | Mark emails as unread (undo mark-read) |
177
+ | `inboxd archive --ids "id1,id2" --confirm` | Archive emails (remove from inbox) |
178
+ | `inboxd unarchive --last N` | Undo last N archives |
179
+ | `inboxd stats` | Show email activity dashboard (deletions, sent) |
180
+ | `inboxd stats --json` | Get stats as JSON |
181
+ | `inboxd cleanup-suggest` | Get smart cleanup suggestions based on patterns |
182
+ | `inboxd accounts --json` | List accounts as JSON |
183
+ | `inboxd deletion-log --json` | Get deletion log as JSON |
184
+ | `inboxd delete --dry-run --json` | Preview deletion as JSON |
185
+ | `inboxd install-skill` | Install/update the Claude Code skill |
186
+ | `inboxd install-service --uninstall` | Remove background service |
173
187
 
174
188
  ### Smart Filtering Options
175
189
  | Option | Description |
@@ -182,8 +196,9 @@ scripts/postinstall.js # npm postinstall hint about install-skill
182
196
 
183
197
  ### Send/Reply Safety
184
198
  The `send` and `reply` commands have built-in safety features:
199
+ - **Interactive confirmation**: Prompts "Send this email? (y/N)" when no flags provided
185
200
  - **`--dry-run`**: Preview the email without sending
186
- - **`--confirm`**: Required flag to actually send (prevents accidental sends)
201
+ - **`--confirm`**: Skip the interactive prompt (for automation/scripts)
187
202
  - **Audit logging**: All sent emails are logged to `~/.config/inboxd/sent-log.json`
188
203
  - **Account resolution**: Prompts for account selection when multiple accounts exist
189
204