@insforge/cli 0.1.41 → 0.1.43

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 CHANGED
@@ -4,45 +4,39 @@ Command line tool for the [InsForge](https://insforge.dev) platform. Manage your
4
4
 
5
5
  Designed to be both human-friendly (interactive prompts, formatted tables) and agent-friendly (structured JSON output, non-interactive mode, semantic exit codes).
6
6
 
7
- ## Installation
8
-
9
- ```bash
10
- npm install -g @insforge/cli
11
- ```
12
-
13
- Requires Node.js >= 18.
7
+ Requires Node.js >= 18. We recommend running via `npx` so you always get the latest version — no global install needed.
14
8
 
15
9
  ## Quick Start
16
10
 
17
11
  ```bash
18
12
  # Login via browser (OAuth)
19
- insforge login
13
+ npx @insforge/cli login
20
14
 
21
15
  # Or login with email/password
22
- insforge login --email
16
+ npx @insforge/cli login --email
23
17
 
24
18
  # Check current user
25
- insforge whoami
19
+ npx @insforge/cli whoami
26
20
 
27
21
  # List all organizations and projects
28
- insforge list
22
+ npx @insforge/cli list
29
23
 
30
24
  # Link current directory to a project
31
- insforge link
25
+ npx @insforge/cli link
32
26
 
33
27
  # Query the database
34
- insforge db tables
35
- insforge db query "SELECT * FROM users LIMIT 10"
28
+ npx @insforge/cli db tables
29
+ npx @insforge/cli db query "SELECT * FROM users LIMIT 10"
36
30
  ```
37
31
 
38
32
  ## Authentication
39
33
 
40
- If you run any command without being logged in, the CLI will automatically open your browser and start the login flow — no need to run `insforge login` first.
34
+ If you run any command without being logged in, the CLI will automatically open your browser and start the login flow — no need to run `npx @insforge/cli login` first.
41
35
 
42
36
  ### Browser Login (default)
43
37
 
44
38
  ```bash
45
- insforge login
39
+ npx @insforge/cli login
46
40
  ```
47
41
 
48
42
  Opens your browser to the InsForge authorization page using OAuth 2.0 Authorization Code + PKCE. A local callback server receives the authorization code and exchanges it for tokens. Credentials are stored in `~/.insforge/credentials.json`.
@@ -50,19 +44,19 @@ Opens your browser to the InsForge authorization page using OAuth 2.0 Authorizat
50
44
  ### Email/Password Login
51
45
 
52
46
  ```bash
53
- insforge login --email
47
+ npx @insforge/cli login --email
54
48
  ```
55
49
 
56
50
  Prompts for email and password interactively, or reads from environment variables in non-interactive mode:
57
51
 
58
52
  ```bash
59
- INSFORGE_EMAIL=user@example.com INSFORGE_PASSWORD=secret insforge login --email --json
53
+ INSFORGE_EMAIL=user@example.com INSFORGE_PASSWORD=secret npx @insforge/cli login --email --json
60
54
  ```
61
55
 
62
56
  ### Logout
63
57
 
64
58
  ```bash
65
- insforge logout
59
+ npx @insforge/cli logout
66
60
  ```
67
61
 
68
62
  ## Global Options
@@ -80,69 +74,76 @@ All commands support the following flags:
80
74
 
81
75
  ### Top-Level
82
76
 
83
- #### `insforge whoami`
77
+ #### `npx @insforge/cli whoami`
84
78
 
85
79
  Show the current authenticated user.
86
80
 
87
81
  ```bash
88
- insforge whoami
89
- insforge whoami --json
82
+ npx @insforge/cli whoami
83
+ npx @insforge/cli whoami --json
90
84
  ```
91
85
 
92
- #### `insforge list`
86
+ #### `npx @insforge/cli list`
93
87
 
94
88
  List all organizations and their projects in a grouped table.
95
89
 
96
90
  ```bash
97
- insforge list
98
- insforge list --json
91
+ npx @insforge/cli list
92
+ npx @insforge/cli list --json
99
93
  ```
100
94
 
101
- #### `insforge create`
95
+ #### `npx @insforge/cli create`
102
96
 
103
97
  Create a new InsForge project interactively.
104
98
 
105
99
  ```bash
106
- insforge create
107
- insforge create --name "my-app" --org-id <org-id> --region us-east
100
+ npx @insforge/cli create
101
+ npx @insforge/cli create --name "my-app" --org-id <org-id> --region us-east
108
102
  ```
109
103
 
110
- #### `insforge link`
104
+ #### `npx @insforge/cli link`
111
105
 
112
106
  Link the current directory to an InsForge project. Creates `.insforge/project.json` with the project ID, API key, and OSS host URL.
113
107
 
114
108
  ```bash
115
109
  # Interactive: select from a list
116
- insforge link
110
+ npx @insforge/cli link
117
111
 
118
- # Non-interactive
119
- insforge link --project-id <id> --org-id <org-id>
112
+ # Non-interactive (platform login)
113
+ npx @insforge/cli link --project-id <id> --org-id <org-id>
114
+
115
+ # OSS / self-hosted: link via host URL + API key (no platform login required)
116
+ npx @insforge/cli link \
117
+ --api-base-url https://<app-key>.<region>.insforge.app \
118
+ --api-key <your-project-api-key>
120
119
  ```
121
120
 
122
- #### `insforge current`
121
+ For OSS or self-hosted deployments, you can link directly using the host URL and API key — the CLI skips the platform OAuth flow and writes the credentials straight into `.insforge/project.json`. The host URL format is `https://{app_key}.{region}.insforge.app` (e.g. `https://uhzx8md3.us-east.insforge.app`).
122
+
123
+ #### `npx @insforge/cli current`
123
124
 
124
125
  Show current CLI context (authenticated user, linked project).
125
126
 
126
127
  ```bash
127
- insforge current
128
- insforge current --json
128
+ npx @insforge/cli current
129
+ npx @insforge/cli current --json
129
130
  ```
130
131
 
131
- #### `insforge metadata`
132
+ #### `npx @insforge/cli metadata`
132
133
 
133
134
  Show backend metadata including auth configuration, database tables, storage buckets, edge functions, AI models, and realtime channels.
134
135
 
135
136
  ```bash
136
- insforge metadata
137
- insforge metadata --json
137
+ npx @insforge/cli metadata
138
+ npx @insforge/cli metadata --json
138
139
  ```
139
140
 
140
- #### `insforge logs`
141
+ #### `npx @insforge/cli logs`
141
142
 
142
143
  Fetch backend container logs.
143
144
 
144
145
  ```bash
145
- insforge logs <source> [options]
146
+ npx @insforge/cli logs <source> [options]
146
147
  ```
147
148
 
148
149
  **Sources:** `insforge.logs`, `postgREST.logs`, `postgres.logs`, `function.logs`
@@ -152,17 +153,17 @@ insforge logs <source> [options]
152
153
 
153
154
  **Examples:**
154
155
  ```bash
155
- insforge logs insforge.logs
156
- insforge logs postgres.logs --limit 50
157
- insforge logs function.logs --json
156
+ npx @insforge/cli logs insforge.logs
157
+ npx @insforge/cli logs postgres.logs --limit 50
158
+ npx @insforge/cli logs function.logs --json
158
159
  ```
159
160
 
160
- #### `insforge docs`
161
+ #### `npx @insforge/cli docs`
161
162
 
162
163
  Browse InsForge SDK documentation.
163
164
 
164
165
  ```bash
165
- insforge docs [feature] [language]
166
+ npx @insforge/cli docs [feature] [language]
166
167
  ```
167
168
 
168
169
  **Features:** `db`, `storage`, `functions`, `auth`, `ai`, `realtime`, `instructions`
@@ -171,359 +172,359 @@ insforge docs [feature] [language]
171
172
  **Examples:**
172
173
  ```bash
173
174
  # List all available docs
174
- insforge docs
175
+ npx @insforge/cli docs
175
176
 
176
177
  # Specific feature/language docs
177
- insforge docs instructions # Show backend setup instructions
178
- insforge docs db typescript # Show TypeScript database SDK docs
179
- insforge docs auth swift # Show Swift auth SDK docs
180
- insforge docs storage rest-api # Show REST API storage docs
178
+ npx @insforge/cli docs instructions # Show backend setup instructions
179
+ npx @insforge/cli docs db typescript # Show TypeScript database SDK docs
180
+ npx @insforge/cli docs auth swift # Show Swift auth SDK docs
181
+ npx @insforge/cli docs storage rest-api # Show REST API storage docs
181
182
  ```
182
183
 
183
184
  ---
184
185
 
185
- ### Database — `insforge db`
186
+ ### Database — `npx @insforge/cli db`
186
187
 
187
- #### `insforge db query <sql>`
188
+ #### `npx @insforge/cli db query <sql>`
188
189
 
189
190
  Execute a raw SQL query.
190
191
 
191
192
  ```bash
192
- insforge db query "SELECT * FROM users LIMIT 10"
193
- insforge db query "SELECT count(*) FROM orders" --json
194
- insforge db query "SELECT * FROM pg_tables" --unrestricted
193
+ npx @insforge/cli db query "SELECT * FROM users LIMIT 10"
194
+ npx @insforge/cli db query "SELECT count(*) FROM orders" --json
195
+ npx @insforge/cli db query "SELECT * FROM pg_tables" --unrestricted
195
196
  ```
196
197
 
197
- #### `insforge db tables`
198
+ #### `npx @insforge/cli db tables`
198
199
 
199
200
  List all database tables.
200
201
 
201
202
  ```bash
202
- insforge db tables
203
- insforge db tables --json
203
+ npx @insforge/cli db tables
204
+ npx @insforge/cli db tables --json
204
205
  ```
205
206
 
206
- #### `insforge db functions`
207
+ #### `npx @insforge/cli db functions`
207
208
 
208
209
  List all database functions.
209
210
 
210
211
  ```bash
211
- insforge db functions
212
+ npx @insforge/cli db functions
212
213
  ```
213
214
 
214
- #### `insforge db indexes`
215
+ #### `npx @insforge/cli db indexes`
215
216
 
216
217
  List all database indexes.
217
218
 
218
219
  ```bash
219
- insforge db indexes
220
+ npx @insforge/cli db indexes
220
221
  ```
221
222
 
222
- #### `insforge db policies`
223
+ #### `npx @insforge/cli db policies`
223
224
 
224
225
  List all RLS policies.
225
226
 
226
227
  ```bash
227
- insforge db policies
228
+ npx @insforge/cli db policies
228
229
  ```
229
230
 
230
- #### `insforge db triggers`
231
+ #### `npx @insforge/cli db triggers`
231
232
 
232
233
  List all database triggers.
233
234
 
234
235
  ```bash
235
- insforge db triggers
236
+ npx @insforge/cli db triggers
236
237
  ```
237
238
 
238
- #### `insforge db rpc <functionName>`
239
+ #### `npx @insforge/cli db rpc <functionName>`
239
240
 
240
241
  Call a database function via RPC.
241
242
 
242
243
  ```bash
243
- insforge db rpc my_function --data '{"param1": "value"}'
244
+ npx @insforge/cli db rpc my_function --data '{"param1": "value"}'
244
245
  ```
245
246
 
246
- #### `insforge db export`
247
+ #### `npx @insforge/cli db export`
247
248
 
248
249
  Export database schema and/or data.
249
250
 
250
251
  ```bash
251
- insforge db export --output schema.sql
252
- insforge db export --data-only --output data.sql
252
+ npx @insforge/cli db export --output schema.sql
253
+ npx @insforge/cli db export --data-only --output data.sql
253
254
  ```
254
255
 
255
- #### `insforge db import <file>`
256
+ #### `npx @insforge/cli db import <file>`
256
257
 
257
258
  Import database from a local SQL file.
258
259
 
259
260
  ```bash
260
- insforge db import schema.sql
261
+ npx @insforge/cli db import schema.sql
261
262
  ```
262
263
 
263
264
  ---
264
265
 
265
- ### Functions — `insforge functions`
266
+ ### Functions — `npx @insforge/cli functions`
266
267
 
267
- #### `insforge functions list`
268
+ #### `npx @insforge/cli functions list`
268
269
 
269
270
  List all edge functions.
270
271
 
271
272
  ```bash
272
- insforge functions list
273
- insforge functions list --json
273
+ npx @insforge/cli functions list
274
+ npx @insforge/cli functions list --json
274
275
  ```
275
276
 
276
- #### `insforge functions code <slug>`
277
+ #### `npx @insforge/cli functions code <slug>`
277
278
 
278
279
  View the source code of an edge function.
279
280
 
280
281
  ```bash
281
- insforge functions code my-function
282
- insforge functions code my-function --json
282
+ npx @insforge/cli functions code my-function
283
+ npx @insforge/cli functions code my-function --json
283
284
  ```
284
285
 
285
- #### `insforge functions deploy <slug>`
286
+ #### `npx @insforge/cli functions deploy <slug>`
286
287
 
287
288
  Deploy an edge function. Creates the function if it doesn't exist, or updates it.
288
289
 
289
290
  ```bash
290
- insforge functions deploy my-function --file ./handler.ts
291
- insforge functions deploy my-function --file ./handler.ts --name "My Function" --description "Does something"
291
+ npx @insforge/cli functions deploy my-function --file ./handler.ts
292
+ npx @insforge/cli functions deploy my-function --file ./handler.ts --name "My Function" --description "Does something"
292
293
  ```
293
294
 
294
- #### `insforge functions invoke <slug>`
295
+ #### `npx @insforge/cli functions invoke <slug>`
295
296
 
296
297
  Invoke an edge function.
297
298
 
298
299
  ```bash
299
- insforge functions invoke my-function --data '{"key": "value"}'
300
- insforge functions invoke my-function --method GET
301
- insforge functions invoke my-function --data '{"key": "value"}' --json
300
+ npx @insforge/cli functions invoke my-function --data '{"key": "value"}'
301
+ npx @insforge/cli functions invoke my-function --method GET
302
+ npx @insforge/cli functions invoke my-function --data '{"key": "value"}' --json
302
303
  ```
303
304
 
304
- #### `insforge functions delete <slug>`
305
+ #### `npx @insforge/cli functions delete <slug>`
305
306
 
306
307
  Delete an edge function.
307
308
 
308
309
  ```bash
309
- insforge functions delete my-function
310
- insforge functions delete my-function -y # skip confirmation
310
+ npx @insforge/cli functions delete my-function
311
+ npx @insforge/cli functions delete my-function -y # skip confirmation
311
312
  ```
312
313
 
313
314
  ---
314
315
 
315
- ### Storage — `insforge storage`
316
+ ### Storage — `npx @insforge/cli storage`
316
317
 
317
- #### `insforge storage buckets`
318
+ #### `npx @insforge/cli storage buckets`
318
319
 
319
320
  List all storage buckets.
320
321
 
321
322
  ```bash
322
- insforge storage buckets
323
- insforge storage buckets --json
323
+ npx @insforge/cli storage buckets
324
+ npx @insforge/cli storage buckets --json
324
325
  ```
325
326
 
326
- #### `insforge storage create-bucket <name>`
327
+ #### `npx @insforge/cli storage create-bucket <name>`
327
328
 
328
329
  Create a new storage bucket.
329
330
 
330
331
  ```bash
331
- insforge storage create-bucket images
332
- insforge storage create-bucket private-docs --private
332
+ npx @insforge/cli storage create-bucket images
333
+ npx @insforge/cli storage create-bucket private-docs --private
333
334
  ```
334
335
 
335
- #### `insforge storage delete-bucket <name>`
336
+ #### `npx @insforge/cli storage delete-bucket <name>`
336
337
 
337
338
  Delete a storage bucket and all its objects.
338
339
 
339
340
  ```bash
340
- insforge storage delete-bucket images
341
- insforge storage delete-bucket images -y # skip confirmation
341
+ npx @insforge/cli storage delete-bucket images
342
+ npx @insforge/cli storage delete-bucket images -y # skip confirmation
342
343
  ```
343
344
 
344
- #### `insforge storage list-objects <bucket>`
345
+ #### `npx @insforge/cli storage list-objects <bucket>`
345
346
 
346
347
  List objects in a storage bucket.
347
348
 
348
349
  ```bash
349
- insforge storage list-objects images
350
- insforge storage list-objects images --prefix "avatars/" --limit 50
350
+ npx @insforge/cli storage list-objects images
351
+ npx @insforge/cli storage list-objects images --prefix "avatars/" --limit 50
351
352
  ```
352
353
 
353
- #### `insforge storage upload <file>`
354
+ #### `npx @insforge/cli storage upload <file>`
354
355
 
355
356
  Upload a file to a storage bucket.
356
357
 
357
358
  ```bash
358
- insforge storage upload ./photo.png --bucket images
359
- insforge storage upload ./photo.png --bucket images --key "avatars/user-123.png"
359
+ npx @insforge/cli storage upload ./photo.png --bucket images
360
+ npx @insforge/cli storage upload ./photo.png --bucket images --key "avatars/user-123.png"
360
361
  ```
361
362
 
362
- #### `insforge storage download <objectKey>`
363
+ #### `npx @insforge/cli storage download <objectKey>`
363
364
 
364
365
  Download a file from a storage bucket.
365
366
 
366
367
  ```bash
367
- insforge storage download avatars/user-123.png --bucket images
368
- insforge storage download avatars/user-123.png --bucket images --output ./downloaded.png
368
+ npx @insforge/cli storage download avatars/user-123.png --bucket images
369
+ npx @insforge/cli storage download avatars/user-123.png --bucket images --output ./downloaded.png
369
370
  ```
370
371
 
371
372
  ---
372
373
 
373
- ### Deployments — `insforge deployments`
374
+ ### Deployments — `npx @insforge/cli deployments`
374
375
 
375
- #### `insforge deployments deploy [directory]`
376
+ #### `npx @insforge/cli deployments deploy [directory]`
376
377
 
377
378
  Deploy a frontend project. Zips the source, uploads it, and polls for build completion (up to 2 minutes).
378
379
 
379
380
  ```bash
380
- insforge deployments deploy
381
- insforge deployments deploy ./my-app
382
- insforge deployments deploy --env '{"API_URL": "https://api.example.com"}'
381
+ npx @insforge/cli deployments deploy
382
+ npx @insforge/cli deployments deploy ./my-app
383
+ npx @insforge/cli deployments deploy --env '{"API_URL": "https://api.example.com"}'
383
384
  ```
384
385
 
385
- #### `insforge deployments list`
386
+ #### `npx @insforge/cli deployments list`
386
387
 
387
388
  List all deployments.
388
389
 
389
390
  ```bash
390
- insforge deployments list
391
- insforge deployments list --limit 5 --json
391
+ npx @insforge/cli deployments list
392
+ npx @insforge/cli deployments list --limit 5 --json
392
393
  ```
393
394
 
394
- #### `insforge deployments status <id>`
395
+ #### `npx @insforge/cli deployments status <id>`
395
396
 
396
397
  Get deployment details and status.
397
398
 
398
399
  ```bash
399
- insforge deployments status abc-123
400
- insforge deployments status abc-123 --sync # sync status from Vercel first
400
+ npx @insforge/cli deployments status abc-123
401
+ npx @insforge/cli deployments status abc-123 --sync # sync status from Vercel first
401
402
  ```
402
403
 
403
- #### `insforge deployments cancel <id>`
404
+ #### `npx @insforge/cli deployments cancel <id>`
404
405
 
405
406
  Cancel a running deployment.
406
407
 
407
408
  ```bash
408
- insforge deployments cancel abc-123
409
+ npx @insforge/cli deployments cancel abc-123
409
410
  ```
410
411
 
411
412
  ---
412
413
 
413
- ### Secrets — `insforge secrets`
414
+ ### Secrets — `npx @insforge/cli secrets`
414
415
 
415
- #### `insforge secrets list`
416
+ #### `npx @insforge/cli secrets list`
416
417
 
417
418
  List all secrets (metadata only, values are hidden). Inactive (deleted) secrets are hidden by default.
418
419
 
419
420
  ```bash
420
- insforge secrets list
421
- insforge secrets list --all # include inactive secrets
422
- insforge secrets list --json
421
+ npx @insforge/cli secrets list
422
+ npx @insforge/cli secrets list --all # include inactive secrets
423
+ npx @insforge/cli secrets list --json
423
424
  ```
424
425
 
425
- #### `insforge secrets get <key>`
426
+ #### `npx @insforge/cli secrets get <key>`
426
427
 
427
428
  Get the decrypted value of a secret.
428
429
 
429
430
  ```bash
430
- insforge secrets get STRIPE_API_KEY
431
- insforge secrets get STRIPE_API_KEY --json
431
+ npx @insforge/cli secrets get STRIPE_API_KEY
432
+ npx @insforge/cli secrets get STRIPE_API_KEY --json
432
433
  ```
433
434
 
434
- #### `insforge secrets add <key> <value>`
435
+ #### `npx @insforge/cli secrets add <key> <value>`
435
436
 
436
437
  Create a new secret.
437
438
 
438
439
  ```bash
439
- insforge secrets add STRIPE_API_KEY sk_live_xxx
440
- insforge secrets add STRIPE_API_KEY sk_live_xxx --reserved
441
- insforge secrets add TEMP_TOKEN abc123 --expires "2025-12-31T00:00:00Z"
440
+ npx @insforge/cli secrets add STRIPE_API_KEY sk_live_xxx
441
+ npx @insforge/cli secrets add STRIPE_API_KEY sk_live_xxx --reserved
442
+ npx @insforge/cli secrets add TEMP_TOKEN abc123 --expires "2025-12-31T00:00:00Z"
442
443
  ```
443
444
 
444
- #### `insforge secrets update <key>`
445
+ #### `npx @insforge/cli secrets update <key>`
445
446
 
446
447
  Update an existing secret.
447
448
 
448
449
  ```bash
449
- insforge secrets update STRIPE_API_KEY --value sk_live_new_xxx
450
- insforge secrets update STRIPE_API_KEY --active false
451
- insforge secrets update STRIPE_API_KEY --reserved true
452
- insforge secrets update STRIPE_API_KEY --expires null # remove expiration
450
+ npx @insforge/cli secrets update STRIPE_API_KEY --value sk_live_new_xxx
451
+ npx @insforge/cli secrets update STRIPE_API_KEY --active false
452
+ npx @insforge/cli secrets update STRIPE_API_KEY --reserved true
453
+ npx @insforge/cli secrets update STRIPE_API_KEY --expires null # remove expiration
453
454
  ```
454
455
 
455
- #### `insforge secrets delete <key>`
456
+ #### `npx @insforge/cli secrets delete <key>`
456
457
 
457
458
  Delete a secret (soft delete — marks as inactive).
458
459
 
459
460
  ```bash
460
- insforge secrets delete STRIPE_API_KEY
461
- insforge secrets delete STRIPE_API_KEY -y # skip confirmation
461
+ npx @insforge/cli secrets delete STRIPE_API_KEY
462
+ npx @insforge/cli secrets delete STRIPE_API_KEY -y # skip confirmation
462
463
  ```
463
464
 
464
- ### Schedules — `insforge schedules`
465
+ ### Schedules — `npx @insforge/cli schedules`
465
466
 
466
467
  Manage scheduled tasks (cron jobs).
467
468
 
468
- #### `insforge schedules list`
469
+ #### `npx @insforge/cli schedules list`
469
470
 
470
471
  List all schedules in the current project.
471
472
 
472
473
  ```bash
473
- insforge schedules list
474
- insforge schedules list --json
474
+ npx @insforge/cli schedules list
475
+ npx @insforge/cli schedules list --json
475
476
  ```
476
477
 
477
- #### `insforge schedules create`
478
+ #### `npx @insforge/cli schedules create`
478
479
 
479
480
  Create a new scheduled task.
480
481
 
481
482
  ```bash
482
- insforge schedules create --name "daily-cleanup" --cron "0 0 * * *" --url "https://api.example.com/cleanup" --method POST
483
- insforge schedules create --name "hourly-sync" --cron "0 * * * *" --url "https://api.example.com/sync" --method GET --headers '{"Authorization": "Bearer xxx"}'
483
+ npx @insforge/cli schedules create --name "daily-cleanup" --cron "0 0 * * *" --url "https://api.example.com/cleanup" --method POST
484
+ npx @insforge/cli schedules create --name "hourly-sync" --cron "0 * * * *" --url "https://api.example.com/sync" --method GET --headers '{"Authorization": "Bearer xxx"}'
484
485
  ```
485
486
 
486
- #### `insforge schedules get <id>`
487
+ #### `npx @insforge/cli schedules get <id>`
487
488
 
488
489
  Get details of a specific schedule.
489
490
 
490
491
  ```bash
491
- insforge schedules get <id>
492
- insforge schedules get 123 --json
492
+ npx @insforge/cli schedules get <id>
493
+ npx @insforge/cli schedules get 123 --json
493
494
  ```
494
495
 
495
- #### `insforge schedules update <id>`
496
+ #### `npx @insforge/cli schedules update <id>`
496
497
 
497
498
  Update an existing schedule.
498
499
 
499
500
  ```bash
500
- insforge schedules update <id> --name "weekly-cleanup" --cron "0 0 * * 0"
501
- insforge schedules update 123 --active false
501
+ npx @insforge/cli schedules update <id> --name "weekly-cleanup" --cron "0 0 * * 0"
502
+ npx @insforge/cli schedules update 123 --active false
502
503
  ```
503
504
 
504
- #### `insforge schedules delete <id>`
505
+ #### `npx @insforge/cli schedules delete <id>`
505
506
 
506
507
  Delete a schedule.
507
508
 
508
509
  ```bash
509
- insforge schedules delete <id>
510
- insforge schedules delete 123 -y
510
+ npx @insforge/cli schedules delete <id>
511
+ npx @insforge/cli schedules delete 123 -y
511
512
  ```
512
513
 
513
- #### `insforge schedules logs <id>`
514
+ #### `npx @insforge/cli schedules logs <id>`
514
515
 
515
516
  Fetch execution logs for a specific schedule.
516
517
 
517
518
  ```bash
518
- insforge schedules logs <id>
519
- insforge schedules logs 123 --limit 100
519
+ npx @insforge/cli schedules logs <id>
520
+ npx @insforge/cli schedules logs 123 --limit 100
520
521
  ```
521
522
 
522
523
  ---
523
524
 
524
525
  ## Project Configuration
525
526
 
526
- Running `insforge link` creates a `.insforge/` directory in your project:
527
+ Running `npx @insforge/cli link` creates a `.insforge/` directory in your project:
527
528
 
528
529
  ```
529
530
  .insforge/
@@ -540,6 +541,20 @@ Global configuration is stored in `~/.insforge/`:
540
541
  └── config.json # default_org_id, platform_api_url
541
542
  ```
542
543
 
544
+ ## Agent Skills
545
+
546
+ When you run `npx @insforge/cli create` or `npx @insforge/cli link`, the CLI automatically installs a set of [InsForge agent skills](https://github.com/InsForge/agent-skills) into your project for all supported AI coding agents (Claude Code, Cursor, Windsurf, Cline, Roo, Gemini CLI, GitHub Copilot, Qwen, Qoder, Trae, Kilo, Codex, Augment, Antigravity). These skills teach your coding agent how to work with InsForge — database queries, auth, storage, edge functions, realtime, etc. — so it can generate correct code for your backend without you copy-pasting docs.
547
+
548
+ It also installs [`find-skills`](https://github.com/vercel-labs/skills) so agents can discover available skills on demand.
549
+
550
+ Skill files are written to per-agent directories (e.g. `.claude/`, `.cursor/`, `.windsurf/`) and are automatically added to your `.gitignore`. You can re-run `npx @insforge/cli link` at any time to reinstall or update skills.
551
+
552
+ ## Analytics
553
+
554
+ The CLI reports anonymous usage events to [PostHog](https://posthog.com) so we can understand which features are being used and prioritize improvements.
555
+
556
+ Analytics are enabled by default in the published npm package. If you build the CLI from source without setting `POSTHOG_API_KEY` at build time, analytics become a no-op automatically.
557
+
543
558
  ## Environment Variables
544
559
 
545
560
  | Variable | Description |
@@ -556,19 +571,19 @@ All commands support `--json` for structured output and `-y` to skip confirmatio
556
571
 
557
572
  ```bash
558
573
  # Login in CI
559
- INSFORGE_EMAIL=$EMAIL INSFORGE_PASSWORD=$PASSWORD insforge login --email --json
574
+ INSFORGE_EMAIL=$EMAIL INSFORGE_PASSWORD=$PASSWORD npx @insforge/cli login --email --json
560
575
 
561
576
  # Link a project
562
- insforge link --project-id $PROJECT_ID --org-id $ORG_ID -y
577
+ npx @insforge/cli link --project-id $PROJECT_ID --org-id $ORG_ID -y
563
578
 
564
579
  # Query and pipe results
565
- insforge db query "SELECT * FROM users" --json | jq '.rows[].email'
580
+ npx @insforge/cli db query "SELECT * FROM users" --json | jq '.rows[].email'
566
581
 
567
582
  # Deploy frontend
568
- insforge deployments deploy ./dist --json
583
+ npx @insforge/cli deployments deploy ./dist --json
569
584
 
570
585
  # Upload a build artifact
571
- insforge storage upload ./dist/bundle.js --bucket assets --key "v1.2.0/bundle.js" --json
586
+ npx @insforge/cli storage upload ./dist/bundle.js --bucket assets --key "v1.2.0/bundle.js" --json
572
587
  ```
573
588
 
574
589
  ## Exit Codes
@@ -578,7 +593,7 @@ insforge storage upload ./dist/bundle.js --bucket assets --key "v1.2.0/bundle.js
578
593
  | 0 | Success |
579
594
  | 1 | General error |
580
595
  | 2 | Authentication failure |
581
- | 3 | Project not linked (run `insforge link` first) |
596
+ | 3 | Project not linked (run `npx @insforge/cli link` first) |
582
597
  | 4 | Resource not found |
583
598
  | 5 | Permission denied |
584
599
 
@@ -613,8 +628,8 @@ npm run test:integration:real
613
628
  ```
614
629
 
615
630
  Prerequisites:
616
- - Logged in (`insforge login`) so `~/.insforge/credentials.json` exists
617
- - Linked project in this repo (`insforge link`) so `.insforge/project.json` exists
631
+ - Logged in (`npx @insforge/cli login`) so `~/.insforge/credentials.json` exists
632
+ - Linked project in this repo (`npx @insforge/cli link`) so `.insforge/project.json` exists
618
633
 
619
634
  Optional environment variables:
620
635
  - `INSFORGE_API_URL`: Platform API URL override (defaults to `https://api.insforge.dev`)