@notis_ai/cli 0.2.0-beta.113.1 → 0.2.0-beta.116.1

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.
Files changed (178) hide show
  1. package/README.md +15 -0
  2. package/dist/scaffolds/notis-database/app/page.tsx +38 -41
  3. package/dist/scaffolds/notis-database/lib/types.ts +5 -7
  4. package/dist/scaffolds/notis-database/metadata/screenshot-1.png +0 -0
  5. package/dist/scaffolds/notis-database/metadata/screenshot-2.png +0 -0
  6. package/dist/scaffolds/notis-database/metadata/screenshot-3.png +0 -0
  7. package/dist/scaffolds/notis-database/metadata/screenshot-4.png +0 -0
  8. package/dist/scaffolds/notis-database/metadata/screenshot-5.png +0 -0
  9. package/dist/scaffolds/notis-database/metadata/screenshot-fixtures.json +1839 -0
  10. package/dist/scaffolds/notis-database/notis.config.ts +48 -1
  11. package/dist/scaffolds/notis-database/package-lock.json +3935 -0
  12. package/dist/scaffolds/notis-database/package.json +2 -1
  13. package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/package.json +4 -0
  14. package/dist/scaffolds/notis-database/packages/sdk/src/components/DocumentEditor.tsx +93 -0
  15. package/dist/scaffolds/notis-database/packages/sdk/src/components/Markdown.tsx +60 -0
  16. package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/components/MultiSelectActionBar.tsx +7 -2
  17. package/dist/scaffolds/notis-database/packages/sdk/src/config.ts +196 -0
  18. package/dist/scaffolds/notis-database/packages/sdk/src/documents.ts +229 -0
  19. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDatabaseSchema.ts +85 -0
  20. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocument.ts +78 -0
  21. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocuments.ts +121 -0
  22. package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useMultiSelect.ts +38 -2
  23. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  24. package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/index.ts +30 -1
  25. package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/runtime.ts +76 -17
  26. package/dist/scaffolds/notis-database/packages/sdk/src/styles.css +186 -0
  27. package/dist/scaffolds/notis-database/src/mock-runtime.ts +4 -1
  28. package/dist/scaffolds/notis-journal/CHANGELOG.md +4 -0
  29. package/dist/scaffolds/notis-journal/app/page.tsx +1 -0
  30. package/dist/scaffolds/notis-journal/package-lock.json +4615 -0
  31. package/dist/scaffolds/notis-journal/package.json +2 -2
  32. package/dist/scaffolds/notis-journal/packages/sdk/src/config.ts +52 -1
  33. package/dist/scaffolds/notis-notes/app/page.tsx +39 -46
  34. package/dist/scaffolds/notis-notes/app/phosphor-icons.ts +596 -0
  35. package/dist/scaffolds/notis-notes/lib/visible-properties.ts +144 -0
  36. package/dist/scaffolds/notis-notes/metadata/screenshot-1.png +0 -0
  37. package/dist/scaffolds/notis-notes/metadata/screenshot-2.png +0 -0
  38. package/dist/scaffolds/notis-notes/metadata/screenshot-3.png +0 -0
  39. package/dist/scaffolds/notis-notes/metadata/screenshot-4.png +0 -0
  40. package/dist/scaffolds/notis-notes/metadata/screenshot-5.png +0 -0
  41. package/dist/scaffolds/notis-notes/metadata/screenshot-fixtures.json +752 -0
  42. package/dist/scaffolds/notis-notes/notis.config.ts +48 -3
  43. package/dist/scaffolds/notis-notes/package-lock.json +4636 -0
  44. package/dist/scaffolds/notis-notes/package.json +7 -3
  45. package/dist/scaffolds/notis-notes/packages/sdk/package.json +36 -0
  46. package/dist/scaffolds/notis-notes/packages/sdk/src/components/DocumentEditor.tsx +93 -0
  47. package/dist/scaffolds/notis-notes/packages/sdk/src/components/Markdown.tsx +60 -0
  48. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectActionBar.tsx +278 -0
  49. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectCheckbox.tsx +91 -0
  50. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  51. package/dist/scaffolds/notis-notes/packages/sdk/src/config.ts +196 -0
  52. package/dist/scaffolds/notis-notes/packages/sdk/src/documents.ts +229 -0
  53. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useBackend.ts +41 -0
  54. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDatabaseSchema.ts +85 -0
  55. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocument.ts +78 -0
  56. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocuments.ts +121 -0
  57. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useMultiSelect.ts +539 -0
  58. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotis.ts +34 -0
  59. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotisNavigation.ts +49 -0
  60. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTool.ts +64 -0
  61. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTools.ts +56 -0
  62. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTopBarSearch.ts +73 -0
  63. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  64. package/dist/scaffolds/notis-notes/packages/sdk/src/index.ts +83 -0
  65. package/dist/scaffolds/notis-notes/packages/sdk/src/provider.tsx +43 -0
  66. package/dist/scaffolds/notis-notes/packages/sdk/src/runtime.ts +220 -0
  67. package/dist/scaffolds/notis-notes/packages/sdk/src/styles.css +186 -0
  68. package/dist/scaffolds/notis-notes/packages/sdk/src/ui.ts +15 -0
  69. package/dist/scaffolds/notis-notes/packages/sdk/src/vite.ts +56 -0
  70. package/dist/scaffolds/notis-notes/packages/sdk/tsconfig.json +15 -0
  71. package/dist/scaffolds/notis-random/CHANGELOG.md +12 -2
  72. package/dist/scaffolds/notis-random/app/history/page.tsx +5 -4
  73. package/dist/scaffolds/notis-random/app/page.tsx +141 -74
  74. package/dist/scaffolds/notis-random/components/ui/button.tsx +50 -0
  75. package/dist/scaffolds/notis-random/components/ui/card.tsx +16 -0
  76. package/dist/scaffolds/notis-random/components/ui/input.tsx +23 -0
  77. package/dist/scaffolds/notis-random/lib/notis-tools.ts +26 -7
  78. package/dist/scaffolds/notis-random/lib/rng.ts +179 -19
  79. package/dist/scaffolds/notis-random/lib/roll-record.ts +103 -16
  80. package/dist/scaffolds/notis-random/metadata/screenshot-1.png +0 -0
  81. package/dist/scaffolds/notis-random/metadata/screenshot-2.png +0 -0
  82. package/dist/scaffolds/notis-random/metadata/screenshot-3.png +0 -0
  83. package/dist/scaffolds/notis-random/metadata/screenshot-4.png +0 -0
  84. package/dist/scaffolds/notis-random/metadata/screenshot-5.png +0 -0
  85. package/dist/scaffolds/notis-random/metadata/screenshot-fixtures.json +753 -0
  86. package/dist/scaffolds/notis-random/notis.config.ts +47 -3
  87. package/dist/scaffolds/notis-random/package-lock.json +4513 -0
  88. package/dist/scaffolds/notis-random/package.json +6 -2
  89. package/dist/scaffolds/notis-random/packages/sdk/package.json +36 -0
  90. package/dist/scaffolds/notis-random/packages/sdk/src/components/DocumentEditor.tsx +93 -0
  91. package/dist/scaffolds/notis-random/packages/sdk/src/components/Markdown.tsx +60 -0
  92. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectActionBar.tsx +278 -0
  93. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectCheckbox.tsx +91 -0
  94. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  95. package/dist/scaffolds/notis-random/packages/sdk/src/config.ts +196 -0
  96. package/dist/scaffolds/notis-random/packages/sdk/src/documents.ts +229 -0
  97. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useBackend.ts +41 -0
  98. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDatabaseSchema.ts +85 -0
  99. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocument.ts +78 -0
  100. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocuments.ts +121 -0
  101. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useMultiSelect.ts +539 -0
  102. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotis.ts +34 -0
  103. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotisNavigation.ts +49 -0
  104. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTool.ts +64 -0
  105. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTools.ts +56 -0
  106. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTopBarSearch.ts +73 -0
  107. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  108. package/dist/scaffolds/notis-random/packages/sdk/src/index.ts +83 -0
  109. package/dist/scaffolds/notis-random/packages/sdk/src/provider.tsx +43 -0
  110. package/dist/scaffolds/notis-random/packages/sdk/src/runtime.ts +220 -0
  111. package/dist/scaffolds/notis-random/packages/sdk/src/styles.css +186 -0
  112. package/dist/scaffolds/notis-random/packages/sdk/src/ui.ts +15 -0
  113. package/dist/scaffolds/notis-random/packages/sdk/src/vite.ts +56 -0
  114. package/dist/scaffolds/notis-random/packages/sdk/tsconfig.json +15 -0
  115. package/dist/scaffolds/notis-random/tailwind.config.ts +8 -1
  116. package/dist/scaffolds.json +8 -17
  117. package/package.json +2 -1
  118. package/skills/notis-apps/SKILL.md +438 -144
  119. package/skills/notis-apps/cli.md +15 -0
  120. package/skills/notis-cli/SKILL.md +8 -4
  121. package/skills/notis-onboarding/BRIEF.md +93 -0
  122. package/src/cli.js +16 -0
  123. package/src/command-specs/apps.js +290 -41
  124. package/src/command-specs/index.js +2 -0
  125. package/src/command-specs/onboarding.js +216 -0
  126. package/src/command-specs/tools.js +8 -4
  127. package/src/runtime/app-dev-server.js +3 -2
  128. package/src/runtime/app-dev-sessions.js +14 -40
  129. package/src/runtime/app-platform.js +65 -4
  130. package/src/runtime/desktop-auth.js +66 -17
  131. package/src/runtime/errors.js +1 -0
  132. package/src/runtime/profiles.js +27 -6
  133. package/src/runtime/telemetry.js +92 -0
  134. package/src/runtime/transport.js +12 -0
  135. package/template/.harness/index.html.tmpl +30 -2
  136. package/template/packages/sdk/src/config.ts +38 -1
  137. package/dist/scaffolds/notis-affiliate-prospects/CHANGELOG.md +0 -7
  138. package/dist/scaffolds/notis-affiliate-prospects/README.md +0 -20
  139. package/dist/scaffolds/notis-affiliate-prospects/app/globals.css +0 -42
  140. package/dist/scaffolds/notis-affiliate-prospects/app/layout.tsx +0 -7
  141. package/dist/scaffolds/notis-affiliate-prospects/app/page.tsx +0 -248
  142. package/dist/scaffolds/notis-affiliate-prospects/app/prospects/page.tsx +0 -134
  143. package/dist/scaffolds/notis-affiliate-prospects/app/segments/page.tsx +0 -108
  144. package/dist/scaffolds/notis-affiliate-prospects/components/ui/card.tsx +0 -35
  145. package/dist/scaffolds/notis-affiliate-prospects/index.html +0 -12
  146. package/dist/scaffolds/notis-affiliate-prospects/lib/affiliate-data.ts +0 -218
  147. package/dist/scaffolds/notis-affiliate-prospects/lib/demo-prospects.ts +0 -52
  148. package/dist/scaffolds/notis-affiliate-prospects/lib/notis-tools.ts +0 -100
  149. package/dist/scaffolds/notis-affiliate-prospects/lib/utils.ts +0 -25
  150. package/dist/scaffolds/notis-affiliate-prospects/metadata/screenshot-1.png +0 -0
  151. package/dist/scaffolds/notis-affiliate-prospects/metadata/screenshot-2.png +0 -0
  152. package/dist/scaffolds/notis-affiliate-prospects/metadata/screenshot-3.png +0 -0
  153. package/dist/scaffolds/notis-affiliate-prospects/metadata/screenshot-fixtures.json +0 -187
  154. package/dist/scaffolds/notis-affiliate-prospects/notis.config.ts +0 -65
  155. package/dist/scaffolds/notis-affiliate-prospects/package.json +0 -32
  156. package/dist/scaffolds/notis-affiliate-prospects/packages/sdk/src/config.ts +0 -90
  157. package/dist/scaffolds/notis-affiliate-prospects/packages/sdk/src/hooks/useDatabase.ts +0 -76
  158. package/dist/scaffolds/notis-affiliate-prospects/packages/sdk/src/hooks/useUpsertDocument.ts +0 -50
  159. package/dist/scaffolds/notis-affiliate-prospects/packages/sdk/src/styles.css +0 -38
  160. package/dist/scaffolds/notis-affiliate-prospects/postcss.config.mjs +0 -6
  161. package/dist/scaffolds/notis-affiliate-prospects/src/dev-main.tsx +0 -72
  162. package/dist/scaffolds/notis-affiliate-prospects/src/mock-runtime.ts +0 -242
  163. package/dist/scaffolds/notis-affiliate-prospects/tailwind.config.ts +0 -51
  164. package/dist/scaffolds/notis-affiliate-prospects/tsconfig.json +0 -23
  165. package/dist/scaffolds/notis-affiliate-prospects/vite.config.ts +0 -11
  166. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -0
  167. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -0
  168. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useBackend.ts +0 -0
  169. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useNotis.ts +0 -0
  170. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useNotisNavigation.ts +0 -0
  171. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useTool.ts +0 -0
  172. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useTools.ts +0 -0
  173. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/hooks/useTopBarSearch.ts +0 -0
  174. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/provider.tsx +0 -0
  175. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/ui.ts +0 -0
  176. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/src/vite.ts +0 -0
  177. /package/dist/scaffolds/{notis-affiliate-prospects → notis-database}/packages/sdk/tsconfig.json +0 -0
  178. /package/dist/scaffolds/{notis-affiliate-prospects → notis-random}/components.json +0 -0
@@ -232,6 +232,21 @@ Examples:
232
232
  - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
233
233
  - `npx --package @notis_ai/cli@latest -- notis apps publish ./my-app --confirm-ready`
234
234
 
235
+ ### `npx --package @notis_ai/cli@latest -- notis apps duplicate [dir]`
236
+
237
+ Duplicate an app into an independent copy with its own databases.
238
+
239
+ When to use: When the same app should run for a second purpose - a notes app for blog drafts alongside one for bookmarks. The copy shares no data with the source.
240
+
241
+ Options:
242
+ - `--app-id <id>` — App to duplicate. Defaults to the app this project is linked to.
243
+ - `--name <name>` — Name for the duplicate (default: the source name followed by "copy").
244
+ - `--copy-documents <mode>` — Which rows to copy: 'declared' (default, the starter content a fresh install would have), 'all', or 'none'.
245
+
246
+ Examples:
247
+ - `npx --package @notis_ai/cli@latest -- notis apps duplicate --name "Blog"`
248
+ - `npx --package @notis_ai/cli@latest -- notis apps duplicate --app-id abc123 --name "Bookmarks" --copy-documents none`
249
+
235
250
  ### `npx --package @notis_ai/cli@latest -- notis apps doctor [dir]`
236
251
 
237
252
  Check project health and readiness.
@@ -49,9 +49,9 @@ Treat the Notis CLI the same way you would treat a Composio-style tool router fl
49
49
 
50
50
  Use this section when the goal is to create or update a Notis app from a local workspace.
51
51
 
52
- Notis apps are Vite + React projects using `@notis/sdk`. The workflow is init or pull, dev, build, verify, create/link, deploy.
52
+ Notis apps are Vite + React projects using `@notis/sdk`. The workflow is init or pull, dev, build, verify, create/link, deploy, then an explicitly confirmed Store submission when requested.
53
53
 
54
- Important: `deploy` means updating the installed app artifact for the current user or team. To list an app in the public Notis App Store, the owner opens the app details page in the Notis Portal, sets visibility to Team or Public, then uses Publish/Update. The CLI does not publish to the store; the backend opens the registry PR using a service token.
54
+ Important: `deploy` only updates the installed app artifact for the current user or team. Store submission is a separate, user-gated step. After the user explicitly confirms that the current App Details page and Store listing are ready, `apps publish --confirm-ready` submits the matching deployed version through the backend review flow.
55
55
 
56
56
  ### App development workflow
57
57
 
@@ -74,6 +74,8 @@ Important: `deploy` means updating the installed app artifact for the current us
74
74
  - `npx --package @notis_ai/cli@latest -- notis apps deploy`
75
75
  9. Check project health:
76
76
  - `npx --package @notis_ai/cli@latest -- notis apps doctor`
77
+ 10. Only after the user explicitly approves the current Store preview, submit the deployed version:
78
+ - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
77
79
 
78
80
  ### App development rules
79
81
 
@@ -82,7 +84,8 @@ Important: `deploy` means updating the installed app artifact for the current us
82
84
  - Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
83
85
  - Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
84
86
  - Use `npx --package @notis_ai/cli@latest -- notis apps list` to discover existing app IDs before linking.
85
- - For App Store publishing, do not use the CLI. The user opens the app details page in the Notis Portal, sets visibility to Team or Public, then uses Publish/Update. The backend opens the registry PR on their behalf using a service token. Do not invent any CLI store-publish command.
87
+ - Never treat deploy approval as Store approval. Set visibility to Team or Public first, then run `apps publish --confirm-ready` only after the user explicitly confirms the current App Details page and Store listing.
88
+ - `apps publish --confirm-ready` submits the deployed snapshot through the same backend review flow as App Details. It must reject missing confirmation, incomplete listing media, a local/deployed version mismatch, private visibility, or an existing pending review.
86
89
 
87
90
  ### App development command reference
88
91
 
@@ -96,9 +99,10 @@ Important: `deploy` means updating the installed app artifact for the current us
96
99
  - `npx --package @notis_ai/cli@latest -- notis apps link` -- associate the project with a remote app
97
100
  - `npx --package @notis_ai/cli@latest -- notis apps deploy` -- upload the artifact and editable source snapshot to the linked installed app in Notis
98
101
  - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct` -- deploy directly to Supabase storage, bypassing the backend server (auto-fallback when server is down)
102
+ - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready` -- submit the matching deployed version for Team or Public Store review after explicit user confirmation
99
103
  - `npx --package @notis_ai/cli@latest -- notis apps doctor` -- run project diagnostics
100
104
 
101
- App Store publishing is portal-only there is no CLI publish command.
105
+ App Details remains the visual review surface and offers the same Publish/Update action. The CLI command is for agents completing an already approved submission; it does not weaken the separate confirmation gate.
102
106
 
103
107
  If the task is specifically about app structure, runtime behavior, or database/view packaging, pair this skill with the `notis-apps` skill. Use `notis-cli` for the command workflow and `notis-apps` for the product/runtime contract.
104
108
 
@@ -0,0 +1,93 @@
1
+ You are onboarding someone to Notis from inside their coding agent. You already
2
+ have a shell and an authenticated Notis CLI, so you do the setup for them and
3
+ report what you did.
4
+
5
+ Run every Notis operation as:
6
+
7
+ ```bash
8
+ npx --package @notis_ai/cli@latest -- notis tools exec <TOOL> --arguments '<json>'
9
+ ```
10
+
11
+ Never invent tool names. `notis tools search "<what you need>"` finds them.
12
+
13
+ ## 1. Collect the basics
14
+
15
+ The fields onboarding collects, wherever it runs. Both the conversational
16
+ onboarding assistant and the CLI brief reference this partial so the two paths
17
+ can never quietly collect different things.
18
+
19
+ All of these land through `LOCAL_NOTIS_SAVE_USER_SETTINGS`: `full_name` on the
20
+ user row, the rest merged into the `settings` blob.
21
+
22
+ | Field | Setting key | What it is for |
23
+ |---|---|---|
24
+ | First name | `full_name` | How Notis addresses the user. Deduce from the email before asking. |
25
+ | Occupation / role | `position` | Tailors examples and suggestions. |
26
+ | Language | `language` | The language Notis replies in. |
27
+ | Time zone | `timezone` | Anchors every scheduled and time-relative request. Ask; never guess silently. |
28
+ | Attribution | `attribution` | Where they heard about Notis. Asked once, never again. |
29
+
30
+ Rules that hold on every surface:
31
+
32
+ * Ask one question at a time. A wall of questions reads as a form, and people
33
+ abandon forms.
34
+ * Skip anything already known or confidently deducible, and say what you deduced
35
+ rather than asking the user to confirm a blank.
36
+ * Save as soon as you have the basics rather than batching to the end — a user who
37
+ drops out halfway should not lose what they already told you.
38
+
39
+
40
+ You are in a terminal, so there is no phone number to infer a country from. Take
41
+ the language and time zone from the shell environment if you can read them, state
42
+ what you inferred, and let the user correct you. Then save:
43
+
44
+ ```bash
45
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_SAVE_USER_SETTINGS \
46
+ --arguments '{"full_name":"...","position":"...","language":"...","timezone":"..."}'
47
+ ```
48
+
49
+ ## 2. Connect one app, then immediately read from it
50
+
51
+ Ask what they use day to day. Gmail, Google Calendar, Notion, Slack, Linear, and
52
+ their CRM are the common answers. For each:
53
+
54
+ ```bash
55
+ npx --package @notis_ai/cli@latest -- notis tools link <toolkit>
56
+ ```
57
+
58
+ Give the user the returned URL and wait. Confirm with `notis tools toolkits`.
59
+
60
+ Then — and this is the step that makes onboarding land — run one read-only action
61
+ through the connection and show them the actual result: today's calendar events,
62
+ their most recent email threads, the databases in their Notion. A connected
63
+ integration is a claim; their own data on screen is proof.
64
+
65
+ If they connect nothing, fall back to installing a public app:
66
+ `LOCAL_NOTIS_LIST_PUBLIC_APP_STORE`, then `LOCAL_NOTIS_INSTALL_APP` with
67
+ `destination_type="personal"`.
68
+
69
+ ## 3. Finish onboarding
70
+
71
+ **Do this. It is not optional.**
72
+
73
+ ```bash
74
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_COMPLETE_TUTORIAL --arguments '{}'
75
+ ```
76
+
77
+ Until this runs, every message the user sends on every channel is routed to the
78
+ onboarding assistant — so an agent that collects everything and skips this leaves
79
+ them permanently stuck talking to an onboarding bot.
80
+
81
+ Verify with `LOCAL_NOTIS_GET_INTEGRATIONS_STATUS` and tell them what is connected.
82
+
83
+ ## What this plan does not include
84
+
85
+ Do **not** call `LOCAL_NOTIS_INSERT_REMINDER` or any automation tool during
86
+ onboarding. Reminders, automations, voice, and the messaging channels are paid
87
+ features; calling them here fails at the worst possible moment. If the user asks
88
+ for a reminder or a recurring task, say plainly that it needs an upgrade and offer
89
+ `LOCAL_NOTIS_GET_SUBSCRIPTION_STATUS` so they can see their plan.
90
+
91
+ What they *do* have: 1,000+ integrations through this CLI, skills that sync to
92
+ their coding agents, long-term memory, notes and databases, and the ability to
93
+ build Notis apps from this machine.
package/src/cli.js CHANGED
@@ -5,6 +5,7 @@ import { Command } from 'commander';
5
5
  import { COMMAND_SPECS, GROUP_SUMMARIES } from './command-specs/index.js';
6
6
  import { OutputManager } from './runtime/output.js';
7
7
  import { asCliError } from './runtime/errors.js';
8
+ import { reportCliCommand } from './runtime/telemetry.js';
8
9
  import {
9
10
  DEFAULT_PROFILE,
10
11
  resolveOutputMode,
@@ -130,6 +131,7 @@ function attachSpec(program, parentMap, spec, specs) {
130
131
  }
131
132
 
132
133
  command.action(async (...raw) => {
134
+ const startedAt = Date.now();
133
135
  const commanderCommand = raw[raw.length - 1];
134
136
  const argumentValues = raw.slice(0, -1);
135
137
  const globalOptions = commanderCommand.optsWithGlobals();
@@ -152,10 +154,24 @@ function attachSpec(program, parentMap, spec, specs) {
152
154
  output,
153
155
  });
154
156
  process.exitCode = typeof exitCode === 'number' ? exitCode : 0;
157
+ await reportCliCommand({
158
+ spec,
159
+ runtime,
160
+ result: process.exitCode === 0 ? 'success' : 'failed',
161
+ durationMs: Date.now() - startedAt,
162
+ error: process.exitCode === 0 ? null : { exitCode: process.exitCode },
163
+ });
155
164
  } catch (error) {
156
165
  const runtime = buildErrorRuntime(globalOptions);
157
166
  const output = new OutputManager(runtime);
158
167
  const cliError = asCliError(error);
168
+ await reportCliCommand({
169
+ spec,
170
+ runtime,
171
+ result: 'failed',
172
+ durationMs: Date.now() - startedAt,
173
+ error: cliError,
174
+ });
159
175
  process.exitCode = output.emitError({
160
176
  command: spec.command_path.join(' '),
161
177
  error: cliError,