gipity 1.1.10 → 1.1.12

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.
@@ -1,4 +1,4 @@
1
- import { Command } from 'commander';
1
+ import { Command, Option } from 'commander';
2
2
  import { post } from '../api.js';
3
3
  import { resolveProjectContext, getConfigPath } from '../config.js';
4
4
  import { pushFile } from '../sync.js';
@@ -8,7 +8,43 @@ import { error as clrError, success, muted } from '../colors.js';
8
8
  import { printCommandError } from '../helpers/command.js';
9
9
  import { withSpinner } from '../progress.js';
10
10
  import { guessMime } from '../upload.js';
11
- import { IMAGE_MODELS_DOC, VIDEO_MODELS_DOC, TTS_PROVIDER_DESCRIPTIONS } from '../provider-docs.js';
11
+ import { IMAGE_MODELS_TABLE, IMAGE_PROVIDER_IDS, IMAGE_QUALITY_IDS, IMAGE_TIER_ALIASES_DOC, IMAGE_TIER_ALIAS_IDS, IMAGE_GEMINI_ASPECT_RATIO_IDS, IMAGE_GEMINI_SIZE_IDS, VIDEO_MODEL_IDS, VIDEO_MODELS_TABLE, VIDEO_ASPECT_RATIOS, VIDEO_ASPECT_RATIO_IDS, VIDEO_RESOLUTION_IDS, TTS_PROVIDER_IDS, TTS_PROVIDER_DESCRIPTIONS, GEMINI_TTS_VOICES_DOC, } from '../provider-docs.js';
12
+ function printMetrics(metrics) {
13
+ const rows = metrics.filter((m) => m !== null);
14
+ const width = Math.max(...rows.map((m) => m.label.length));
15
+ for (const m of rows) {
16
+ console.log(` ${muted(`${m.label.padStart(width)}:`)} ${m.value}`);
17
+ }
18
+ }
19
+ function fmtSeconds(s) {
20
+ if (s >= 60)
21
+ return `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
22
+ return `${s < 10 ? Math.round(s * 10) / 10 : Math.round(s)}s`;
23
+ }
24
+ /** The standard metric rows, in a fixed order so every subcommand reads the
25
+ * same: duration, size, time, speed, credits. Rows whose data is missing
26
+ * (image has no duration; free ops have no credits) are skipped. */
27
+ function generationMetrics(result, elapsedSeconds) {
28
+ // ffmpeg-style realtime multiple: media seconds produced per wall-clock
29
+ // second. Generation is slower than playback, so expect values below 1x.
30
+ const speed = result.duration_seconds !== undefined && elapsedSeconds > 0
31
+ ? result.duration_seconds / elapsedSeconds : undefined;
32
+ return [
33
+ result.duration_seconds !== undefined
34
+ ? { label: 'duration', value: `${fmtSeconds(result.duration_seconds)} clip` } : null,
35
+ { label: 'size', value: `${Math.round(result.size_bytes / 1024)}KB` },
36
+ { label: 'time', value: fmtSeconds(elapsedSeconds) },
37
+ speed !== undefined
38
+ ? { label: 'speed', value: `${speed >= 1 ? Math.round(speed * 10) / 10 : Math.round(speed * 100) / 100}x realtime` } : null,
39
+ result.credits_deducted !== undefined
40
+ ? { label: 'credits', value: `${result.credits_deducted.toLocaleString('en-US')} (${result.remaining_balance.toLocaleString('en-US')} remaining)` } : null,
41
+ ];
42
+ }
43
+ /** JSON-mode result: the server fields plus how long generation took and
44
+ * where the file landed. */
45
+ function jsonResult(result, elapsedSeconds, savedPath) {
46
+ return JSON.stringify({ ...result, generation_seconds: Math.round(elapsedSeconds * 10) / 10, saved: savedPath });
47
+ }
12
48
  /** Download a URL and save to a local file, then push it up to the project so
13
49
  * the cloud (and anything that mirrors it) immediately matches local disk.
14
50
  * Returns the absolute path written, so callers can report where it landed.
@@ -172,7 +208,11 @@ function readInputImages(paths) {
172
208
  const imageCommand = new Command('image')
173
209
  .description('Generate an image from a text prompt, or edit existing images with --input')
174
210
  .addHelpText('after', `
175
- Models: ${IMAGE_MODELS_DOC}
211
+ Models (one line per provider; pass an id with --model, the provider with --provider):
212
+ ${IMAGE_MODELS_TABLE}
213
+
214
+ Tier aliases (pass to --model instead of an id; each names a provider+model):
215
+ ${IMAGE_TIER_ALIASES_DOC}
176
216
 
177
217
  Editing (--input): pass one or more source images and the prompt becomes an edit
178
218
  instruction applied to them - "make it night time", "add a hat", "remove the car
@@ -189,12 +229,12 @@ Examples:
189
229
  `)
190
230
  .argument('<prompt>', 'Text description of the image, or (with --input) the edit instruction to apply')
191
231
  .option('--input <file>', 'Source image to edit/compose (repeatable). With --input the prompt is an edit instruction; routes to Gemini.', (v, acc) => (acc || []).concat(v))
192
- .option('--provider <provider>', 'Image provider: openai, bfl, or gemini (default: bfl)')
193
- .option('--model <model>', 'Model ID (see provider list above)')
232
+ .addOption(new Option('--provider <provider>', 'Image provider (default: bfl)').choices(IMAGE_PROVIDER_IDS))
233
+ .option('--model <model>', `Model id for the chosen provider, or a tier alias (${IMAGE_TIER_ALIAS_IDS.join(', ')}); see Models below`)
194
234
  .option('--size <size>', 'Dimensions as WxH, e.g. "1024x1024" (OpenAI/BFL)')
195
- .option('--quality <quality>', 'Quality: low|medium|high|auto (gpt-image-2)')
196
- .option('--aspect-ratio <ratio>', 'Aspect ratio (Gemini only): 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9')
197
- .option('--image-size <size>', 'Output resolution (Gemini only): 512, 1K, 2K, 4K')
235
+ .addOption(new Option('--quality <quality>', 'Quality (gpt-image-2 only)').choices(IMAGE_QUALITY_IDS))
236
+ .addOption(new Option('--aspect-ratio <ratio>', 'Aspect ratio (Gemini only)').choices(IMAGE_GEMINI_ASPECT_RATIO_IDS))
237
+ .addOption(new Option('--image-size <size>', 'Output resolution (Gemini only)').choices(IMAGE_GEMINI_SIZE_IDS))
198
238
  .option('--seed <n>', 'Deterministic seed (BFL only): reuse one seed to keep a set of images visually coherent', (v) => parseInt(v, 10))
199
239
  .option('-o, --output <file>', 'Output path (default ./generated.png). For an image your app ships, write it into the source tree so it deploys, e.g. -o src/assets/images/hero.png; the cwd default is fine for one-off generation.')
200
240
  .option('--json', 'Output as JSON')
@@ -216,21 +256,24 @@ Examples:
216
256
  input_images: inputImages,
217
257
  });
218
258
  const verb = inputImages ? 'Editing image...' : 'Generating image...';
259
+ const started = Date.now();
219
260
  const result = opts.json
220
261
  ? await doGenerate()
221
262
  : await withSpinner(verb, doGenerate, { done: null });
263
+ const elapsed = (Date.now() - started) / 1000;
222
264
  const ext = result.content_type.includes('png') ? 'png' : 'jpg';
223
265
  const filename = opts.output || `generated.${ext}`;
224
266
  const savedPath = await downloadFile(result.url, filename, !!opts.output);
225
267
  if (opts.json) {
226
- console.log(JSON.stringify({ ...result, saved: savedPath }));
268
+ console.log(jsonResult(result, elapsed, savedPath));
227
269
  }
228
270
  else {
229
- const sizeKb = Math.round(result.size_bytes / 1024);
230
- console.log(`${muted(`Generated with ${result.provider}/${result.model} (${sizeKb}KB)`)}`);
231
- if (result.seed !== undefined) {
232
- console.log(muted(`Seed ${result.seed} — pass --seed ${result.seed} to keep the next image coherent`));
233
- }
271
+ console.log(muted(`Generated with ${result.provider}/${result.model}`));
272
+ printMetrics([
273
+ ...generationMetrics(result, elapsed),
274
+ result.seed !== undefined
275
+ ? { label: 'seed', value: `${result.seed} ${muted(`(pass --seed ${result.seed} to keep the next image coherent)`)}` } : null,
276
+ ]);
234
277
  // Saved-path last: a caller reading a truncated tail of this output (an
235
278
  // agent batching several generates in one shell call) must still see
236
279
  // WHERE the bytes landed - that is the one line the next command needs.
@@ -246,7 +289,10 @@ Examples:
246
289
  const videoCommand = new Command('video')
247
290
  .description('Generate a short video (up to 8 seconds) from a text prompt using Google Veo')
248
291
  .addHelpText('after', `
249
- Models: ${VIDEO_MODELS_DOC}
292
+ Models (default: veo-3.1-generate-preview):
293
+ ${VIDEO_MODELS_TABLE}
294
+
295
+ Aspect ratios: ${VIDEO_ASPECT_RATIOS}
250
296
 
251
297
  Tips:
252
298
  - Describe the scene, camera movement, lighting, and any dialogue
@@ -260,9 +306,9 @@ Examples:
260
306
  gipity generate video "a wave crashing" --duration 4 --model veo-3.1-lite-generate-preview
261
307
  `)
262
308
  .argument('<prompt>', 'Description of the video scene, action, camera movement, and dialogue')
263
- .option('--model <model>', 'Veo model: veo-3.1-generate-preview (quality), veo-3.1-fast-generate-preview (speed), veo-3.1-lite-generate-preview (budget)')
264
- .option('--aspect <ratio>', 'Aspect ratio: 16:9 (landscape), 9:16 (portrait), 1:1 (square)')
265
- .option('--resolution <res>', 'Video resolution: 720p, 1080p, 4k')
309
+ .addOption(new Option('--model <model>', 'Video model; see Models below for quality/price').choices(VIDEO_MODEL_IDS))
310
+ .addOption(new Option('--aspect <ratio>', 'Aspect ratio (landscape, portrait, square)').choices(VIDEO_ASPECT_RATIO_IDS))
311
+ .addOption(new Option('--resolution <res>', 'Video resolution').choices(VIDEO_RESOLUTION_IDS))
266
312
  .option('--duration <seconds>', 'Clip length in seconds. Veo models: 4, 6, or 8 (8 required at 1080p/4K); omni-flash: 3-10. Default 8. Billing is per second, so shorter is cheaper.')
267
313
  .option('-o, --output <file>', 'Output path (default ./generated.mp4). For a clip your app ships, write it into the source tree so it deploys, e.g. -o src/assets/video/clip.mp4; the cwd default is fine for one-off generation.')
268
314
  .option('--json', 'Output as JSON')
@@ -279,17 +325,19 @@ Examples:
279
325
  duration_seconds: opts.duration ? Number(opts.duration) : undefined,
280
326
  });
281
327
  // Veo runs 30-120s; the bouncing bar + timer keeps the wait honest.
328
+ const started = Date.now();
282
329
  const result = opts.json
283
330
  ? await doGenerate()
284
331
  : await withSpinner('Generating video...', doGenerate, { done: null });
332
+ const elapsed = (Date.now() - started) / 1000;
285
333
  const filename = opts.output || 'generated.mp4';
286
334
  const savedPath = await downloadFile(result.url, filename, !!opts.output);
287
335
  if (opts.json) {
288
- console.log(JSON.stringify({ ...result, saved: savedPath }));
336
+ console.log(jsonResult(result, elapsed, savedPath));
289
337
  }
290
338
  else {
291
- const sizeKb = Math.round(result.size_bytes / 1024);
292
- console.log(`${muted(`Generated with ${result.provider}/${result.model} (${sizeKb}KB)`)}`);
339
+ console.log(muted(`Generated with ${result.provider}/${result.model}`));
340
+ printMetrics(generationMetrics(result, elapsed));
293
341
  console.log(success(`Saved to ${savedPath}`));
294
342
  }
295
343
  }
@@ -302,7 +350,13 @@ Examples:
302
350
  const speechCommand = new Command('speech')
303
351
  .description('Generate speech audio from text using text-to-speech')
304
352
  .addHelpText('after', `
305
- Providers: ${Object.entries(TTS_PROVIDER_DESCRIPTIONS).map(([k, v]) => `${k} - ${v}`).join('\n ')}
353
+ Providers:
354
+ ${Object.entries(TTS_PROVIDER_DESCRIPTIONS).map(([k, v]) => ` ${k.padEnd(10)} ${v}`).join('\n')}
355
+
356
+ Voices: openai voices are the list above; the full Gemini list is below. ElevenLabs
357
+ voice ids: gipity service call "tts/voices?provider=elevenlabs" --get
358
+
359
+ Gemini voices: ${GEMINI_TTS_VOICES_DOC}
306
360
 
307
361
  Multi-speaker (--speakers, Gemini only): JSON array like
308
362
  [{"name":"Joe","voice":"Kore"},{"name":"Jane","voice":"Puck"}]; format the
@@ -315,8 +369,8 @@ Examples:
315
369
  gipity generate speech 'Joe: Hey!\\nJane: Hi there!' --provider gemini --speakers '[{"name":"Joe","voice":"Charon"},{"name":"Jane","voice":"Leda"}]'
316
370
  `)
317
371
  .argument('<text>', 'Text to convert to speech (max 5000 characters)')
318
- .option('--provider <provider>', 'TTS provider: elevenlabs (default), openai, or gemini')
319
- .option('--voice <voice>', 'Voice ID or name (provider-specific)')
372
+ .addOption(new Option('--provider <provider>', 'TTS provider (default: elevenlabs)').choices(TTS_PROVIDER_IDS))
373
+ .option('--voice <voice>', 'Voice ID or name (provider-specific; see Voices below)')
320
374
  .option('--language <code>', 'BCP-47 language code, e.g. ja-JP, es-ES (Gemini only, 60+ languages)')
321
375
  .option('--speakers <json>', 'Multi-speaker config as JSON array (Gemini only, up to 2 speakers)')
322
376
  .option('-o, --output <file>', 'Output path (default ./speech.mp3). For audio your app ships, write it into the source tree so it deploys, e.g. -o src/assets/sounds/intro.mp3; the cwd default is fine for one-off generation.')
@@ -343,17 +397,19 @@ Examples:
343
397
  language: opts.language,
344
398
  speakers,
345
399
  });
400
+ const started = Date.now();
346
401
  const result = opts.json
347
402
  ? await doGenerate()
348
403
  : await withSpinner('Generating speech...', doGenerate, { done: null });
404
+ const elapsed = (Date.now() - started) / 1000;
349
405
  const filename = opts.output || 'speech.mp3';
350
406
  const savedPath = await downloadFile(result.url, filename, !!opts.output);
351
407
  if (opts.json) {
352
- console.log(JSON.stringify({ ...result, saved: savedPath }));
408
+ console.log(jsonResult(result, elapsed, savedPath));
353
409
  }
354
410
  else {
355
- const sizeKb = Math.round(result.size_bytes / 1024);
356
- console.log(`${muted(`Generated with ${result.provider} (${sizeKb}KB)`)}`);
411
+ console.log(muted(`Generated with ${result.provider}`));
412
+ printMetrics(generationMetrics(result, elapsed));
357
413
  console.log(success(`Saved to ${savedPath}`));
358
414
  }
359
415
  }
@@ -372,18 +428,24 @@ default; pass --model <id> only if you want a specific one (see the catalog with
372
428
 
373
429
  Tips:
374
430
  - Describe genre, mood, instruments, and tempo (e.g. "upbeat lo-fi hip hop with mellow piano")
375
- - Music is instrumental by default; pass --vocals to allow singing
431
+ - Music is instrumental by default; pass --vocals to allow singing, or --lyrics /
432
+ --lyrics-file to have the vocalist sing YOUR exact words (section tags like
433
+ [Verse] / [Chorus] are understood; keep the prompt to style only)
434
+ - With lyrics, size --duration to the words (roughly 10s per short section)
376
435
  - Longer clips cost more; the max length depends on the model
377
436
 
378
437
  Examples:
379
438
  gipity generate music "chill lo-fi beat for studying"
380
439
  gipity generate music "epic orchestral battle theme" --duration 60 -o src/assets/audio/theme.mp3
381
440
  gipity generate music "indie pop chorus" --vocals --duration 20
441
+ gipity generate music "80s synth-pop, female vocals" --lyrics-file lyrics.txt --duration 120 -o song.mp3
382
442
  `)
383
443
  .argument('<prompt>', 'Text description of the music to generate')
384
444
  .option('--duration <seconds>', 'Clip length in seconds (default 30; max depends on the model)', (v) => parseInt(v, 10))
385
- .option('--model <model>', 'Music model id (default: platform default)')
445
+ .option('--model <model>', 'Music model id (default: platform default; list ids: gipity service call music/models --get)')
386
446
  .option('--vocals', 'Allow vocals (default: instrumental only)')
447
+ .option('--lyrics <text>', 'Exact lyrics to sing (implies vocals; only lyrics-capable models)')
448
+ .option('--lyrics-file <file>', 'Read the exact lyrics to sing from a file (implies vocals)')
387
449
  .option('-o, --output <file>', 'Output path (default ./music.mp3). For audio your app ships, write it into the source tree so it deploys, e.g. -o src/assets/audio/theme.mp3; the cwd default is fine for one-off generation.')
388
450
  .option('--json', 'Output as JSON')
389
451
  .action(async (prompt, opts) => {
@@ -391,23 +453,34 @@ Examples:
391
453
  const { config } = await resolveProjectContext();
392
454
  if (opts.output)
393
455
  ensureOutputDir(opts.output);
456
+ if (opts.lyrics && opts.lyricsFile) {
457
+ console.error(clrError('Pass --lyrics or --lyrics-file, not both.'));
458
+ process.exit(1);
459
+ }
460
+ const lyrics = opts.lyricsFile
461
+ ? readFileSync(opts.lyricsFile, 'utf8').trim()
462
+ : opts.lyrics;
394
463
  const doGenerate = () => post(`/projects/${config.projectGuid}/generate/music`, {
395
464
  prompt,
396
465
  duration_seconds: opts.duration,
397
466
  model: opts.model,
398
- instrumental: !opts.vocals,
467
+ // Lyrics imply vocals; otherwise instrumental unless --vocals.
468
+ instrumental: lyrics ? false : !opts.vocals,
469
+ lyrics: lyrics || undefined,
399
470
  });
471
+ const started = Date.now();
400
472
  const result = opts.json
401
473
  ? await doGenerate()
402
474
  : await withSpinner('Generating music...', doGenerate, { done: null });
475
+ const elapsed = (Date.now() - started) / 1000;
403
476
  const filename = opts.output || 'music.mp3';
404
477
  const savedPath = await downloadFile(result.url, filename, !!opts.output);
405
478
  if (opts.json) {
406
- console.log(JSON.stringify({ ...result, saved: savedPath }));
479
+ console.log(jsonResult(result, elapsed, savedPath));
407
480
  }
408
481
  else {
409
- const sizeKb = Math.round(result.size_bytes / 1024);
410
- console.log(`${muted(`Generated with ${result.model} (${sizeKb}KB)`)}`);
482
+ console.log(muted(`Generated with ${result.model}`));
483
+ printMetrics(generationMetrics(result, elapsed));
411
484
  console.log(success(`Saved to ${savedPath}`));
412
485
  }
413
486
  }
@@ -449,17 +522,19 @@ Examples:
449
522
  duration_seconds: opts.duration,
450
523
  prompt_influence: opts.influence,
451
524
  });
525
+ const started = Date.now();
452
526
  const result = opts.json
453
527
  ? await doGenerate()
454
528
  : await withSpinner('Generating sound effect...', doGenerate, { done: null });
529
+ const elapsed = (Date.now() - started) / 1000;
455
530
  const filename = opts.output || 'sound.mp3';
456
531
  const savedPath = await downloadFile(result.url, filename, !!opts.output);
457
532
  if (opts.json) {
458
- console.log(JSON.stringify({ ...result, saved: savedPath }));
533
+ console.log(jsonResult(result, elapsed, savedPath));
459
534
  }
460
535
  else {
461
- const sizeKb = Math.round(result.size_bytes / 1024);
462
- console.log(`${muted(`Generated sound effect (${sizeKb}KB)`)}`);
536
+ console.log(muted('Generated sound effect'));
537
+ printMetrics(generationMetrics(result, elapsed));
463
538
  console.log(success(`Saved to ${savedPath}`));
464
539
  }
465
540
  }
@@ -1,4 +1,4 @@
1
- import { Command } from 'commander';
1
+ import { Command, Option } from 'commander';
2
2
  import { get, post, del } from '../api.js';
3
3
  import { resolveProjectContext } from '../config.js';
4
4
  import { bold, muted, success, warning } from '../colors.js';
@@ -35,7 +35,7 @@ async function projectGuid(opts) {
35
35
  keyCommand
36
36
  .command('create <name>')
37
37
  .description('Mint a project API key (shown once). Give it a name you will recognize later')
38
- .option('--role <role>', 'viewer | editor | owner (default: viewer)', 'viewer')
38
+ .addOption(new Option('--role <role>', 'Access role for the key').choices(['viewer', 'editor', 'owner']).default('viewer'))
39
39
  .option('--expires-days <n>', 'Days until the key expires (default: never)')
40
40
  .option(...projectOpt)
41
41
  .option('--json', 'Output as JSON')
@@ -1,4 +1,4 @@
1
- import { Command } from 'commander';
1
+ import { Command, Option } from 'commander';
2
2
  import { get } from '../api.js';
3
3
  import { requireConfig } from '../config.js';
4
4
  import { success, error as clrError, warning, muted, bold } from '../colors.js';
@@ -66,7 +66,7 @@ logsCommand
66
66
  .command('app')
67
67
  .description('Unified recent activity for this app — JS errors, failed function calls, failed services, network failures. Designed for agents debugging a deployed app.')
68
68
  .option('--since <window>', "Window: 5m / 10m / 30m / 1h / 6h / 24h / 7d", '10m')
69
- .option('--severity <level>', 'error | warn | network | all', 'all')
69
+ .addOption(new Option('--severity <level>', 'Severity filter').choices(['error', 'warn', 'network', 'all']).default('all'))
70
70
  .option('--type <list>', "Comma-separated: errors,functions,services,traffic. Default excludes traffic (high volume).")
71
71
  .option('--filter <pattern>', 'Substring match against message / fn name / path (case-insensitive)')
72
72
  .option('--limit <n>', 'Max entries', '100')
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { dirname, resolve } from 'path';
3
- import { Command } from 'commander';
3
+ import { Command, Option } from 'commander';
4
4
  import { get, post, del } from '../api.js';
5
5
  import { requireConfig, getConfigPath } from '../config.js';
6
6
  import { error as clrError, success, muted, bold } from '../colors.js';
@@ -21,8 +21,8 @@ const roomCommand = new Command('room')
21
21
  .description('Manage realtime rooms')
22
22
  .argument('[action]', 'list | create | delete | info', 'list')
23
23
  .argument('[name]', 'room name (for create | delete | info)')
24
- .option('--type <type>', 'room type for create: state | relay', 'state')
25
- .option('--auth <level>', 'auth level for create: public | user', 'public')
24
+ .addOption(new Option('--type <type>', 'Room type for create').choices(['state', 'relay']).default('state'))
25
+ .addOption(new Option('--auth <level>', 'Auth level for create').choices(['public', 'user']).default('public'))
26
26
  .option('--max-clients <n>', 'max clients for create (1-200)')
27
27
  .option('--json', 'Output as JSON')
28
28
  .action((action, name, opts) => run('Realtime room', async () => {
@@ -1,4 +1,4 @@
1
- import { Command } from 'commander';
1
+ import { Command, Option } from 'commander';
2
2
  import { get, post, put, patch, del, publicRequest, mintAppToken } from '../api.js';
3
3
  import { getAuth } from '../auth.js';
4
4
  import { requireConfig } from '../config.js';
@@ -50,7 +50,7 @@ recordsCommand
50
50
  recordsCommand
51
51
  .command('config <table>')
52
52
  .description('Show or set a table\'s Records API config (auth level, search, etc.)')
53
- .option('--auth <level>', 'Auth level: public (anonymous writes), member (sign-in), or user')
53
+ .addOption(new Option('--auth <level>', 'Auth level: public (anonymous writes), member (sign-in), or user').choices(['public', 'member', 'user']))
54
54
  .option('--searchable <bool>', 'Enable full-text search (true/false)')
55
55
  .option('--primary-key <col>', 'Primary key column (default: id)')
56
56
  .option('--soft-delete <col>', 'Soft-delete column (pass "none" to clear)')
@@ -81,8 +81,8 @@ recordsCommand
81
81
  .command('query <table>')
82
82
  .description('List records (full-text search, filter, sort, recycle bin)')
83
83
  .option('-q, --q <text>', 'Full-text search across the table\'s text columns (needs `--searchable true` on the table)')
84
- .option('--filter <filter>', 'AND filter string (e.g., "status:eq:active")')
85
- .option('--any <filter>', 'OR filter group, same grammar as --filter (e.g., "owner:eq:me,shared:eq:true")')
84
+ .option('--filter <filter>', 'AND filter string, "col:op:value" comma-joined. Ops: eq, neq, gt, gte, lt, lte, like, ilike, in (pipe-separated values), is_null, not_null. Full grammar: gipity skill read app-records')
85
+ .option('--any <filter>', 'OR filter group, same grammar and ops as --filter (e.g., "owner:eq:me,shared:eq:true")')
86
86
  .option('--sort <sort>', 'Sort string (e.g., "created_at:desc")')
87
87
  .option('--limit <n>', 'Max rows', '20')
88
88
  .option('--offset <n>', 'Offset', '0')
@@ -13,9 +13,10 @@ const SERVICES = [
13
13
  { name: 'image', method: 'POST', desc: 'Generate an image ({ prompt, provider?, size? })' },
14
14
  { name: 'image/models', method: 'GET', desc: 'List image providers/models' },
15
15
  { name: 'tts', method: 'POST', desc: 'Text-to-speech ({ text, voice?, ... })' },
16
- { name: 'tts/voices', method: 'GET', desc: 'List TTS voices' },
16
+ { name: 'tts/voices', method: 'GET', desc: 'List TTS voices (append ?provider=elevenlabs|openai|gemini)' },
17
17
  { name: 'sound', method: 'POST', desc: 'Sound effect ({ text, duration_seconds? })' },
18
18
  { name: 'music', method: 'POST', desc: 'Music generation ({ prompt, duration_seconds? })' },
19
+ { name: 'music/models', method: 'GET', desc: 'List music models (ids for --model / model)' },
19
20
  { name: 'video', method: 'POST', desc: 'Video generation ({ prompt, ... })' },
20
21
  { name: 'location/ip', method: 'POST', desc: 'IP geolocation ({ ip? })' },
21
22
  { name: 'location/geocode', method: 'POST', desc: 'Reverse geocode ({ lat, lon })' },
@@ -75,9 +76,12 @@ serviceCommand
75
76
  .action((name, bodyArg, opts) => run('Call', async () => {
76
77
  const config = requireConfig();
77
78
  // Encode each path segment but preserve the `/` separators so subpaths
78
- // like `location/geocode` and `llm/models` resolve correctly.
79
- const path = name.split('/').map(encodeURIComponent).join('/');
80
- const url = `/api/${config.projectGuid}/services/${path}`;
79
+ // like `location/geocode` and `llm/models` resolve correctly. A query
80
+ // string rides along untouched, so listing endpoints that filter by
81
+ // parameter work: `gipity service call "tts/voices?provider=elevenlabs" --get`.
82
+ const [pathPart, query] = name.split('?', 2);
83
+ const path = pathPart.split('/').map(encodeURIComponent).join('/');
84
+ const url = `/api/${config.projectGuid}/services/${path}${query ? `?${query}` : ''}`;
81
85
  const body = resolveBody(bodyArg || opts.data, opts.file);
82
86
  // Name the calling identity (stderr, so stdout stays parseable). An owner
83
87
  // call always succeeds regardless of billing mode, so without this line a