@notis_ai/cli 0.2.0-beta.102.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 (191) hide show
  1. package/README.md +334 -0
  2. package/bin/notis.js +2 -0
  3. package/config/notis_app_boundary_rules.json +50 -0
  4. package/dist/scaffolds/notis-database/CHANGELOG.md +5 -0
  5. package/dist/scaffolds/notis-database/app/globals.css +44 -0
  6. package/dist/scaffolds/notis-database/app/layout.tsx +6 -0
  7. package/dist/scaffolds/notis-database/app/page.tsx +1091 -0
  8. package/dist/scaffolds/notis-database/components/ui/badge.tsx +28 -0
  9. package/dist/scaffolds/notis-database/components/ui/button.tsx +53 -0
  10. package/dist/scaffolds/notis-database/components/ui/card.tsx +56 -0
  11. package/dist/scaffolds/notis-database/components/ui/table.tsx +120 -0
  12. package/dist/scaffolds/notis-database/components.json +20 -0
  13. package/dist/scaffolds/notis-database/index.html +12 -0
  14. package/dist/scaffolds/notis-database/lib/types.ts +134 -0
  15. package/dist/scaffolds/notis-database/lib/utils.ts +6 -0
  16. package/dist/scaffolds/notis-database/metadata/screenshot-1.png +0 -0
  17. package/dist/scaffolds/notis-database/notis.config.ts +26 -0
  18. package/dist/scaffolds/notis-database/package.json +31 -0
  19. package/dist/scaffolds/notis-database/postcss.config.mjs +8 -0
  20. package/dist/scaffolds/notis-database/src/dev-main.tsx +23 -0
  21. package/dist/scaffolds/notis-database/src/mock-runtime.ts +558 -0
  22. package/dist/scaffolds/notis-database/tailwind.config.ts +59 -0
  23. package/dist/scaffolds/notis-database/tsconfig.json +23 -0
  24. package/dist/scaffolds/notis-database/vite.config.ts +22 -0
  25. package/dist/scaffolds/notis-journal/CHANGELOG.md +25 -0
  26. package/dist/scaffolds/notis-journal/app/globals.css +37 -0
  27. package/dist/scaffolds/notis-journal/app/insights/page.tsx +513 -0
  28. package/dist/scaffolds/notis-journal/app/journal-core.tsx +362 -0
  29. package/dist/scaffolds/notis-journal/app/journal-ui.tsx +337 -0
  30. package/dist/scaffolds/notis-journal/app/layout.tsx +6 -0
  31. package/dist/scaffolds/notis-journal/app/page.tsx +485 -0
  32. package/dist/scaffolds/notis-journal/components/ui/badge.tsx +28 -0
  33. package/dist/scaffolds/notis-journal/components/ui/button.tsx +53 -0
  34. package/dist/scaffolds/notis-journal/components/ui/card.tsx +56 -0
  35. package/dist/scaffolds/notis-journal/components.json +20 -0
  36. package/dist/scaffolds/notis-journal/index.html +12 -0
  37. package/dist/scaffolds/notis-journal/lib/utils.ts +6 -0
  38. package/dist/scaffolds/notis-journal/metadata/screenshot-1.png +0 -0
  39. package/dist/scaffolds/notis-journal/metadata/screenshot-2.png +0 -0
  40. package/dist/scaffolds/notis-journal/metadata/screenshot-3.png +0 -0
  41. package/dist/scaffolds/notis-journal/metadata/screenshot-4.png +0 -0
  42. package/dist/scaffolds/notis-journal/metadata/screenshot-5.png +0 -0
  43. package/dist/scaffolds/notis-journal/metadata/screenshot-6.png +0 -0
  44. package/dist/scaffolds/notis-journal/metadata/screenshot-fixtures.json +132 -0
  45. package/dist/scaffolds/notis-journal/notis.config.ts +93 -0
  46. package/dist/scaffolds/notis-journal/package.json +34 -0
  47. package/dist/scaffolds/notis-journal/packages/sdk/package.json +36 -0
  48. package/dist/scaffolds/notis-journal/packages/sdk/src/components/DocumentEditor.tsx +93 -0
  49. package/dist/scaffolds/notis-journal/packages/sdk/src/components/Markdown.tsx +60 -0
  50. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectActionBar.tsx +278 -0
  51. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectCheckbox.tsx +91 -0
  52. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  53. package/dist/scaffolds/notis-journal/packages/sdk/src/config.ts +145 -0
  54. package/dist/scaffolds/notis-journal/packages/sdk/src/documents.ts +229 -0
  55. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useBackend.ts +41 -0
  56. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDatabaseSchema.ts +85 -0
  57. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocument.ts +78 -0
  58. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocuments.ts +121 -0
  59. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useMultiSelect.ts +539 -0
  60. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotis.ts +34 -0
  61. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotisNavigation.ts +49 -0
  62. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTool.ts +64 -0
  63. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTools.ts +56 -0
  64. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTopBarSearch.ts +73 -0
  65. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  66. package/dist/scaffolds/notis-journal/packages/sdk/src/index.ts +83 -0
  67. package/dist/scaffolds/notis-journal/packages/sdk/src/provider.tsx +43 -0
  68. package/dist/scaffolds/notis-journal/packages/sdk/src/runtime.ts +220 -0
  69. package/dist/scaffolds/notis-journal/packages/sdk/src/styles.css +186 -0
  70. package/dist/scaffolds/notis-journal/packages/sdk/src/ui.ts +15 -0
  71. package/dist/scaffolds/notis-journal/packages/sdk/src/vite.ts +56 -0
  72. package/dist/scaffolds/notis-journal/packages/sdk/tsconfig.json +15 -0
  73. package/dist/scaffolds/notis-journal/postcss.config.mjs +8 -0
  74. package/dist/scaffolds/notis-journal/skills/journal-onboarding/SKILL.md +120 -0
  75. package/dist/scaffolds/notis-journal/src/dev-main.tsx +58 -0
  76. package/dist/scaffolds/notis-journal/src/mock-runtime.ts +197 -0
  77. package/dist/scaffolds/notis-journal/tailwind.config.ts +58 -0
  78. package/dist/scaffolds/notis-journal/tsconfig.json +23 -0
  79. package/dist/scaffolds/notis-journal/vite.config.ts +10 -0
  80. package/dist/scaffolds/notis-notes/CHANGELOG.md +5 -0
  81. package/dist/scaffolds/notis-notes/app/globals.css +3 -0
  82. package/dist/scaffolds/notis-notes/app/layout.tsx +6 -0
  83. package/dist/scaffolds/notis-notes/app/page.tsx +1950 -0
  84. package/dist/scaffolds/notis-notes/components/ui/badge.tsx +28 -0
  85. package/dist/scaffolds/notis-notes/components/ui/button.tsx +53 -0
  86. package/dist/scaffolds/notis-notes/components/ui/card.tsx +56 -0
  87. package/dist/scaffolds/notis-notes/components.json +20 -0
  88. package/dist/scaffolds/notis-notes/lib/utils.ts +6 -0
  89. package/dist/scaffolds/notis-notes/metadata/screenshot-1.png +0 -0
  90. package/dist/scaffolds/notis-notes/notis.config.ts +35 -0
  91. package/dist/scaffolds/notis-notes/package.json +31 -0
  92. package/dist/scaffolds/notis-notes/postcss.config.mjs +8 -0
  93. package/dist/scaffolds/notis-notes/tailwind.config.ts +58 -0
  94. package/dist/scaffolds/notis-notes/tsconfig.json +23 -0
  95. package/dist/scaffolds/notis-notes/vite.config.ts +10 -0
  96. package/dist/scaffolds/notis-random/CHANGELOG.md +5 -0
  97. package/dist/scaffolds/notis-random/README.md +33 -0
  98. package/dist/scaffolds/notis-random/app/globals.css +11 -0
  99. package/dist/scaffolds/notis-random/app/history/page.tsx +66 -0
  100. package/dist/scaffolds/notis-random/app/layout.tsx +7 -0
  101. package/dist/scaffolds/notis-random/app/page.tsx +222 -0
  102. package/dist/scaffolds/notis-random/index.html +12 -0
  103. package/dist/scaffolds/notis-random/lib/notis-tools.ts +109 -0
  104. package/dist/scaffolds/notis-random/lib/rng.ts +42 -0
  105. package/dist/scaffolds/notis-random/lib/roll-record.ts +102 -0
  106. package/dist/scaffolds/notis-random/lib/utils.ts +25 -0
  107. package/dist/scaffolds/notis-random/metadata/screenshot-1.png +0 -0
  108. package/dist/scaffolds/notis-random/metadata/screenshot-2.png +0 -0
  109. package/dist/scaffolds/notis-random/notis.config.ts +42 -0
  110. package/dist/scaffolds/notis-random/package.json +32 -0
  111. package/dist/scaffolds/notis-random/postcss.config.mjs +6 -0
  112. package/dist/scaffolds/notis-random/src/dev-main.tsx +70 -0
  113. package/dist/scaffolds/notis-random/src/mock-runtime.ts +129 -0
  114. package/dist/scaffolds/notis-random/tailwind.config.ts +43 -0
  115. package/dist/scaffolds/notis-random/tsconfig.json +23 -0
  116. package/dist/scaffolds/notis-random/vite.config.ts +11 -0
  117. package/dist/scaffolds.json +47 -0
  118. package/package.json +45 -0
  119. package/skills/notis-apps/SKILL.md +219 -0
  120. package/skills/notis-apps/cli.md +244 -0
  121. package/skills/notis-cli/SKILL.md +269 -0
  122. package/skills/notis-query/cli.md +39 -0
  123. package/src/cli.js +175 -0
  124. package/src/command-specs/apps.js +1939 -0
  125. package/src/command-specs/helpers.js +186 -0
  126. package/src/command-specs/index.js +14 -0
  127. package/src/command-specs/meta.js +161 -0
  128. package/src/command-specs/tools.js +499 -0
  129. package/src/runtime/agent-browser.js +464 -0
  130. package/src/runtime/app-boundary-validator.js +183 -0
  131. package/src/runtime/app-changelog.js +79 -0
  132. package/src/runtime/app-dev-server.js +712 -0
  133. package/src/runtime/app-dev-sessions.js +251 -0
  134. package/src/runtime/app-platform.js +1500 -0
  135. package/src/runtime/assets/store-screenshot-dark.png +0 -0
  136. package/src/runtime/cli-mode.generated.js +4 -0
  137. package/src/runtime/cli-mode.js +29 -0
  138. package/src/runtime/desktop-auth.js +93 -0
  139. package/src/runtime/errors.js +55 -0
  140. package/src/runtime/help.js +60 -0
  141. package/src/runtime/output.js +180 -0
  142. package/src/runtime/ports.js +15 -0
  143. package/src/runtime/profiles.js +261 -0
  144. package/src/runtime/store-screenshot.js +138 -0
  145. package/src/runtime/transport.js +347 -0
  146. package/template/.harness/index.html.tmpl +333 -0
  147. package/template/CHANGELOG.md +5 -0
  148. package/template/app/globals.css +3 -0
  149. package/template/app/layout.tsx +6 -0
  150. package/template/app/page.tsx +60 -0
  151. package/template/components/ui/badge.tsx +28 -0
  152. package/template/components/ui/button.tsx +53 -0
  153. package/template/components/ui/card.tsx +56 -0
  154. package/template/components.json +20 -0
  155. package/template/lib/utils.ts +6 -0
  156. package/template/metadata/screenshot-1.png +0 -0
  157. package/template/metadata/screenshot-2.png +0 -0
  158. package/template/metadata/screenshot-3.png +0 -0
  159. package/template/notis.config.ts +36 -0
  160. package/template/package-lock.json +4137 -0
  161. package/template/package.json +32 -0
  162. package/template/packages/sdk/package.json +36 -0
  163. package/template/packages/sdk/src/components/DocumentEditor.tsx +93 -0
  164. package/template/packages/sdk/src/components/Markdown.tsx +60 -0
  165. package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +278 -0
  166. package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +91 -0
  167. package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  168. package/template/packages/sdk/src/config.ts +145 -0
  169. package/template/packages/sdk/src/documents.ts +229 -0
  170. package/template/packages/sdk/src/hooks/useBackend.ts +41 -0
  171. package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +85 -0
  172. package/template/packages/sdk/src/hooks/useDocument.ts +78 -0
  173. package/template/packages/sdk/src/hooks/useDocuments.ts +121 -0
  174. package/template/packages/sdk/src/hooks/useMultiSelect.ts +539 -0
  175. package/template/packages/sdk/src/hooks/useNotis.ts +34 -0
  176. package/template/packages/sdk/src/hooks/useNotisNavigation.ts +49 -0
  177. package/template/packages/sdk/src/hooks/useTool.ts +64 -0
  178. package/template/packages/sdk/src/hooks/useTools.ts +56 -0
  179. package/template/packages/sdk/src/hooks/useTopBarSearch.ts +73 -0
  180. package/template/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  181. package/template/packages/sdk/src/index.ts +83 -0
  182. package/template/packages/sdk/src/provider.tsx +43 -0
  183. package/template/packages/sdk/src/runtime.ts +220 -0
  184. package/template/packages/sdk/src/styles.css +186 -0
  185. package/template/packages/sdk/src/ui.ts +15 -0
  186. package/template/packages/sdk/src/vite.ts +56 -0
  187. package/template/packages/sdk/tsconfig.json +15 -0
  188. package/template/postcss.config.mjs +8 -0
  189. package/template/tailwind.config.ts +58 -0
  190. package/template/tsconfig.json +22 -0
  191. package/template/vite.config.ts +10 -0
package/README.md ADDED
@@ -0,0 +1,334 @@
1
+ # @notis_ai/cli
2
+
3
+ Agent-first Notis CLI for apps and generic tool execution.
4
+
5
+ ## Install
6
+
7
+ Use the Notis CLI through NPX. Install and sign into Notis Desktop to keep the local CLI auth profile current; do not rely on an installed `notis` command. Related skills such as `notis-cli` and `notis-apps` are delivered through normal Notis skill sync for the signed-in user.
8
+
9
+ For CI, hosted agents, or internal scripts, pass a non-persisted token with `NOTIS_JWT=<token>`.
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ npx --package @notis_ai/cli@latest -- notis --help
15
+ npx --package @notis_ai/cli@latest -- notis doctor
16
+ npx --package @notis_ai/cli@latest -- notis apps list
17
+ npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
18
+ ```
19
+
20
+ The desktop app owns sign-in and keeps the CLI profile in sync automatically.
21
+
22
+ The CLI defaults to `json` output in agent or non-TTY contexts and `table` output in interactive terminals.
23
+
24
+ ## Global Flags
25
+
26
+ - `--json` — Shortcut for `--output json`
27
+ - `--output <table|json|yaml|ndjson>` — Output mode override
28
+ - `--non-interactive` — Disable prompts
29
+ - `--profile <name>` — Select a stored profile
30
+ - `--api-base <url>` — Override the API base for one invocation
31
+ - `--timeout-ms <n>` — HTTP timeout in milliseconds
32
+ - `--idempotency-key <key>` — Override the generated idempotency key for mutating commands
33
+
34
+ ## Apps
35
+
36
+ ### `npx --package @notis_ai/cli@latest -- notis apps list`
37
+
38
+ List apps the current profile can access.
39
+
40
+ When to use: Discover existing apps before linking or deploying.
41
+
42
+ Examples:
43
+ - `npx --package @notis_ai/cli@latest -- notis apps list`
44
+ - `npx --package @notis_ai/cli@latest -- notis apps list --json`
45
+
46
+ ### `npx --package @notis_ai/cli@latest -- notis apps init <name> [dir]`
47
+
48
+ Scaffold a new Notis app project.
49
+
50
+ When to use: Start a new Notis app. Use --from with a bundled scaffold when one is close to the desired app; otherwise creates the bare Vite + React project.
51
+
52
+ Options:
53
+ - `--from <slug>` — Start from a bundled scaffold listed by `notis apps scaffolds list`.
54
+
55
+ Examples:
56
+ - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
57
+ - `npx --package @notis_ai/cli@latest -- notis apps init "Mind the Flo"`
58
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My CRM" --from notis-database`
59
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" ./my-app`
60
+
61
+ ### `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
62
+
63
+ List bundled Notis app scaffolds.
64
+
65
+ When to use: Discover the fixed scaffold catalog shipped with the CLI before starting a new app.
66
+
67
+ Examples:
68
+ - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
69
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from notis-database`
70
+
71
+ ### `npx --package @notis_ai/cli@latest -- notis apps create <name> [dir]`
72
+
73
+ Create a new remote Notis app and optionally link a local project to it.
74
+
75
+ When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
76
+
77
+ Examples:
78
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
79
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
80
+
81
+ ### `npx --package @notis_ai/cli@latest -- notis apps dev [dir]`
82
+
83
+ Develop Notis apps inside the Electron desktop Portal with automatic local bundle reloads.
84
+
85
+ When to use: Run this inside a single app or a monorepo root with apps/<name>/notis.config.ts. It discovers every app, starts the local bundle server, registers desktop-local dev sessions, and opens the Electron Portal to the local development app.
86
+
87
+ Options:
88
+ - `--port <number>` — Local bundle server port (default: 5173).
89
+ - `--no-open` — Do not auto-open the desktop Portal local development app.
90
+
91
+ Examples:
92
+ - `npx --package @notis_ai/cli@latest -- notis apps dev`
93
+ - `npx --package @notis_ai/cli@latest -- notis apps dev ./my-app`
94
+ - `npx --package @notis_ai/cli@latest -- notis apps dev ./workspace --port 5200`
95
+
96
+ ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
97
+
98
+ Build and package the app into .notis/output/.
99
+
100
+ When to use: Prepare the app for verification or deployment.
101
+
102
+ Examples:
103
+ - `npx --package @notis_ai/cli@latest -- notis apps build`
104
+ - `npx --package @notis_ai/cli@latest -- notis apps build ./my-app`
105
+
106
+ ### `npx --package @notis_ai/cli@latest -- notis apps verify [dir]`
107
+
108
+ Validate every route and the production Store listing contract.
109
+
110
+ When to use: After notis apps screenshot, before deploy. Catches render-time crashes, missing runtime calls, and incomplete listing media that the build step cannot detect.
111
+
112
+ Options:
113
+ - `--routes <slugs>` — Comma-separated route slugs. Default: every route in manifest.
114
+ - `--port <n>` — Loopback port. Default: auto-pick.
115
+ - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
116
+ - `--mode <mode>` — stub | live. Default stub. Live posts to /portal_views/runtime_query with the CLI JWT.
117
+ - `--no-browser` — Start the harness server and print URLs; do not drive agent-browser.
118
+ - `--keep-open` — Leave server + browser session running after report (for manual triage).
119
+
120
+ Examples:
121
+ - `npx --package @notis_ai/cli@latest -- notis apps verify`
122
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --routes notes`
123
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --mode live`
124
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --no-browser # start the harness, drive agent-browser yourself`
125
+
126
+ ### `npx --package @notis_ai/cli@latest -- notis apps screenshot [dir]`
127
+
128
+ Capture configured listing route/scenario states via the headless harness.
129
+
130
+ When to use: Generate the 3–6 declared metadata/screenshot-N.png files for the App Store listing. Apps are icon-led (like Raycast) — there is no cover image, only these screenshots. Each screenshot may set a focus selector to remove empty canvas and a light or dark theme that also controls its Store frame. Run before notis apps verify / deploy / publish.
131
+
132
+ Options:
133
+ - `--routes <slugs>` — Comma-separated route slugs. Default: every configured screenshot state.
134
+ - `--port <n>` — Loopback port. Default: auto-pick.
135
+ - `--width <px>` — Viewport width. Default: 2000.
136
+ - `--height <px>` — Viewport height. Default: 1250 (16:10).
137
+ - `--output-dir <dir>` — Where to write screenshot-N.png. Default: metadata/.
138
+ - `--mode <mode>` — stub | live. Default stub. Live renders against real data via the CLI JWT (requires a linked app), so screenshots show actual content instead of empty states.
139
+ - `--raw` — Write the unframed harness capture instead of the default Store presentation.
140
+ - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
141
+
142
+ Examples:
143
+ - `npx --package @notis_ai/cli@latest -- notis apps screenshot # honors notis.config.ts screenshot scenarios`
144
+ - `npx --package @notis_ai/cli@latest -- notis apps screenshot --routes home,history`
145
+ - `npx --package @notis_ai/cli@latest -- notis apps screenshot --mode live # populated screenshots from real data`
146
+ - `npx --package @notis_ai/cli@latest -- notis apps screenshot --raw # diagnostic capture without Store framing`
147
+
148
+ ### `npx --package @notis_ai/cli@latest -- notis apps link <app-id> [dir]`
149
+
150
+ Link a local project to a remote Notis app.
151
+
152
+ When to use: Connect a local project to an existing app for deployment.
153
+
154
+ Examples:
155
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123`
156
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./my-app`
157
+
158
+ ### `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir]`
159
+
160
+ Download a Notis app source snapshot into a local project folder.
161
+
162
+ When to use: Edit an installed app locally. Pulls the persisted source, links the directory to the app/version, then continue with npm install, notis apps dev, notis apps build, and notis apps deploy.
163
+
164
+ Options:
165
+ - `--force` — Overwrite a non-empty target directory.
166
+ - `--version <n>` — Pull a specific app source version (default: latest).
167
+
168
+ Examples:
169
+ - `npx --package @notis_ai/cli@latest -- notis apps pull abc123`
170
+ - `npx --package @notis_ai/cli@latest -- notis apps pull abc123 ./my-app --force`
171
+
172
+ ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
173
+
174
+ Build and upload the app to the linked Notis app.
175
+
176
+ When to use: Ship the installed app to production for the linked user/team app. Requires a linked app (notis apps link). This command does not publish to the app store.
177
+
178
+ Options:
179
+ - `--app-id <id>` — Override linked app ID.
180
+ - `--skip-build` — Skip the build step (use existing .notis/output/).
181
+ - `--direct` — Upload directly to Supabase storage, bypassing the backend server. Auto-fallback on network errors.
182
+
183
+ Examples:
184
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy`
185
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --skip-build`
186
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --app-id abc123`
187
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
188
+
189
+ ### `npx --package @notis_ai/cli@latest -- notis apps publish [dir]`
190
+
191
+ Submit the deployed app for Store review.
192
+
193
+ When to use: After the user explicitly confirms the App Details page and Store listing are ready. Requires the current local project to match the latest deployed version.
194
+
195
+ Options:
196
+ - `--app-id <id>` — Override linked app ID.
197
+ - `--confirm-ready` — Confirm the user approved the current App Details page for Store submission.
198
+
199
+ Examples:
200
+ - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
201
+ - `npx --package @notis_ai/cli@latest -- notis apps publish ./my-app --confirm-ready`
202
+
203
+ ### `npx --package @notis_ai/cli@latest -- notis apps doctor [dir]`
204
+
205
+ Check project health and readiness.
206
+
207
+ When to use: Diagnose issues with a Notis app project.
208
+
209
+ Examples:
210
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor`
211
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor ./my-app`
212
+
213
+
214
+ ## Generic Tools
215
+
216
+ ### `npx --package @notis_ai/cli@latest -- notis tools toolkits`
217
+
218
+ List toolkit namespaces and connection statuses available to the active user.
219
+
220
+ When to use: Use this to inspect connection state before searching or executing generic tools.
221
+
222
+ Examples:
223
+ - `npx --package @notis_ai/cli@latest -- notis tools toolkits`
224
+ - `npx --package @notis_ai/cli@latest -- notis tools toolkits --json`
225
+
226
+ ### `npx --package @notis_ai/cli@latest -- notis tools search <query>`
227
+
228
+ Search across toolkit namespaces using natural language.
229
+
230
+ When to use: Use this when you need a generic capability that does not have a first-class CLI command.
231
+
232
+ Options:
233
+ - `--known-fields <text>` — Optional known field hints, such as channel_name:general or user_email:a@example.com.
234
+
235
+ Examples:
236
+ - `npx --package @notis_ai/cli@latest -- notis tools search "send an email"`
237
+ - `npx --package @notis_ai/cli@latest -- notis tools search "post on LinkedIn" --known-fields "platform:linkedin"`
238
+
239
+ ### `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name>`
240
+
241
+ Describe a generic tool by name.
242
+
243
+ When to use: Use this when you know the tool name and want its parameter schema before execution.
244
+
245
+ Examples:
246
+ - `npx --package @notis_ai/cli@latest -- notis tools describe composio-gmail-send_email`
247
+ - `npx --package @notis_ai/cli@latest -- notis tools describe LOCAL_NOTIS_DATABASE_QUERY`
248
+
249
+ ### `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name>`
250
+
251
+ Execute a generic tool by canonical tool name.
252
+
253
+ When to use: Use this as the escape hatch for integrations or Notis tools without a first-class CLI wrapper.
254
+
255
+ Options:
256
+ - `--arguments <json>` — JSON object, @file path, or - for stdin.
257
+ - `--file <argument-path=local-path>` — Upload a local file into a file-uploadable tool argument. Repeatable.
258
+ - `--get-schema` — Display the tool parameter schema without executing.
259
+ - `--dry-run` — Validate arguments against the tool schema without executing.
260
+
261
+ Examples:
262
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_slug":"tasks","query":{}}'`
263
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"tasks"}'`
264
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --get-schema`
265
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"database_slug":"tasks","query":{}}'`
266
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments @query.json`
267
+ - `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments - < query.json`
268
+ - `npx --package @notis_ai/cli@latest -- notis tools exec composio-dropbox-upload_file --arguments '{"path":"/target/in/dropbox.pdf"}' --file content=./Invoice.pdf`
269
+
270
+ ### `npx --package @notis_ai/cli@latest -- notis tools exec-parallel <calls>`
271
+
272
+ Execute multiple tools concurrently.
273
+
274
+ When to use: Use this when you need to run independent tool calls simultaneously for speed.
275
+
276
+ Options:
277
+ - `--file <argument-path=local-path>` — Unsupported for exec-parallel; use tools exec for file uploads.
278
+
279
+ Examples:
280
+ - `npx --package @notis_ai/cli@latest -- notis tools exec-parallel '[{"tool_name":"LOCAL_NOTIS_DATABASE_QUERY","arguments":{"database_slug":"tasks","query":{}}},{"tool_name":"LOCAL_NOTIS_DATABASE_LIST_DATABASES","arguments":{}}]'`
281
+
282
+ ### `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>`
283
+
284
+ Get the URL to connect an integration toolkit.
285
+
286
+ When to use: Use this when a tool requires authentication with an external service.
287
+
288
+ Examples:
289
+ - `npx --package @notis_ai/cli@latest -- notis tools link github`
290
+ - `npx --package @notis_ai/cli@latest -- notis tools link gmail --json`
291
+
292
+
293
+ ## Meta Commands
294
+
295
+ ### `npx --package @notis_ai/cli@latest -- notis doctor`
296
+
297
+ Run a quick CLI health check for config, auth, and API reachability.
298
+
299
+ When to use: Use this before relying on the CLI in automation or after changing environments.
300
+
301
+ Examples:
302
+ - `npx --package @notis_ai/cli@latest -- notis doctor`
303
+ - `npx --package @notis_ai/cli@latest -- notis doctor --json`
304
+
305
+ ### `npx --package @notis_ai/cli@latest -- notis whoami`
306
+
307
+ Display the active profile, user, and available toolkit connection statuses.
308
+
309
+ When to use: Use this to quickly confirm which account and environment a command will target.
310
+
311
+ Examples:
312
+ - `npx --package @notis_ai/cli@latest -- notis whoami`
313
+ - `npx --package @notis_ai/cli@latest -- notis whoami --json`
314
+
315
+ ### `npx --package @notis_ai/cli@latest -- notis describe <command...>`
316
+
317
+ Describe a first-class CLI command in detail.
318
+
319
+ When to use: Use this when an agent or human needs the exact shape, examples, and semantics of a command.
320
+
321
+ Examples:
322
+ - `npx --package @notis_ai/cli@latest -- notis describe apps deploy`
323
+ - `npx --package @notis_ai/cli@latest -- notis describe tools exec`
324
+
325
+
326
+ ## Local Development
327
+
328
+ ```bash
329
+ cd packages/cli
330
+ npm install
331
+ node ./bin/notis.js --help
332
+ npm run docs:generate
333
+ npm test
334
+ ```
package/bin/notis.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import('../src/cli.js').then(({ run }) => run());
@@ -0,0 +1,50 @@
1
+ {
2
+ "javascript": [
3
+ {
4
+ "pattern": "window\\.__NOTIS_RUNTIME__",
5
+ "message": "window.__NOTIS_RUNTIME__ is forbidden; rely on the portal-injected NotisProvider runtime."
6
+ },
7
+ {
8
+ "pattern": "document\\.(?:body|head|documentElement)\\b",
9
+ "message": "document.body, document.head, and document.documentElement are forbidden; apps must stay inside the app surface."
10
+ },
11
+ {
12
+ "pattern": "document\\.(?:querySelector|querySelectorAll|getElementById|getElementsByClassName|getElementsByTagName)\\s*\\(\\s*(['\"`])[^\\n]*\\[data-notis-",
13
+ "message": "querying portal-owned [data-notis-*] hooks is forbidden."
14
+ },
15
+ {
16
+ "pattern": "createPortal\\s*\\(",
17
+ "message": "React portals are unsupported in Notis apps until a shadow-safe overlay contract exists."
18
+ },
19
+ {
20
+ "pattern": "@radix-ui/react-portal",
21
+ "message": "@radix-ui/react-portal is unsupported in Notis apps until a shadow-safe overlay contract exists."
22
+ },
23
+ {
24
+ "pattern": "PortalPrimitive",
25
+ "message": "Radix portal primitives are unsupported in Notis apps until a shadow-safe overlay contract exists."
26
+ }
27
+ ],
28
+ "css": [
29
+ {
30
+ "pattern": ":root\\b",
31
+ "message": ":root selectors are forbidden; styles must stay inside the app surface."
32
+ },
33
+ {
34
+ "pattern": "(^|[\\s,>+~])html(?=[\\s.#[:{>+~,]|$)",
35
+ "message": "html selectors are forbidden; styles must stay inside the app surface."
36
+ },
37
+ {
38
+ "pattern": "(^|[\\s,>+~])body(?=[\\s.#[:{>+~,]|$)",
39
+ "message": "body selectors are forbidden; styles must stay inside the app surface."
40
+ },
41
+ {
42
+ "pattern": "\\[data-notis-(?!app-root\\b)[^\\]]*\\]",
43
+ "message": "portal-owned [data-notis-*] selectors are forbidden. Use [data-notis-app-root] only for the app surface itself."
44
+ },
45
+ {
46
+ "pattern": "\\[data-sidebar(?:=[^\\]]+)?\\]",
47
+ "message": "portal sidebar selectors are forbidden."
48
+ }
49
+ ]
50
+ }
@@ -0,0 +1,5 @@
1
+ # Database Changelog
2
+
3
+ ## [Initial Release] - {PR_MERGE_DATE}
4
+
5
+ - First Store release.
@@ -0,0 +1,44 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /*
6
+ * The portal mounts the app inside [data-notis-app-root] (display: block,
7
+ * min-height: 100% from @notis/sdk/styles.css). Width 100% ensures the
8
+ * two-pane layout can stretch to the full content area; height stays on
9
+ * the SDK's min-height: 100% default so the page can grow with content.
10
+ * The page itself uses `h-screen` to guarantee a fixed viewport height
11
+ * for the two-pane divider and centered empty states.
12
+ */
13
+ [data-notis-app-root] {
14
+ width: 100%;
15
+ }
16
+
17
+ /*
18
+ * Dev-preview fallback tokens. Active only when the dev entrypoint sets the
19
+ * data-dev-preview attribute. Production bundle runs inside the portal
20
+ * shadow root where the host injects real theme tokens, so this rule is
21
+ * scoped narrowly enough to never collide with portal-provided values.
22
+ */
23
+ [data-dev-preview] {
24
+ --background: 0 0% 100%;
25
+ --foreground: 0 0% 4%;
26
+ --card: 0 0% 100%;
27
+ --card-foreground: 0 0% 4%;
28
+ --popover: 0 0% 100%;
29
+ --popover-foreground: 0 0% 4%;
30
+ --primary: 0 0% 9%;
31
+ --primary-foreground: 0 0% 98%;
32
+ --secondary: 240 5% 96%;
33
+ --secondary-foreground: 0 0% 9%;
34
+ --muted: 240 5% 96%;
35
+ --muted-foreground: 240 4% 46%;
36
+ --accent: 240 5% 96%;
37
+ --accent-foreground: 0 0% 9%;
38
+ --destructive: 0 84% 60%;
39
+ --destructive-foreground: 0 0% 98%;
40
+ --border: 240 6% 90%;
41
+ --input: 240 6% 90%;
42
+ --ring: 0 0% 4%;
43
+ --radius: 0.5rem;
44
+ }
@@ -0,0 +1,6 @@
1
+ import '@notis/sdk/styles.css';
2
+ import './globals.css';
3
+
4
+ export default function AppShell({ children }: { children: React.ReactNode }) {
5
+ return children;
6
+ }