@notis_ai/cli 0.2.0-beta.21.1 → 0.2.0-beta.35.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.
- package/README.md +74 -112
- package/dist/scaffolds/notes/app/globals.css +3 -0
- package/dist/scaffolds/notes/app/layout.tsx +6 -0
- package/dist/scaffolds/notes/app/page.tsx +1465 -0
- package/dist/scaffolds/notes/components/ui/badge.tsx +28 -0
- package/dist/scaffolds/notes/components/ui/button.tsx +53 -0
- package/dist/scaffolds/notes/components/ui/card.tsx +56 -0
- package/dist/scaffolds/notes/components.json +20 -0
- package/dist/scaffolds/notes/lib/utils.ts +6 -0
- package/dist/scaffolds/notes/notis.config.ts +31 -0
- package/dist/scaffolds/notes/package.json +31 -0
- package/dist/scaffolds/notes/postcss.config.mjs +8 -0
- package/dist/scaffolds/notes/tailwind.config.ts +58 -0
- package/dist/scaffolds/notes/tsconfig.json +22 -0
- package/dist/scaffolds/notes/vite.config.ts +10 -0
- package/dist/scaffolds.json +13 -0
- package/package.json +8 -3
- package/skills/notis-apps/SKILL.md +168 -0
- package/skills/notis-apps/cli.md +208 -0
- package/skills/notis-cli/SKILL.md +263 -0
- package/skills/notis-query/cli.md +40 -0
- package/src/cli.js +1 -1
- package/src/command-specs/apps.js +962 -59
- package/src/command-specs/helpers.js +6 -41
- package/src/command-specs/index.js +1 -7
- package/src/command-specs/meta.js +7 -6
- package/src/command-specs/tools.js +29 -34
- package/src/runtime/agent-browser.js +192 -0
- package/src/runtime/app-boundary-validator.js +132 -0
- package/src/runtime/app-dev-server.js +605 -0
- package/src/runtime/app-dev-sessions.js +87 -0
- package/src/runtime/app-platform.js +725 -38
- package/src/runtime/cli-mode.generated.js +4 -0
- package/src/runtime/cli-mode.js +29 -0
- package/src/runtime/output.js +2 -2
- package/src/runtime/ports.js +15 -0
- package/src/runtime/profiles.js +36 -5
- package/src/runtime/transport.js +131 -6
- package/template/.harness/index.html.tmpl +211 -0
- package/template/app/layout.tsx +1 -2
- package/template/app/page.tsx +41 -6
- package/template/metadata/cover.png +0 -0
- package/template/metadata/screenshot-1.png +0 -0
- package/template/metadata/screenshot-2.png +0 -0
- package/template/metadata/screenshot-3.png +0 -0
- package/template/notis.config.ts +25 -6
- package/template/package.json +3 -4
- package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +273 -0
- package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +91 -0
- package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
- package/template/packages/{notis-sdk → sdk}/src/config.ts +25 -2
- package/template/packages/sdk/src/hooks/useMultiSelect.ts +503 -0
- package/template/packages/{notis-sdk → sdk}/src/hooks/useNotis.ts +6 -7
- package/template/packages/{notis-sdk → sdk}/src/hooks/useNotisNavigation.ts +4 -4
- package/template/packages/{notis-sdk → sdk}/src/hooks/useTool.ts +22 -7
- package/template/packages/sdk/src/hooks/useTopBarSearch.ts +73 -0
- package/template/packages/sdk/src/index.ts +46 -0
- package/template/packages/sdk/src/provider.tsx +43 -0
- package/template/packages/sdk/src/runtime.ts +80 -0
- package/template/packages/sdk/src/styles.css +38 -0
- package/src/command-specs/auth.js +0 -178
- package/src/command-specs/db.js +0 -163
- package/src/runtime/app-preview-server.js +0 -336
- package/template/packages/notis-sdk/src/helpers.ts +0 -131
- package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
- package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
- package/template/packages/notis-sdk/src/hooks/useDatabase.ts +0 -87
- package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
- package/template/packages/notis-sdk/src/hooks/useUpsertDocument.ts +0 -58
- package/template/packages/notis-sdk/src/index.ts +0 -47
- package/template/packages/notis-sdk/src/provider.tsx +0 -44
- package/template/packages/notis-sdk/src/runtime.ts +0 -165
- package/template/packages/notis-sdk/src/styles.css +0 -123
- /package/template/packages/{notis-sdk → sdk}/package.json +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/hooks/useBackend.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/hooks/useTools.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/ui.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/vite.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/tsconfig.json +0 -0
package/README.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# @notis_ai/cli
|
|
2
2
|
|
|
3
|
-
Agent-first Notis CLI for apps
|
|
3
|
+
Agent-first Notis CLI for apps and generic tool execution.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
The Notis CLI is bundled automatically with the Notis desktop app.
|
|
7
|
+
The Notis CLI is bundled automatically with the Notis desktop app. Install and sign into Notis Desktop to install the `notis` command, write the local CLI config, and keep the bundled CLI, `notis-cli`, and `notis-apps` skills updated.
|
|
8
|
+
|
|
9
|
+
For CI, hosted agents, or internal scripts, pass a non-persisted token with `NOTIS_JWT=<token>`.
|
|
8
10
|
|
|
9
11
|
## Quick Start
|
|
10
12
|
|
|
11
13
|
```bash
|
|
12
14
|
notis --help
|
|
13
|
-
notis
|
|
15
|
+
notis doctor
|
|
14
16
|
notis apps list
|
|
15
|
-
notis
|
|
17
|
+
notis tools search "list Notis databases"
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
The desktop app owns sign-in and keeps the CLI profile in sync automatically.
|
|
19
21
|
|
|
20
22
|
The CLI defaults to `json` output in agent or non-TTY contexts and `table` output in interactive terminals.
|
|
21
23
|
|
|
@@ -29,45 +31,6 @@ The CLI defaults to `json` output in agent or non-TTY contexts and `table` outpu
|
|
|
29
31
|
- `--timeout-ms <n>` — HTTP timeout in milliseconds
|
|
30
32
|
- `--idempotency-key <key>` — Override the generated idempotency key for mutating commands
|
|
31
33
|
|
|
32
|
-
## Auth
|
|
33
|
-
|
|
34
|
-
### `notis auth login`
|
|
35
|
-
|
|
36
|
-
Store credentials for a named CLI profile.
|
|
37
|
-
|
|
38
|
-
When to use: Use this before authenticated commands, especially in fresh environments or CI profiles.
|
|
39
|
-
|
|
40
|
-
Options:
|
|
41
|
-
- `--jwt <token>` — JWT token to store for the profile.
|
|
42
|
-
|
|
43
|
-
Examples:
|
|
44
|
-
- `notis auth login --jwt <token>`
|
|
45
|
-
- `notis auth login --profile staging --api-base http://localhost:3001`
|
|
46
|
-
|
|
47
|
-
### `notis auth logout`
|
|
48
|
-
|
|
49
|
-
Remove the stored JWT for the active profile.
|
|
50
|
-
|
|
51
|
-
When to use: Use this to clear local credentials without touching other profiles.
|
|
52
|
-
|
|
53
|
-
Examples:
|
|
54
|
-
- `notis auth logout`
|
|
55
|
-
- `notis auth logout --profile staging`
|
|
56
|
-
|
|
57
|
-
### `notis auth status`
|
|
58
|
-
|
|
59
|
-
Inspect local auth configuration and optionally verify it against the API.
|
|
60
|
-
|
|
61
|
-
When to use: Use this before automating commands to confirm the active profile and token health.
|
|
62
|
-
|
|
63
|
-
Options:
|
|
64
|
-
- `--verify` — Perform a live authenticated roundtrip to the API.
|
|
65
|
-
|
|
66
|
-
Examples:
|
|
67
|
-
- `notis auth status`
|
|
68
|
-
- `notis auth status --verify --json`
|
|
69
|
-
|
|
70
|
-
|
|
71
34
|
## Apps
|
|
72
35
|
|
|
73
36
|
### `notis apps list`
|
|
@@ -84,58 +47,81 @@ Examples:
|
|
|
84
47
|
|
|
85
48
|
Scaffold a new Notis app project.
|
|
86
49
|
|
|
87
|
-
When to use: Start a new Notis app.
|
|
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`.
|
|
88
54
|
|
|
89
55
|
Examples:
|
|
56
|
+
- `notis apps scaffolds list`
|
|
90
57
|
- `notis apps init "Mind the Flo"`
|
|
58
|
+
- `notis apps init "My CRM" --from notis-database`
|
|
91
59
|
- `notis apps init "My App" ./my-app`
|
|
92
60
|
|
|
61
|
+
### `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
|
+
- `notis apps scaffolds list`
|
|
69
|
+
- `notis apps init "My App" --from notis-database`
|
|
70
|
+
|
|
93
71
|
### `notis apps create <name> [dir]`
|
|
94
72
|
|
|
95
73
|
Create a new remote Notis app and optionally link a local project to it.
|
|
96
74
|
|
|
97
75
|
When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
|
|
98
76
|
|
|
99
|
-
Options:
|
|
100
|
-
- `--description <text>` — Optional app description.
|
|
101
|
-
- `--icon <lucide:icon>` — Optional Lucide icon, for example lucide:dices.
|
|
102
|
-
|
|
103
77
|
Examples:
|
|
104
78
|
- `notis apps create "My App"`
|
|
105
|
-
- `notis apps create "My App"
|
|
79
|
+
- `notis apps create "My App" .`
|
|
106
80
|
|
|
107
81
|
### `notis apps dev [dir]`
|
|
108
82
|
|
|
109
|
-
|
|
83
|
+
Develop Notis apps inside the Electron desktop Portal with automatic local bundle reloads.
|
|
110
84
|
|
|
111
|
-
When to use:
|
|
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.
|
|
112
90
|
|
|
113
91
|
Examples:
|
|
114
92
|
- `notis apps dev`
|
|
115
93
|
- `notis apps dev ./my-app`
|
|
94
|
+
- `notis apps dev ./workspace --port 5200`
|
|
116
95
|
|
|
117
96
|
### `notis apps build [dir]`
|
|
118
97
|
|
|
119
98
|
Build and package the app into .notis/output/.
|
|
120
99
|
|
|
121
|
-
When to use: Prepare the app for
|
|
100
|
+
When to use: Prepare the app for verification or deployment.
|
|
122
101
|
|
|
123
102
|
Examples:
|
|
124
103
|
- `notis apps build`
|
|
125
104
|
- `notis apps build ./my-app`
|
|
126
105
|
|
|
127
|
-
### `notis apps
|
|
106
|
+
### `notis apps verify [dir]`
|
|
128
107
|
|
|
129
|
-
|
|
108
|
+
Headless render smoke each route in a stub-runtime harness.
|
|
130
109
|
|
|
131
|
-
When to use:
|
|
110
|
+
When to use: After notis apps build, before deploy. Catches render-time crashes and missing runtime calls that the build step cannot detect.
|
|
132
111
|
|
|
133
112
|
Options:
|
|
134
|
-
- `--
|
|
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).
|
|
135
119
|
|
|
136
120
|
Examples:
|
|
137
|
-
- `notis apps
|
|
138
|
-
- `notis apps
|
|
121
|
+
- `notis apps verify`
|
|
122
|
+
- `notis apps verify --routes notes`
|
|
123
|
+
- `notis apps verify --mode live`
|
|
124
|
+
- `notis apps verify --no-browser # start the harness, drive agent-browser yourself`
|
|
139
125
|
|
|
140
126
|
### `notis apps link <app-id> [dir]`
|
|
141
127
|
|
|
@@ -147,6 +133,20 @@ Examples:
|
|
|
147
133
|
- `notis apps link abc123`
|
|
148
134
|
- `notis apps link abc123 ./my-app`
|
|
149
135
|
|
|
136
|
+
### `notis apps pull <app-id> [dir]`
|
|
137
|
+
|
|
138
|
+
Download a Notis app source snapshot into a local project folder.
|
|
139
|
+
|
|
140
|
+
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.
|
|
141
|
+
|
|
142
|
+
Options:
|
|
143
|
+
- `--force` — Overwrite a non-empty target directory.
|
|
144
|
+
- `--version <n>` — Pull a specific app source version (default: latest).
|
|
145
|
+
|
|
146
|
+
Examples:
|
|
147
|
+
- `notis apps pull abc123`
|
|
148
|
+
- `notis apps pull abc123 ./my-app --force`
|
|
149
|
+
|
|
150
150
|
### `notis apps deploy [dir]`
|
|
151
151
|
|
|
152
152
|
Build and upload the app to the linked Notis app.
|
|
@@ -175,54 +175,6 @@ Examples:
|
|
|
175
175
|
- `notis apps doctor ./my-app`
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
## Databases
|
|
179
|
-
|
|
180
|
-
### `notis db list`
|
|
181
|
-
|
|
182
|
-
List native Notis databases.
|
|
183
|
-
|
|
184
|
-
When to use: Use this to find database ids and slugs before querying or updating schemas.
|
|
185
|
-
|
|
186
|
-
Examples:
|
|
187
|
-
- `notis db list`
|
|
188
|
-
- `notis db list --json`
|
|
189
|
-
|
|
190
|
-
### `notis db upsert`
|
|
191
|
-
|
|
192
|
-
Create or update a native database schema.
|
|
193
|
-
|
|
194
|
-
When to use: Use this when you need to provision a new database or adjust an existing schema.
|
|
195
|
-
|
|
196
|
-
Options:
|
|
197
|
-
- `--operation <create|update>` — Create a new database or update an existing one.
|
|
198
|
-
- `--database-id <id>` — Database id for update operations.
|
|
199
|
-
- `--title <text>` — Database title.
|
|
200
|
-
- `--description <text>` — Database description.
|
|
201
|
-
- `--icon <lucide-icon-name>` — Database icon (Lucide icon name, e.g. database).
|
|
202
|
-
- `--properties <json>` — JSON array of property definitions.
|
|
203
|
-
|
|
204
|
-
Examples:
|
|
205
|
-
- `notis db upsert --operation create --title "Tasks"`
|
|
206
|
-
- `notis db upsert --operation update --database-id db_123 --title "Tasks V2"`
|
|
207
|
-
|
|
208
|
-
### `notis db query <database-slug>`
|
|
209
|
-
|
|
210
|
-
Run a structured query against a native Notis database.
|
|
211
|
-
|
|
212
|
-
When to use: Use this when the database slug is known and you need direct filters, sorts, or pagination.
|
|
213
|
-
|
|
214
|
-
Options:
|
|
215
|
-
- `--filter <json>` — Structured query filter JSON.
|
|
216
|
-
- `--sort <json>` — Sort JSON object or array.
|
|
217
|
-
- `--page-size <n>` — Page size between 1 and 100.
|
|
218
|
-
- `--offset <n>` — Zero-based offset.
|
|
219
|
-
- `--cursor <value>` — Pagination cursor alias for next_offset.
|
|
220
|
-
|
|
221
|
-
Examples:
|
|
222
|
-
- `notis db query tasks --page-size 50`
|
|
223
|
-
- `notis db query tasks --filter '{"property":"Status"}'`
|
|
224
|
-
|
|
225
|
-
|
|
226
178
|
## Generic Tools
|
|
227
179
|
|
|
228
180
|
### `notis tools toolkits`
|
|
@@ -271,15 +223,15 @@ Options:
|
|
|
271
223
|
- `--arguments <json>` — JSON object, @file path, or - for stdin.
|
|
272
224
|
- `--get-schema` — Display the tool parameter schema without executing.
|
|
273
225
|
- `--dry-run` — Validate arguments against the tool schema without executing.
|
|
274
|
-
- `--
|
|
226
|
+
- `--toolkits <csv-or-json>` — Optional toolkit namespace(s) to use when resolving the tool.
|
|
275
227
|
|
|
276
228
|
Examples:
|
|
277
229
|
- `notis tools exec notis-default-query --arguments '{"database_slug":"tasks","query":{}}'`
|
|
230
|
+
- `notis tools exec notis-default-get_database --arguments '{"database_slug":"tasks"}'`
|
|
278
231
|
- `notis tools exec notis-default-query --get-schema`
|
|
279
232
|
- `notis tools exec notis-default-query --dry-run --arguments '{"database_slug":"tasks","query":{}}'`
|
|
280
233
|
- `notis tools exec notis-default-query --arguments @query.json`
|
|
281
234
|
- `notis tools exec notis-default-query --arguments - < query.json`
|
|
282
|
-
- `notis tools exec notis-default-query --watch 10 --arguments '{"database_slug":"tasks","query":{}}'`
|
|
283
235
|
|
|
284
236
|
### `notis tools exec-parallel <calls>`
|
|
285
237
|
|
|
@@ -313,6 +265,16 @@ Examples:
|
|
|
313
265
|
- `notis doctor`
|
|
314
266
|
- `notis doctor --json`
|
|
315
267
|
|
|
268
|
+
### `notis whoami`
|
|
269
|
+
|
|
270
|
+
Display the active profile, user, and available toolkits.
|
|
271
|
+
|
|
272
|
+
When to use: Use this to quickly confirm which account and environment a command will target.
|
|
273
|
+
|
|
274
|
+
Examples:
|
|
275
|
+
- `notis whoami`
|
|
276
|
+
- `notis whoami --json`
|
|
277
|
+
|
|
316
278
|
### `notis describe <command...>`
|
|
317
279
|
|
|
318
280
|
Describe a first-class CLI command in detail.
|
|
@@ -320,14 +282,14 @@ Describe a first-class CLI command in detail.
|
|
|
320
282
|
When to use: Use this when an agent or human needs the exact shape, examples, and semantics of a command.
|
|
321
283
|
|
|
322
284
|
Examples:
|
|
323
|
-
- `notis describe apps
|
|
324
|
-
- `notis describe
|
|
285
|
+
- `notis describe apps deploy`
|
|
286
|
+
- `notis describe tools exec`
|
|
325
287
|
|
|
326
288
|
|
|
327
289
|
## Local Development
|
|
328
290
|
|
|
329
291
|
```bash
|
|
330
|
-
cd cli
|
|
292
|
+
cd packages/cli
|
|
331
293
|
npm install
|
|
332
294
|
node ./bin/notis.js --help
|
|
333
295
|
npm run docs:generate
|