@notis_ai/cli 0.2.1 → 0.2.2

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 (66) hide show
  1. package/README.md +98 -163
  2. package/dist/scaffolds/notes/app/globals.css +3 -0
  3. package/dist/scaffolds/notes/app/layout.tsx +6 -0
  4. package/dist/scaffolds/notes/app/page.tsx +1465 -0
  5. package/dist/scaffolds/notes/components/ui/badge.tsx +28 -0
  6. package/dist/scaffolds/notes/components/ui/button.tsx +53 -0
  7. package/dist/scaffolds/notes/components/ui/card.tsx +56 -0
  8. package/dist/scaffolds/notes/components.json +20 -0
  9. package/dist/scaffolds/notes/lib/utils.ts +6 -0
  10. package/dist/scaffolds/notes/notis.config.ts +31 -0
  11. package/dist/scaffolds/notes/package.json +31 -0
  12. package/dist/scaffolds/notes/postcss.config.mjs +8 -0
  13. package/dist/scaffolds/notes/tailwind.config.ts +58 -0
  14. package/dist/scaffolds/notes/tsconfig.json +22 -0
  15. package/dist/scaffolds/notes/vite.config.ts +10 -0
  16. package/dist/scaffolds.json +13 -0
  17. package/package.json +7 -3
  18. package/skills/notis-apps/SKILL.md +162 -0
  19. package/skills/notis-apps/cli.md +208 -0
  20. package/skills/notis-cli/SKILL.md +258 -0
  21. package/skills/notis-query/cli.md +40 -0
  22. package/src/cli.js +1 -1
  23. package/src/command-specs/apps.js +211 -46
  24. package/src/command-specs/helpers.js +0 -60
  25. package/src/command-specs/index.js +0 -6
  26. package/src/command-specs/meta.js +7 -6
  27. package/src/command-specs/tools.js +1 -33
  28. package/src/runtime/app-dev-server.js +32 -4
  29. package/src/runtime/app-platform.js +404 -24
  30. package/src/runtime/profiles.js +2 -2
  31. package/src/runtime/transport.js +2 -2
  32. package/template/.harness/index.html.tmpl +1 -50
  33. package/template/app/page.tsx +41 -6
  34. package/template/metadata/cover.png +0 -0
  35. package/template/metadata/screenshot-1.png +0 -0
  36. package/template/metadata/screenshot-2.png +0 -0
  37. package/template/metadata/screenshot-3.png +0 -0
  38. package/template/notis.config.ts +10 -6
  39. package/template/package.json +2 -2
  40. package/template/packages/{notis-sdk → sdk}/package.json +6 -0
  41. package/template/packages/{notis-sdk → sdk}/src/components/MultiSelectActionBar.tsx +2 -1
  42. package/template/packages/{notis-sdk → sdk}/src/components/MultiSelectCheckbox.tsx +2 -2
  43. package/template/packages/{notis-sdk → sdk}/src/components/MultiSelectDragOverlay.tsx +2 -2
  44. package/template/packages/{notis-sdk → sdk}/src/config.ts +1 -1
  45. package/template/packages/{notis-sdk → sdk}/src/hooks/useDatabase.ts +1 -13
  46. package/template/packages/{notis-sdk → sdk}/src/hooks/useMultiSelect.ts +4 -3
  47. package/template/packages/{notis-sdk → sdk}/src/hooks/useNotis.ts +4 -3
  48. package/template/packages/{notis-sdk → sdk}/src/hooks/useNotisNavigation.ts +3 -3
  49. package/template/packages/{notis-sdk → sdk}/src/hooks/useTool.ts +22 -7
  50. package/template/packages/{notis-sdk → sdk}/src/hooks/useUpsertDocument.ts +0 -8
  51. package/template/packages/{notis-sdk → sdk}/src/index.ts +2 -15
  52. package/template/packages/{notis-sdk → sdk}/src/provider.tsx +1 -1
  53. package/template/packages/{notis-sdk → sdk}/src/runtime.ts +5 -26
  54. package/src/command-specs/auth.js +0 -178
  55. package/src/command-specs/db.js +0 -163
  56. package/template/packages/notis-sdk/src/helpers.ts +0 -131
  57. package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
  58. package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
  59. package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
  60. /package/template/packages/{notis-sdk → sdk}/src/hooks/useBackend.ts +0 -0
  61. /package/template/packages/{notis-sdk → sdk}/src/hooks/useTools.ts +0 -0
  62. /package/template/packages/{notis-sdk → sdk}/src/hooks/useTopBarSearch.ts +0 -0
  63. /package/template/packages/{notis-sdk → sdk}/src/styles.css +0 -0
  64. /package/template/packages/{notis-sdk → sdk}/src/ui.ts +0 -0
  65. /package/template/packages/{notis-sdk → sdk}/src/vite.ts +0 -0
  66. /package/template/packages/{notis-sdk → sdk}/tsconfig.json +0 -0
@@ -0,0 +1,208 @@
1
+ # Notis CLI — App Development Workflow
2
+
3
+ When running outside the Notis container, use the `notis` CLI to work with Notis Apps locally.
4
+
5
+ Notis apps are Vite + React projects using `@notis/sdk`. The workflow is init, dev, build, verify, create/link, pull, deploy, and doctor.
6
+
7
+ Important: `notis apps deploy` updates the linked installed app. It is not an app-store publishing flow.
8
+
9
+ ## Setup
10
+
11
+ Install and sign into Notis Desktop to keep the CLI profile current. Run the CLI through NPX, for example `npx --package @notis_ai/cli@latest -- notis apps list`. Related skills such as `notis-cli` and `notis-apps` are delivered through normal Notis skill sync for the signed-in user.
12
+
13
+ For CI, hosted agents, or internal scripts, pass a non-persisted token with `NOTIS_JWT=<token>` and use `--api-base <server-url>` when targeting a non-default server.
14
+
15
+ ## Core Workflow
16
+
17
+ 1. Scaffold a new app:
18
+
19
+ ```bash
20
+ npx --package @notis_ai/cli@latest -- notis apps init
21
+ ```
22
+
23
+ 2. Or pull an installed app's saved source snapshot:
24
+
25
+ ```bash
26
+ npx --package @notis_ai/cli@latest -- notis apps pull <app-id> ./my-app
27
+ cd ./my-app
28
+ npm install
29
+ ```
30
+
31
+ 3. Develop locally with live reload:
32
+
33
+ ```bash
34
+ npx --package @notis_ai/cli@latest -- notis apps dev
35
+ ```
36
+
37
+ 4. Build the production artifact:
38
+
39
+ ```bash
40
+ npx --package @notis_ai/cli@latest -- notis apps build
41
+ ```
42
+
43
+ 5. Verify the built artifact headlessly:
44
+
45
+ ```bash
46
+ npx --package @notis_ai/cli@latest -- notis apps verify
47
+ ```
48
+
49
+ 6. Link the project if it was not created or pulled from an app, then deploy:
50
+
51
+ ```bash
52
+ npx --package @notis_ai/cli@latest -- notis apps link <app-id>
53
+ npx --package @notis_ai/cli@latest -- notis apps deploy
54
+ ```
55
+
56
+ ## Commands
57
+
58
+ ### `npx --package @notis_ai/cli@latest -- notis doctor`
59
+
60
+ Run a quick CLI health check for config, auth, and API reachability.
61
+
62
+ When to use: Use this before relying on the CLI in automation or after changing environments.
63
+
64
+ Examples:
65
+ - `npx --package @notis_ai/cli@latest -- notis doctor`
66
+ - `npx --package @notis_ai/cli@latest -- notis doctor --json`
67
+
68
+ ### `npx --package @notis_ai/cli@latest -- notis apps list`
69
+
70
+ List apps the current profile can access.
71
+
72
+ When to use: Discover existing apps before linking or deploying.
73
+
74
+ Examples:
75
+ - `npx --package @notis_ai/cli@latest -- notis apps list`
76
+ - `npx --package @notis_ai/cli@latest -- notis apps list --json`
77
+
78
+ ### `npx --package @notis_ai/cli@latest -- notis apps init <name> [dir]`
79
+
80
+ Scaffold a new Notis app project.
81
+
82
+ 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.
83
+
84
+ Options:
85
+ - `--from <slug>` — Start from a bundled scaffold listed by `notis apps scaffolds list`.
86
+
87
+ Examples:
88
+ - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
89
+ - `npx --package @notis_ai/cli@latest -- notis apps init "Mind the Flo"`
90
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My CRM" --from notis-database`
91
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" ./my-app`
92
+
93
+ ### `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
94
+
95
+ List bundled Notis app scaffolds.
96
+
97
+ When to use: Discover the fixed scaffold catalog shipped with the CLI before starting a new app.
98
+
99
+ Examples:
100
+ - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
101
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from notis-database`
102
+
103
+ ### `npx --package @notis_ai/cli@latest -- notis apps create <name> [dir]`
104
+
105
+ Create a new remote Notis app and optionally link a local project to it.
106
+
107
+ When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
108
+
109
+ Examples:
110
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
111
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
112
+
113
+ ### `npx --package @notis_ai/cli@latest -- notis apps dev [dir]`
114
+
115
+ Develop Notis apps inside the Electron desktop Portal with automatic local bundle reloads.
116
+
117
+ 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.
118
+
119
+ Options:
120
+ - `--port <number>` — Local bundle server port (default: 5173).
121
+ - `--no-open` — Do not auto-open the desktop Portal local development app.
122
+
123
+ Examples:
124
+ - `npx --package @notis_ai/cli@latest -- notis apps dev`
125
+ - `npx --package @notis_ai/cli@latest -- notis apps dev ./my-app`
126
+ - `npx --package @notis_ai/cli@latest -- notis apps dev ./workspace --port 5200`
127
+
128
+ ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
129
+
130
+ Build and package the app into .notis/output/.
131
+
132
+ When to use: Prepare the app for verification or deployment.
133
+
134
+ Examples:
135
+ - `npx --package @notis_ai/cli@latest -- notis apps build`
136
+ - `npx --package @notis_ai/cli@latest -- notis apps build ./my-app`
137
+
138
+ ### `npx --package @notis_ai/cli@latest -- notis apps verify [dir]`
139
+
140
+ Headless render smoke each route in a stub-runtime harness.
141
+
142
+ When to use: After notis apps build, before deploy. Catches render-time crashes and missing runtime calls that the build step cannot detect.
143
+
144
+ Options:
145
+ - `--routes <slugs>` — Comma-separated route slugs. Default: every route in manifest.
146
+ - `--port <n>` — Loopback port. Default: auto-pick.
147
+ - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
148
+ - `--mode <mode>` — stub | live. Default stub. Live posts to /portal_views/runtime_query with the CLI JWT.
149
+ - `--no-browser` — Start the harness server and print URLs; do not drive agent-browser.
150
+ - `--keep-open` — Leave server + browser session running after report (for manual triage).
151
+
152
+ Examples:
153
+ - `npx --package @notis_ai/cli@latest -- notis apps verify`
154
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --routes notes`
155
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --mode live`
156
+ - `npx --package @notis_ai/cli@latest -- notis apps verify --no-browser # start the harness, drive agent-browser yourself`
157
+
158
+ ### `npx --package @notis_ai/cli@latest -- notis apps link <app-id> [dir]`
159
+
160
+ Link a local project to a remote Notis app.
161
+
162
+ When to use: Connect a local project to an existing app for deployment.
163
+
164
+ Examples:
165
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123`
166
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./my-app`
167
+
168
+ ### `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir]`
169
+
170
+ Download a Notis app source snapshot into a local project folder.
171
+
172
+ 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.
173
+
174
+ Options:
175
+ - `--force` — Overwrite a non-empty target directory.
176
+ - `--version <n>` — Pull a specific app source version (default: latest).
177
+
178
+ Examples:
179
+ - `npx --package @notis_ai/cli@latest -- notis apps pull abc123`
180
+ - `npx --package @notis_ai/cli@latest -- notis apps pull abc123 ./my-app --force`
181
+
182
+ ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
183
+
184
+ Build and upload the app to the linked Notis app.
185
+
186
+ 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.
187
+
188
+ Options:
189
+ - `--app-id <id>` — Override linked app ID.
190
+ - `--skip-build` — Skip the build step (use existing .notis/output/).
191
+ - `--direct` — Upload directly to Supabase storage, bypassing the backend server. Auto-fallback on network errors.
192
+
193
+ Examples:
194
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy`
195
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --skip-build`
196
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --app-id abc123`
197
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
198
+
199
+ ### `npx --package @notis_ai/cli@latest -- notis apps doctor [dir]`
200
+
201
+ Check project health and readiness.
202
+
203
+ When to use: Diagnose issues with a Notis app project.
204
+
205
+ Examples:
206
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor`
207
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor ./my-app`
208
+
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: notis-cli
3
+ description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
4
+ ---
5
+
6
+ # Notis CLI Skill
7
+
8
+ Use this skill when the user wants work done through the Notis CLI.
9
+
10
+ This skill covers two main CLI workflows:
11
+
12
+ 1. Developing Notis apps locally.
13
+ 2. Accessing Notis, Composio, and MCP tools through the CLI.
14
+
15
+ ## When to use this skill
16
+
17
+ Activate this skill when:
18
+
19
+ - the user wants to init, develop, build, verify, link, pull, or deploy a Notis app through the CLI
20
+ - the current agent does not have the tool it needs in its direct tool list
21
+ - the user wants direct MCP access through Notis
22
+ - the user wants to use an integration-backed capability through Notis rather than a first-class local tool
23
+ - the task mentions the `notis` CLI directly
24
+
25
+ Use the registry-resolved published npm package everywhere:
26
+
27
+ - `npx --package @notis_ai/cli@latest -- notis ...`
28
+
29
+ Always use this NPX command form so the agent runs the current published CLI. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`; locally, Notis Desktop keeps the CLI auth profile current for NPX invocations.
30
+
31
+ Notis Desktop keeps the CLI auth profile current for NPX runs. This `notis-cli` skill is delivered through normal Notis skill sync for the signed-in user, alongside other curated skills.
32
+
33
+ ## Critical rule for missing tools
34
+
35
+ If the tool you need is not already available in your current tool surface, do not stop and do not assume the task is blocked.
36
+
37
+ Use the Notis CLI as the fallback access layer.
38
+
39
+ This is especially important when:
40
+
41
+ - you need direct MCP tools
42
+ - you need a Composio-backed integration tool
43
+ - you need a Notis tool that is not exposed as a first-class command in your current environment
44
+ - you need to discover the canonical tool name before execution
45
+
46
+ Treat the Notis CLI the same way you would treat a Composio-style tool router flow: discover what is available first, then execute the right tool through the CLI.
47
+
48
+ ## Section 1: Developing Notis Apps
49
+
50
+ Use this section when the goal is to create or update a Notis app from a local workspace.
51
+
52
+ Notis apps are Vite + React projects using `@notis/sdk`. The workflow is init or pull, dev, build, verify, create/link, deploy.
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.
55
+
56
+ ### App development workflow
57
+
58
+ 1. Scaffold a new app:
59
+ - `npx --package @notis_ai/cli@latest -- notis apps init`
60
+ 2. Or pull an existing app's source to edit it locally (the project is linked automatically):
61
+ - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>`
62
+ - then run `npm install`, `npx --package @notis_ai/cli@latest -- notis apps dev`, edit, build, and deploy
63
+ 3. Develop locally with live reload:
64
+ - `npx --package @notis_ai/cli@latest -- notis apps dev`
65
+ 4. Build the production artifact:
66
+ - `npx --package @notis_ai/cli@latest -- notis apps build`
67
+ 5. Verify the built artifact headlessly:
68
+ - `npx --package @notis_ai/cli@latest -- notis apps verify`
69
+ 6. For a brand-new app, create the remote app and link the project in one step:
70
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
71
+ 7. Or link the project to an existing remote app (skip if you used `pull` or `create`):
72
+ - `npx --package @notis_ai/cli@latest -- notis apps link`
73
+ 8. Deploy the artifact to Notis:
74
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy`
75
+ 9. Check project health:
76
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor`
77
+
78
+ ### App development rules
79
+
80
+ - Always `build` before `deploy`; run `verify` before deploy when validating an app change.
81
+ - Prefer `npx --package @notis_ai/cli@latest -- notis apps create "Name" .` for the first deploy of a new app.
82
+ - Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
83
+ - Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
84
+ - 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.
86
+
87
+ ### App development command reference
88
+
89
+ - `npx --package @notis_ai/cli@latest -- notis apps list` -- list accessible apps
90
+ - `npx --package @notis_ai/cli@latest -- notis apps init` -- scaffold a new Vite + React + `@notis/sdk` project
91
+ - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir] [--force] [--version <n>]` -- download the persisted source snapshot for an installed app and link the local directory to that app/version; legacy apps must be redeployed once with the current CLI before they can be pulled
92
+ - `npx --package @notis_ai/cli@latest -- notis apps dev` -- discover local apps, register desktop-local dev sessions, and load them in the Electron Portal Local development sidebar group
93
+ - `npx --package @notis_ai/cli@latest -- notis apps build` -- compile the production artifact
94
+ - `npx --package @notis_ai/cli@latest -- notis apps verify` -- headless render-smoke packaged routes before deploy
95
+ - `npx --package @notis_ai/cli@latest -- notis apps create` -- create a fresh remote app and optionally link the local project
96
+ - `npx --package @notis_ai/cli@latest -- notis apps link` -- associate the project with a remote app
97
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy` -- upload the artifact and editable source snapshot to the linked installed app in Notis
98
+ - `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)
99
+ - `npx --package @notis_ai/cli@latest -- notis apps doctor` -- run project diagnostics
100
+
101
+ App Store publishing is portal-only — there is no CLI publish command.
102
+
103
+ 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
+
105
+ ## IMPORTANT: When NOT to use tool access for app development
106
+
107
+ When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for any of these operations:
108
+
109
+ - Creating databases -- declare them in `notis.config.ts` instead
110
+ - Loading or saving app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps deploy`
111
+ - Linting app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` which validates automatically
112
+ - Managing app routes -- write standard Vite + React pages in `app/`, not raw JS files
113
+
114
+ The only `npx --package @notis_ai/cli@latest -- notis tools exec` calls that are valid during app development are for testing the app's runtime behavior after deployment (e.g., querying a database to verify data was created).
115
+
116
+ ## Section 2: Accessing Tools Through the Notis CLI
117
+
118
+ Use this section when the current agent does not already have the right tool and needs to reach tools through Notis.
119
+
120
+ This is the main escape hatch for:
121
+
122
+ - direct MCP access
123
+ - Composio-backed integrations
124
+ - native Notis tools that are available through the generic CLI tool bridge
125
+ - any task where you need to discover the canonical tool name and schema before execution
126
+
127
+ ### Tool access workflow
128
+
129
+ 1. List available toolkit namespaces:
130
+ - `npx --package @notis_ai/cli@latest -- notis tools toolkits`
131
+ 2. Search for the capability you need using natural language:
132
+ - `npx --package @notis_ai/cli@latest -- notis tools search "<query>"`
133
+ - optionally narrow with `--toolkits <csv-or-json>`
134
+ 3. If needed, inspect the exact tool and parameter schema:
135
+ - `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name>`
136
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --get-schema`
137
+ 4. Validate arguments before execution when the tool is mutating or the schema is non-trivial:
138
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --dry-run --arguments '<json>'`
139
+ 5. Execute the tool:
140
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --arguments '<json>'`
141
+ 6. If multiple independent calls are needed, use:
142
+ - `npx --package @notis_ai/cli@latest -- notis tools exec-parallel '<json-array>'`
143
+ 7. If the toolkit is not connected yet, generate the connection URL:
144
+ - `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>`
145
+
146
+ ### Tool access rules
147
+
148
+ - Never guess tool names. Discover them with `npx --package @notis_ai/cli@latest -- notis tools search` first.
149
+ - Prefer first-class CLI commands when they exist, but use `npx --package @notis_ai/cli@latest -- notis tools ...` whenever the capability is not covered by a dedicated command.
150
+ - When you know the tool name but not the argument shape, use `npx --package @notis_ai/cli@latest -- notis tools describe` or `--get-schema` before execution.
151
+ - Use `--dry-run` before mutating calls when you want schema validation without execution.
152
+ - If a toolkit is missing, use `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>` to start the connection flow.
153
+
154
+ ### Toolkit mental model
155
+
156
+ Typical toolkit namespaces include:
157
+
158
+ - `notis-default` for native Notis tools
159
+ - `composio-*` for Composio-backed integrations
160
+ - `mcp-*` for MCP-backed tools
161
+
162
+ The pattern is:
163
+
164
+ 1. discover toolkits
165
+ 2. search tools
166
+ 3. inspect schema if needed
167
+ 4. execute the canonical tool
168
+
169
+ ### Tool access examples
170
+
171
+ Find a tool:
172
+
173
+ ```bash
174
+ npx --package @notis_ai/cli@latest -- notis tools toolkits
175
+ npx --package @notis_ai/cli@latest -- notis tools search "list today's calendar events"
176
+ ```
177
+
178
+ Inspect a tool before execution:
179
+
180
+ ```bash
181
+ npx --package @notis_ai/cli@latest -- notis tools describe composio-googlecalendar-default-list_events
182
+ npx --package @notis_ai/cli@latest -- notis tools exec composio-googlecalendar-default-list_events --get-schema
183
+ ```
184
+
185
+ Dry-run a tool call:
186
+
187
+ ```bash
188
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-query --dry-run --arguments '{"database_slug":"tasks","query":{"page_size":10}}'
189
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --dry-run --arguments '{"database_slug":"tasks"}'
190
+ ```
191
+
192
+ Execute a tool call:
193
+
194
+ ```bash
195
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-query --arguments '{"database_slug":"tasks","query":{"page_size":10}}'
196
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --arguments '{"database_slug":"tasks"}'
197
+ ```
198
+
199
+ Connect a missing toolkit:
200
+
201
+ ```bash
202
+ npx --package @notis_ai/cli@latest -- notis tools link github
203
+ ```
204
+
205
+ ## Native database access
206
+
207
+ Native Notis databases are accessed through the generic tool workflow, not a first-class database command group. Use these canonical tool names:
208
+
209
+ - `notis-default-list_databases` -- list databases accessible to the current profile
210
+ - `notis-default-get_database` -- inspect read-only metadata and schema detail
211
+ - `notis-default-query` -- query documents from a database
212
+ - `notis-default-upsert_database` -- create or update a database schema
213
+
214
+ Example workflow before building an app:
215
+
216
+ ```bash
217
+ npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
218
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-list_databases --arguments '{}'
219
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --get-schema
220
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --arguments '{"database_slug":"social_media_calendar"}'
221
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-query --arguments '{"database_slug":"social_media_calendar","query":{"page_size":1}}'
222
+ ```
223
+
224
+ ## Supporting commands
225
+
226
+ - `npx --package @notis_ai/cli@latest -- notis doctor` — verify CLI config, auth, and API reachability before relying on the CLI
227
+ - `npx --package @notis_ai/cli@latest -- notis describe <command...>` — get the exact command contract for first-class CLI commands
228
+
229
+ ## Summary
230
+
231
+ Use `notis-cli` for two things:
232
+
233
+ 1. local app development through `npx --package @notis_ai/cli@latest -- notis apps ...`
234
+ 2. tool discovery and execution through `npx --package @notis_ai/cli@latest -- notis tools ...`
235
+
236
+ Most importantly: if you do not currently have the tool you need, especially for direct MCP or integration work, use the Notis CLI instead of treating the task as blocked.
237
+
238
+ ## Troubleshooting
239
+
240
+ ### Deploy fails with "network_error" or "fetch failed"
241
+
242
+ The backend server at `http://localhost:3001` is not running. Solutions:
243
+
244
+ 1. Use `--direct` flag: `npx --package @notis_ai/cli@latest -- notis apps deploy --direct` uploads to Supabase storage directly
245
+ 2. Start the backend server: `cd server && python3 main.py`
246
+ 3. Check the API base: `npx --package @notis_ai/cli@latest -- notis doctor` shows the configured `api_base`
247
+
248
+ ### `npx --package @notis_ai/cli@latest -- notis doctor` shows health/tool_roundtrip errors
249
+
250
+ The CLI health check pings the backend server. If it's not running, these checks fail. App development commands that are `backend_call: local` (`init`, `build`, `verify`, `link`, `doctor`) work without the server. `dev`, `pull`, `create`, `list`, and normal `deploy` need the backend; `deploy --direct` can bypass it when Supabase credentials are available.
251
+
252
+ ### Stale bundle in the portal after deploy
253
+
254
+ The portal caches app bundles by version. If you re-deploy to the same version, the portal may serve the cached old bundle. Solutions:
255
+
256
+ 1. Hard refresh the portal page (Cmd+Shift+R)
257
+ 2. Open browser DevTools > Application > Storage > Clear site data
258
+ 3. The bundle cache key includes version number -- incrementing the version forces a fresh load
@@ -0,0 +1,40 @@
1
+ # Notis CLI — Database Tool Workflow
2
+
3
+ Use the generic `notis tools` workflow through NPX for native Notis Database operations from the terminal. The dedicated database command group has been removed.
4
+
5
+ ## Setup
6
+
7
+ Install and sign into Notis Desktop to keep the CLI profile current. Run the CLI through NPX, for example `npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"`.
8
+
9
+ For CI, hosted agents, or internal scripts, pass a non-persisted token with `NOTIS_JWT=<token>` and use `--api-base <server-url>` when targeting a non-default server.
10
+
11
+ ## Canonical database tools
12
+
13
+ - `notis-default-list_databases` — list native databases.
14
+ - `notis-default-get_database` — inspect one database schema.
15
+ - `notis-default-query` — query native database documents.
16
+ - `notis-default-upsert_database` — create or update database schema.
17
+
18
+ ## Workflow
19
+
20
+ ```bash
21
+ npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
22
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-list_databases --arguments '{}'
23
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --get-schema
24
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-get_database --arguments '{"database_slug":"tasks"}'
25
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-query --dry-run --arguments '{"database_slug":"tasks","query":{"page_size":10}}'
26
+ npx --package @notis_ai/cli@latest -- notis tools exec notis-default-query --arguments '{"database_slug":"tasks","query":{"page_size":10}}'
27
+ ```
28
+
29
+ ## Supporting command
30
+
31
+ ### `npx --package @notis_ai/cli@latest -- notis doctor`
32
+
33
+ Run a quick CLI health check for config, auth, and API reachability.
34
+
35
+ When to use: Use this before relying on the CLI in automation or after changing environments.
36
+
37
+ Examples:
38
+ - `npx --package @notis_ai/cli@latest -- notis doctor`
39
+ - `npx --package @notis_ai/cli@latest -- notis doctor --json`
40
+
package/src/cli.js CHANGED
@@ -112,7 +112,7 @@ export function createProgram() {
112
112
 
113
113
  program
114
114
  .name('notis')
115
- .description('Agent-first Notis CLI for apps, databases, and generic tool execution')
115
+ .description('Agent-first Notis CLI for apps and generic tool execution')
116
116
  .version(CLI_VERSION)
117
117
  .showHelpAfterError()
118
118
  .option('--json', 'Shortcut for --output json')