transloadit 6.0.3 → 6.1.0

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
@@ -51,6 +51,19 @@ This package includes a full-featured CLI for interacting with Transloadit from
51
51
 
52
52
  ### Quick Start
53
53
 
54
+ Try Storage and Smart CDN with one maintained, runnable example:
55
+
56
+ ```bash
57
+ npx @transloadit/node@latest init upload-once my-gallery
58
+ cd my-gallery
59
+ npm run demo
60
+ ```
61
+
62
+ The initializer creates local files and installs dependencies; only `npm run demo` logs in and
63
+ uploads. Change the sizes in `demo.ts` and rerun it without uploading the original again.
64
+ See the [canonical example](./examples/upload-once/README.md) for requirements, credential scope
65
+ and the path from a local demo to a real application. Existing projects are never overwritten.
66
+
54
67
  Log in through your browser, then run a command:
55
68
 
56
69
  ```bash
@@ -915,6 +928,8 @@ Transcribe speech in audio or video files
915
928
 
916
929
  Runs `/speech/transcribe` with a text-first default and writes the transcript to `--output`.
917
930
 
931
+ `--target-language`: Sets the spoken language hint for the `"replicate"` provider. Omit this parameter to detect the spoken language automatically. Set it to the full lowercase English language name, such as `"french"`, when the spoken language is known. Despite its name, this parameter does not translate speech. For the `"aws"` and `"gcp"` providers, use `--source-language` instead.
932
+
918
933
  **Usage**
919
934
 
920
935
  ```bash
@@ -940,7 +955,7 @@ npx transloadit speech transcribe --input <path|dir|url|-> [options]
940
955
  | `--provider` | `string` | no | `replicate` | Provider to use for transcription. Defaults to replicate. |
941
956
  | `--format` | `string` | no | `text` | Output format. Defaults to text. |
942
957
  | `--source-language` | `string` | no | `en-US` | Spoken language as a BCP-47 code, for providers that support explicit source languages. |
943
- | `--target-language` | `string` | no | `en-US` | Target written language for providers that support translation. |
958
+ | `--target-language` | `string` | no | `french` | Sets the spoken language hint for the "replicate" provider. Omit this parameter to detect the spoken language automatically. Set it to the full lowercase English language name,… |
944
959
 
945
960
  **Examples**
946
961
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAE,MAAM,WAAW,CAAA;AA2CzC,wBAAgB,SAAS,IAAI,GAAG,CAkE/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAE,MAAM,WAAW,CAAA;AA4CzC,wBAAgB,SAAS,IAAI,GAAG,CAmE/B"}
@@ -6,6 +6,7 @@ import { AuthHelpCommand, SignatureCommand, SmartCdnSignatureCommand, TokenComma
6
6
  import { BillsGetCommand } from "./bills.js";
7
7
  import { DocsRobotsGetCommand, DocsRobotsListCommand } from "./docs.js";
8
8
  import { ImageInitCommand } from "./image.js";
9
+ import { InitCommand } from "./init.js";
9
10
  import { AuthLoginCommand, AuthLogoutCommand, AuthStatusCommand } from "./login.js";
10
11
  import { NotificationsReplayCommand } from "./notifications.js";
11
12
  import { StorageListCommand, StoragePublicationsCommand, StoragePublishCommand, StorageReceiptsSyncCommand, StorageStoreCommand, StorageUnpublishCommand, } from "./storage.js";
@@ -20,6 +21,7 @@ export function createCli() {
20
21
  // Built-in commands
21
22
  cli.register(Builtins.HelpCommand);
22
23
  cli.register(Builtins.VersionCommand);
24
+ cli.register(InitCommand);
23
25
  // Auth commands (signature generation)
24
26
  cli.register(AuthHelpCommand);
25
27
  cli.register(SignatureCommand);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,WAAW,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAq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CAA2C;IAC3C,GAAG,CAAC,QAAQ,CAAC,kCAAkC,CAAC,CAAA;IAChD,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAExB,4CAA4C;IAC5C,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAA;IACnC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA;IAElC,wBAAwB;IACxB,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE,CAAC;QACrC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACvB,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { UnauthenticatedCommand } from './BaseCommand.ts';
2
+ /** Creates the shipped, tested example without uploading or changing an existing project. */
3
+ export declare class InitCommand extends UnauthenticatedCommand {
4
+ static paths: string[][];
5
+ static usage: import("clipanion").Usage;
6
+ example: string;
7
+ directory: string;
8
+ install: boolean;
9
+ protected run(): Promise<number | undefined>;
10
+ }
11
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,6FAA6F;AAC7F,qBAAa,WAAY,SAAQ,sBAAsB;IACrD,OAAgB,KAAK,aAAa;IAClC,OAAgB,KAAK,4BAInB;IAEF,OAAO,SAAoC;IAC3C,SAAS,SAAoC;IAC7C,OAAO,UAEL;cAEc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAsFnD"}
@@ -0,0 +1,87 @@
1
+ import { constants } from 'node:fs';
2
+ import { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
3
+ import { join, resolve } from 'node:path';
4
+ import { Command, Option } from 'clipanion';
5
+ import { execa } from 'execa';
6
+ import packageJson from '../../../package.json' with { type: 'json' };
7
+ import { quoteCliArgument } from "../helpers.js";
8
+ import { isErrnoException } from "../types.js";
9
+ import { UnauthenticatedCommand } from "./BaseCommand.js";
10
+ /** Creates the shipped, tested example without uploading or changing an existing project. */
11
+ export class InitCommand extends UnauthenticatedCommand {
12
+ static paths = [['init']];
13
+ static usage = Command.Usage({
14
+ category: 'Getting started',
15
+ description: 'Create a runnable upload-once example in a new directory',
16
+ examples: [['Create an example', 'transloadit init upload-once my-gallery']],
17
+ });
18
+ example = Option.String({ required: true });
19
+ directory = Option.String({ required: true });
20
+ install = Option.Boolean('--install', true, {
21
+ description: 'Install dependencies with npm; --no-install only creates the files',
22
+ });
23
+ async run() {
24
+ if (this.example !== 'upload-once') {
25
+ this.output.error('Available example: upload-once. Run transloadit init upload-once my-gallery.');
26
+ return 1;
27
+ }
28
+ const destination = resolve(this.directory);
29
+ const example = new URL('../../../examples/upload-once/', import.meta.url);
30
+ const manifest = {
31
+ name: 'transloadit-upload-once',
32
+ private: true,
33
+ type: 'module',
34
+ scripts: { demo: 'node demo.ts' },
35
+ engines: { node: '^24.15.0 || >=26.0.0' },
36
+ dependencies: {
37
+ // The linked node/legacy release group has packed-fixture coverage for version parity.
38
+ '@transloadit/node': packageJson.version,
39
+ execa: packageJson.dependencies.execa,
40
+ zod: packageJson.dependencies.zod,
41
+ },
42
+ devDependencies: { '@types/node': packageJson.devDependencies['@types/node'] },
43
+ };
44
+ try {
45
+ // Read the release's example before creating anything. Never fetch mutable tutorial code.
46
+ const files = await Promise.all(['demo.ts', 'README.md'].map(async (name) => ({
47
+ name,
48
+ content: await readFile(new URL(name, example)),
49
+ })));
50
+ await mkdir(destination);
51
+ for (const { name, content } of files)
52
+ await writeFile(join(destination, name), content, { flag: 'wx' });
53
+ await copyFile(new URL('../fixtures/berkley.jpg', example), join(destination, 'photo.jpg'), constants.COPYFILE_EXCL);
54
+ await writeFile(join(destination, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`, {
55
+ flag: 'wx',
56
+ });
57
+ await writeFile(join(destination, '.gitignore'), 'node_modules/\n.env*\ngallery.html\ntransloadit.images.json\ntransloadit-images.d.ts\n', { flag: 'wx' });
58
+ }
59
+ catch (error) {
60
+ this.output.error(isErrnoException(error) && error.code === 'EEXIST'
61
+ ? 'The destination already exists. Choose a new directory; existing files were not overwritten.'
62
+ : 'Could not create the example. Check the parent directory and permissions; partial files are kept for inspection.');
63
+ return 1;
64
+ }
65
+ // Manual recovery must keep the same workspace/lifecycle isolation as the automatic install.
66
+ const manualInstall = 'npm install --prefix . --ignore-scripts';
67
+ if (this.install) {
68
+ const result = await execa('npm',
69
+ // An explicit prefix prevents npm from modifying an ancestor workspace's lockfile.
70
+ ['install', '--prefix', destination, '--ignore-scripts', '--no-audit', '--no-fund'], {
71
+ cwd: destination,
72
+ stdin: 'ignore',
73
+ stdout: this.json ? 'ignore' : 'inherit',
74
+ stderr: 'inherit',
75
+ timeout: 120_000,
76
+ reject: false,
77
+ });
78
+ if (result.failed) {
79
+ this.output.error(`Dependency installation failed. The example is saved; run ${manualInstall} in its directory, then npm run demo.`);
80
+ return 1;
81
+ }
82
+ }
83
+ this.output.print(`Created ${destination}. No files were uploaded or published.\n\ncd ${quoteCliArgument(destination)}\n${this.install ? '' : `${manualInstall}\n`}npm run demo\n\nThe demo opens browser login when needed, then uploads one image. Storage must be enabled for your workspace.`, { directory: destination, example: this.example, installed: this.install });
84
+ return undefined;
85
+ }
86
+ }
87
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,C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AC,EAAE,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,+HAA+H,EAC/Q,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,CAC3E,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC"}
@@ -12,6 +12,7 @@ export declare class AuthLoginCommand extends UnauthenticatedCommand {
12
12
  export declare class AuthStatusCommand extends UnauthenticatedCommand {
13
13
  static paths: string[][];
14
14
  static usage: import("clipanion").Usage;
15
+ effective: boolean;
15
16
  protected run(): Promise<number | undefined>;
16
17
  }
17
18
  /** Revokes browser-login keys; imported application keys need explicit revocation consent. */
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAuCzD,yFAAyF;AACzF,qBAAa,gBAAiB,SAAQ,sBAAsB;IAC1D,OAAgB,KAAK,aAAsB;IAC3C,OAAgB,KAAK,4BAKnB;IAEF,KAAK,UAGH;IACF,SAAS,UAEP;IACF,OAAO,UAEL;cAEc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CA+JnD;AAED,gEAAgE;AAChE,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAgB,KAAK,aAAuB;IAC5C,OAAgB,KAAK,4BAGnB;IACF,SAAS,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAe7C;AAED,8FAA8F;AAC9F,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAgB,KAAK,aAAuB;IAC5C,OAAgB,KAAK,4BAGnB;IACF,MAAM,sBAEJ;cACc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAyDnD"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAuCzD,yFAAyF;AACzF,qBAAa,gBAAiB,SAAQ,sBAAsB;IAC1D,OAAgB,KAAK,aAAsB;IAC3C,OAAgB,KAAK,4BAKnB;IAEF,KAAK,UAGH;IACF,SAAS,UAEP;IACF,OAAO,UAEL;cAEc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CA+JnD;AAED,gEAAgE;AAChE,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAgB,KAAK,aAAuB;IAC5C,OAAgB,KAAK,4BAGnB;IACF,SAAS,UAGP;cAEc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAiDnD;AAED,8FAA8F;AAC9F,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAgB,KAAK,aAAuB;IAC5C,OAAgB,KAAK,4BAGnB;IACF,MAAM,sBAEJ;cACc,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAyDnD"}
@@ -204,16 +204,45 @@ export class AuthStatusCommand extends UnauthenticatedCommand {
204
204
  category: 'Authentication',
205
205
  description: 'Show the saved CLI workspace and key description',
206
206
  });
207
- run() {
207
+ effective = Option.Boolean('--effective', false, {
208
+ description: 'Check effective key-pair configuration, including environment overrides (offline)',
209
+ });
210
+ async run() {
211
+ if (this.effective) {
212
+ const config = resolveCliConfig();
213
+ // Match requireCliCredentials: a usable pair takes precedence over a broken fallback file.
214
+ if (config.credentials == null && (config.loadError != null || config.auth != null)) {
215
+ this.output.error('The effective signing credentials are incomplete or invalid. Check your shell, project .env and saved credentials before logging in again.');
216
+ return 1;
217
+ }
218
+ const configured = config.credentials != null;
219
+ // Login never overwrites an existing file implicitly, even if it has no usable key pair.
220
+ if (!configured) {
221
+ const saved = await lstat(getConfiguredCredentialsFilePath('shell')).catch((error) => {
222
+ if (isErrnoException(error) && error.code === 'ENOENT')
223
+ return undefined;
224
+ throw error;
225
+ });
226
+ if (saved !== undefined) {
227
+ this.output.error('The saved credentials file has no usable key pair. It was preserved. Choose a separate TRANSLOADIT_CREDENTIALS_FILE for browser login, or use auth login --replace only if you intend to replace it.');
228
+ return 1;
229
+ }
230
+ }
231
+ const source = config.credentialsSource ?? null;
232
+ this.output.print(configured
233
+ ? `Key pair configured from ${source}; remote access has not been checked.`
234
+ : 'No key pair configured.', { configured, source });
235
+ return undefined;
236
+ }
208
237
  const config = resolveCliConfig('login');
209
238
  if (config.credentials === undefined) {
210
239
  this.output.error(config.loadError ?? 'Not logged in. Run transloadit auth login.');
211
- return Promise.resolve(1);
240
+ return 1;
212
241
  }
213
242
  const workspace = config.credentialsWorkspace ?? 'not recorded';
214
243
  const description = config.credentialsDescription ?? 'Existing Auth Key (description not recorded)';
215
244
  this.output.print(`Saved login: ${workspace}\n${description}\nStorage commands report any shell or project credential override before use.`, { workspace, description });
216
- return Promise.resolve(undefined);
245
+ return undefined;
217
246
  }
218
247
  }
219
248
  /** Revokes browser-login keys; imported application keys need explicit revocation consent. */
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM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ACvF,MAAM,IAAI,WAAW,CAAC,EAAE,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;qBACvF,gBAAgB,EAAE;qBAClB,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;oBACxB,MAAM,IAAI,KAAK,CACb,yHAAyH,EACzH,EAAE,KAAK,EAAE,CACV,CAAA;gBACH,CAAC,CAAC,CAAA;YACN,CAAC;YACD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,MAAM;gBAC5E,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,KAAK,2DAA2D,CAC9G,CAAA;YACH,MAAM,EAAE,CAAC,IAAI,CAAC,CAAA;YACd,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM;gBACJ,CAAC,CAAC,gDAAgD;gBAClD,CAAC,CAAC,iEAAiE,EACrE;gBACE,OAAO,EAAE,MAAM;gBACf,OAAO,EAAE,IAAI;aACd,CACF,CAAA;YACD,OAAO,SAAS,CAAA;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,gBAAgB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;gBAChD,CAAC,CAAC,2CAA2C;gBAC7C,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAC/B,CAAA;YACD,OAAO,CAAC,CAAA;QACV,CAAC;IACH,CAAC"}
@@ -37,9 +37,9 @@ export declare const speechTranscribeSemanticIntentDescriptor: {
37
37
  readonly kind: "string";
38
38
  readonly propertyName: "targetLanguage";
39
39
  readonly optionFlags: "--target-language";
40
- readonly description: "Target written language for providers that support translation.";
40
+ readonly description: string;
41
41
  readonly required: false;
42
- readonly exampleValue: "en-US";
42
+ readonly exampleValue: "french";
43
43
  }];
44
44
  };
45
45
  readonly inputPolicy: {
@@ -48,7 +48,9 @@ export declare const speechTranscribeSemanticIntentDescriptor: {
48
48
  readonly outputDescription: "Write the transcript to this path or directory";
49
49
  readonly presentation: {
50
50
  readonly description: "Transcribe speech in audio or video files";
51
- readonly details: "Runs `/speech/transcribe` with a text-first default and writes the transcript to `--output`.";
51
+ readonly details: `Runs \`/speech/transcribe\` with a text-first default and writes the transcript to \`--output\`.
52
+
53
+ \`--target-language\`: ${string}`;
52
54
  readonly examples: Array<[string, string]>;
53
55
  };
54
56
  readonly runnerKind: "watchable";
@@ -1 +1 @@
1
- {"version":3,"file":"speechTranscribe.d.ts","sourceRoot":"","sources":["../../../src/cli/semanticIntents/speechTranscribe.ts"],"names":[],"mappings":"AA+GA,iBAAS,0BAA0B,CACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAezB;AAED,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAxD9C,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;CAgEe,CAAA"}
1
+ {"version":3,"file":"speechTranscribe.d.ts","sourceRoot":"","sources":["../../../src/cli/semanticIntents/speechTranscribe.ts"],"names":[],"mappings":"AAyHA,iBAAS,0BAA0B,CACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAezB;AAED,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAxD9C,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;CAgEe,CAAA"}
@@ -1,8 +1,14 @@
1
+ import { robotSpeechTranscribeInstructionsSchema } from "../../alphalib/types/robots/speech-transcribe.js";
1
2
  import { parseOptionalEnumValue } from "./parsing.js";
2
3
  const speechTranscribeProviders = ['aws', 'gcp', 'replicate'];
3
4
  const speechTranscribeFormats = ['text', 'json', 'srt', 'webvtt'];
4
5
  const defaultSpeechTranscribeProvider = 'replicate';
5
6
  const defaultSpeechTranscribeFormat = 'text';
7
+ // Keep schema guidance canonical while displaying the CLI flag and a single aligned option line.
8
+ const targetLanguageDescription = (robotSpeechTranscribeInstructionsSchema.shape.target_language.description ?? '')
9
+ .replaceAll('`source_language`', '`--source-language`')
10
+ .replace(/\s+/g, ' ')
11
+ .trim();
6
12
  const speechTranscribeExecutionDefinition = {
7
13
  kind: 'dynamic-step',
8
14
  handler: 'speech-transcribe',
@@ -40,15 +46,18 @@ const speechTranscribeExecutionDefinition = {
40
46
  kind: 'string',
41
47
  propertyName: 'targetLanguage',
42
48
  optionFlags: '--target-language',
43
- description: 'Target written language for providers that support translation.',
49
+ description: targetLanguageDescription,
44
50
  required: false,
45
- exampleValue: 'en-US',
51
+ exampleValue: 'french',
46
52
  },
47
53
  ],
48
54
  };
49
55
  const speechTranscribeCommandPresentation = {
50
56
  description: 'Transcribe speech in audio or video files',
51
- details: 'Runs `/speech/transcribe` with a text-first default and writes the transcript to `--output`.',
57
+ // Option tables abbreviate descriptions, so keep the complete language guidance in the details.
58
+ details: `Runs \`/speech/transcribe\` with a text-first default and writes the transcript to \`--output\`.
59
+
60
+ \`--target-language\`: ${targetLanguageDescription}`,
52
61
  examples: [
53
62
  [
54
63
  'Transcribe an audio file to text',
@@ -1 +1 @@
1
- {"version":3,"file":"speechTranscribe.js","sourceRoot":"","sources":["../../../src/cli/semanticIntents/speechTranscribe.ts"],"names":[],"mappings":"AAM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,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvE,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,wCAAwC,GAAG;IACtD,UAAU,EAAE,0BAA0B;IACtC,iBAAiB,EAAE,YAAY;IAC/B,SAAS,EAAE,mCAAmC;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IACjC,iBAAiB,EAAE,gDAAgD;IACnE,YAAY,EAAE,mCAAmC;IACjD,UAAU,EAAE,WAAW;CACoB,CAAA"}
Binary file
@@ -0,0 +1,61 @@
1
+ # Upload once, transform forever
2
+
3
+ Store one original and display three sizes, crops and formats through the Smart CDN. No custom
4
+ Template, framework, AWS CLI or copied API secrets are required. You need Node.js 24.15+ (or 26+)
5
+ and a [Storage-enabled workspace](https://transloadit.com/support/).
6
+
7
+ ```bash
8
+ npx @transloadit/node@latest init upload-once my-gallery
9
+ cd my-gallery
10
+ npm run demo
11
+ ```
12
+
13
+ The initializer creates a **new** directory and installs compatible dependencies. It does not
14
+ upload, publish a directory or change existing project files. Use `--no-install` to install later.
15
+
16
+ The demo uses configured CLI credentials or opens browser login when none are configured, checks Storage policy access,
17
+ and uploads the bundled photo through `storage store --hashed`. Open `gallery.html` to see the
18
+ three variants. The policy check is not a guarantee that an upload will succeed.
19
+
20
+ Change `variants` near the top of `demo.ts` and rerun `npm run demo`: the CLI's catalog and checksum
21
+ checks reuse the matching original. To try your own photo:
22
+
23
+ ```bash
24
+ npm run demo -- ./your-photo.jpg
25
+ ```
26
+
27
+ If browser authorization did not finish, run `npm exec -- transloadit auth login` in the example
28
+ directory. For other failures, the demo names the failed step without exposing transport errors
29
+ that could contain signed URLs; check your photo, Storage access and saved catalog before retrying.
30
+
31
+ The CLI saves the full asset/version receipt in `transloadit.images.json`. Keep this local-only,
32
+ gitignored catalog: deleting it or cloning the project elsewhere loses the local proof used to skip
33
+ uploads. It is intentionally not a shared app database. An occupied remote path is never silently
34
+ overwritten; recover its catalog before retrying after an uncertain upload result.
35
+
36
+ `auth smart-cdn` uses the SDK's signer and `builtin/storage-preview@0.0.3`; the example contains no
37
+ custom signer or processing pipeline. `v` is the returned Storage version ID, not a cachebuster.
38
+ The first request for a variant renders it; later requests can use the cached output. The HTML
39
+ contains one-to-two-hour signed access URLs, not keys. Regenerate it when they expire and keep it
40
+ private. Nothing is published by this example, but an already-public destination stays public.
41
+
42
+ ## From a local demo to an application
43
+
44
+ The normal CLI credential precedence still applies: shell, project `.env`, then saved login.
45
+ Storage commands report which source they use and reject a different catalog workspace.
46
+ Browser login creates a CLI key; `auth logout` revokes it. **Do not deploy that key.** Provision
47
+ separate application upload credentials and a signing-only `smart_cdn:sign` delivery key. Check
48
+ your application's authorization before signing, and never accept arbitrary asset IDs to sign.
49
+
50
+ - [Node SDK: store an image](https://github.com/transloadit/node-sdk/tree/main/packages/node#store-an-image)
51
+ for server-side uploads instead of CLI seeding.
52
+ - [React/Next.js images and Viewer](https://github.com/transloadit/node-sdk/tree/main/packages/img)
53
+ for responsive rendering, loading states and galleries. Existing Next.js apps can use
54
+ `transloadit image init website/ --example`; this standalone example does not modify your app.
55
+ - [Convex wedding gallery](https://github.com/transloadit/convex#example-app-nextjs--uppy-wedding-gallery)
56
+ for user uploads, live receipt queries and authorized photo/video delivery. Guest access,
57
+ webhook ownership, invitation rules and retention remain application responsibilities.
58
+
59
+ This directory is the canonical example shipped in `@transloadit/node`. The CLI copies these
60
+ files, and CI executes them. The blog and integration guides link here instead of maintaining
61
+ their own upload or rendering scripts. The bundled photo reuses the SDK's existing fixture.
@@ -0,0 +1,128 @@
1
+ import { writeFile } from 'node:fs/promises'
2
+ import { fileURLToPath } from 'node:url'
3
+
4
+ import { execa } from 'execa'
5
+ import { z } from 'zod'
6
+
7
+ // Edit these, then rerun npm run demo. Matching originals are not uploaded again.
8
+ const variants = [
9
+ { label: 'WebP card', w: 640, h: 480, f: 'webp', r: 'pad' },
10
+ { label: 'AVIF image', w: 1280, h: 960, f: 'avif', r: 'pad' },
11
+ { label: 'Square JPEG thumbnail', w: 240, h: 240, f: 'jpg', r: 'fillcrop' },
12
+ ]
13
+
14
+ const cliPath = fileURLToPath(
15
+ new URL('./dist/cli.js', import.meta.resolve('@transloadit/node/package.json')),
16
+ )
17
+ const cli = execa({ reject: false, timeout: 300_000 })
18
+ let stage = 'checking CLI credentials; check your shell, project .env and saved login'
19
+
20
+ async function command(args: string[], input?: string): Promise<string> {
21
+ stage = `running ${args[0]} ${args[1]}`
22
+ // Capture both streams: transport failures can contain signed request URLs, even on stderr.
23
+ const result = await cli(process.execPath, [cliPath, ...args], { input })
24
+ if (result.failed) throw new Error('CLI command failed')
25
+ return result.stdout.trim()
26
+ }
27
+
28
+ function escapeHtml(text: string): string {
29
+ return text
30
+ .replaceAll('&', '&amp;')
31
+ .replaceAll('"', '&quot;')
32
+ .replaceAll('<', '&lt;')
33
+ .replaceAll('>', '&gt;')
34
+ }
35
+
36
+ async function main(): Promise<void> {
37
+ // The CLI owns login, credential precedence and workspace verification. Never copy its key
38
+ // into an application or expose it in generated HTML. Logout revokes browser-login keys.
39
+ const status = await cli(process.execPath, [cliPath, 'auth', 'status', '--effective', '--json'])
40
+ if (status.failed) throw new Error('Credential configuration failed')
41
+ const config = z
42
+ .object({ configured: z.boolean(), source: z.string().nullable().optional() })
43
+ .parse(JSON.parse(status.stdout))
44
+ if (!config.configured) {
45
+ stage = 'logging in; run npm exec -- transloadit auth login to complete browser authorization'
46
+ // Device authorization enforces its own deadline; do not cut off a browser signup early.
47
+ const login = await cli(process.execPath, [cliPath, 'auth', 'login'], {
48
+ stdio: 'inherit',
49
+ timeout: 0,
50
+ })
51
+ if (login.failed) throw new Error('Login did not finish')
52
+ } else {
53
+ console.log(`Using CLI credentials from ${config.source ?? 'the configured source'}.`)
54
+ }
55
+
56
+ console.log('Checking Storage access…')
57
+ await command(['storage', 'publications', '--json'])
58
+ console.log('Storing the original, or reusing its saved receipt…')
59
+ const output = await command([
60
+ 'storage',
61
+ 'store',
62
+ '--hashed',
63
+ '--json',
64
+ '--',
65
+ process.argv[2] ?? './photo.jpg',
66
+ 'upload-once/',
67
+ ])
68
+ // These are the fields this example needs, not a replacement for the SDK's receipt validation.
69
+ const image = z
70
+ .object({
71
+ workspace: z.string().min(1),
72
+ asset_id: z.string().min(1),
73
+ version_id: z.string().min(1),
74
+ })
75
+ .parse(JSON.parse(output))
76
+ const HOUR = 60 * 60 * 1000
77
+ const expiresAt = (Math.floor(Date.now() / HOUR) + 2) * HOUR
78
+ const figures = []
79
+ for (const { label, w, h, f, r } of variants) {
80
+ const url = await command(
81
+ ['auth', 'smart-cdn'],
82
+ JSON.stringify({
83
+ workspace: image.workspace,
84
+ template: 'builtin/storage-preview@0.0.3',
85
+ input: image.asset_id,
86
+ expire_at_ms: expiresAt,
87
+ url_params: { v: image.version_id, w, h, f, r, q: 75 },
88
+ }),
89
+ )
90
+ figures.push(
91
+ `<figure><img src="${escapeHtml(url)}" width="${w}" height="${h}" alt="${escapeHtml(label)}"><figcaption>${escapeHtml(label)}</figcaption></figure>`,
92
+ )
93
+ }
94
+ stage = 'writing gallery.html; check that the current directory is writable'
95
+ await writeFile(
96
+ 'gallery.html',
97
+ `<!doctype html>
98
+ <html lang="en">
99
+ <head>
100
+ <meta charset="utf-8">
101
+ <meta name="viewport" content="width=device-width, initial-scale=1">
102
+ <meta name="referrer" content="no-referrer">
103
+ <title>One original, three variants</title>
104
+ <style>
105
+ :root { color-scheme: light dark; }
106
+ body { font: 1rem system-ui; max-width: 80rem; margin: 2rem auto; padding: 0 1rem; }
107
+ main { display: flex; flex-wrap: wrap; align-items: start; gap: 1rem; }
108
+ figure { margin: 0; max-width: 30rem; }
109
+ img { display: block; max-width: 100%; height: auto; }
110
+ </style>
111
+ </head>
112
+ <body><h1>One original, three variants</h1><main>${figures.join('\n')}</main></body>
113
+ </html>
114
+ `,
115
+ { mode: 0o600 },
116
+ )
117
+ console.log(
118
+ 'Open gallery.html in your browser. It contains temporary access URLs; keep it private.\nChange variants in demo.ts and rerun npm run demo, or try npm run demo -- ./your-photo.jpg.',
119
+ )
120
+ }
121
+
122
+ await main().catch(() => {
123
+ // Subprocess errors may contain signed URLs; never print the error object or its stdout.
124
+ console.error(
125
+ `Demo stopped while ${stage}. Check Storage access, your local photo and transloadit.images.json before retrying; an upload may already have succeeded. Raw transport errors are withheld because they can contain signed URLs.`,
126
+ )
127
+ process.exitCode = 1
128
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "transloadit",
3
- "version": "6.0.3",
3
+ "version": "6.1.0",
4
4
  "description": "Node.js SDK for Transloadit",
5
5
  "homepage": "https://github.com/transloadit/node-sdk/tree/main/packages/node",
6
6
  "bugs": {
@@ -90,7 +90,9 @@
90
90
  },
91
91
  "files": [
92
92
  "dist",
93
- "src"
93
+ "src",
94
+ "examples/upload-once",
95
+ "examples/fixtures/berkley.jpg"
94
96
  ],
95
97
  "bin": "./dist/cli.js"
96
98
  }
@@ -21,6 +21,7 @@ import {
21
21
  import { BillsGetCommand } from './bills.ts'
22
22
  import { DocsRobotsGetCommand, DocsRobotsListCommand } from './docs.ts'
23
23
  import { ImageInitCommand } from './image.ts'
24
+ import { InitCommand } from './init.ts'
24
25
  import { AuthLoginCommand, AuthLogoutCommand, AuthStatusCommand } from './login.ts'
25
26
  import { NotificationsReplayCommand } from './notifications.ts'
26
27
  import {
@@ -51,6 +52,7 @@ export function createCli(): Cli {
51
52
  // Built-in commands
52
53
  cli.register(Builtins.HelpCommand)
53
54
  cli.register(Builtins.VersionCommand)
55
+ cli.register(InitCommand)
54
56
 
55
57
  // Auth commands (signature generation)
56
58
  cli.register(AuthHelpCommand)
@@ -0,0 +1,114 @@
1
+ import { constants } from 'node:fs'
2
+ import { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises'
3
+ import { join, resolve } from 'node:path'
4
+
5
+ import { Command, Option } from 'clipanion'
6
+ import { execa } from 'execa'
7
+
8
+ import packageJson from '../../../package.json' with { type: 'json' }
9
+ import { quoteCliArgument } from '../helpers.ts'
10
+ import { isErrnoException } from '../types.ts'
11
+ import { UnauthenticatedCommand } from './BaseCommand.ts'
12
+
13
+ /** Creates the shipped, tested example without uploading or changing an existing project. */
14
+ export class InitCommand extends UnauthenticatedCommand {
15
+ static override paths = [['init']]
16
+ static override usage = Command.Usage({
17
+ category: 'Getting started',
18
+ description: 'Create a runnable upload-once example in a new directory',
19
+ examples: [['Create an example', 'transloadit init upload-once my-gallery']],
20
+ })
21
+
22
+ example = Option.String({ required: true })
23
+ directory = Option.String({ required: true })
24
+ install = Option.Boolean('--install', true, {
25
+ description: 'Install dependencies with npm; --no-install only creates the files',
26
+ })
27
+
28
+ protected async run(): Promise<number | undefined> {
29
+ if (this.example !== 'upload-once') {
30
+ this.output.error(
31
+ 'Available example: upload-once. Run transloadit init upload-once my-gallery.',
32
+ )
33
+ return 1
34
+ }
35
+ const destination = resolve(this.directory)
36
+ const example = new URL('../../../examples/upload-once/', import.meta.url)
37
+ const manifest = {
38
+ name: 'transloadit-upload-once',
39
+ private: true,
40
+ type: 'module',
41
+ scripts: { demo: 'node demo.ts' },
42
+ engines: { node: '^24.15.0 || >=26.0.0' },
43
+ dependencies: {
44
+ // The linked node/legacy release group has packed-fixture coverage for version parity.
45
+ '@transloadit/node': packageJson.version,
46
+ execa: packageJson.dependencies.execa,
47
+ zod: packageJson.dependencies.zod,
48
+ },
49
+ devDependencies: { '@types/node': packageJson.devDependencies['@types/node'] },
50
+ }
51
+
52
+ try {
53
+ // Read the release's example before creating anything. Never fetch mutable tutorial code.
54
+ const files = await Promise.all(
55
+ ['demo.ts', 'README.md'].map(async (name) => ({
56
+ name,
57
+ content: await readFile(new URL(name, example)),
58
+ })),
59
+ )
60
+ await mkdir(destination)
61
+ for (const { name, content } of files)
62
+ await writeFile(join(destination, name), content, { flag: 'wx' })
63
+ await copyFile(
64
+ new URL('../fixtures/berkley.jpg', example),
65
+ join(destination, 'photo.jpg'),
66
+ constants.COPYFILE_EXCL,
67
+ )
68
+ await writeFile(join(destination, 'package.json'), `${JSON.stringify(manifest, null, 2)}\n`, {
69
+ flag: 'wx',
70
+ })
71
+ await writeFile(
72
+ join(destination, '.gitignore'),
73
+ 'node_modules/\n.env*\ngallery.html\ntransloadit.images.json\ntransloadit-images.d.ts\n',
74
+ { flag: 'wx' },
75
+ )
76
+ } catch (error) {
77
+ this.output.error(
78
+ isErrnoException(error) && error.code === 'EEXIST'
79
+ ? 'The destination already exists. Choose a new directory; existing files were not overwritten.'
80
+ : 'Could not create the example. Check the parent directory and permissions; partial files are kept for inspection.',
81
+ )
82
+ return 1
83
+ }
84
+
85
+ // Manual recovery must keep the same workspace/lifecycle isolation as the automatic install.
86
+ const manualInstall = 'npm install --prefix . --ignore-scripts'
87
+ if (this.install) {
88
+ const result = await execa(
89
+ 'npm',
90
+ // An explicit prefix prevents npm from modifying an ancestor workspace's lockfile.
91
+ ['install', '--prefix', destination, '--ignore-scripts', '--no-audit', '--no-fund'],
92
+ {
93
+ cwd: destination,
94
+ stdin: 'ignore',
95
+ stdout: this.json ? 'ignore' : 'inherit',
96
+ stderr: 'inherit',
97
+ timeout: 120_000,
98
+ reject: false,
99
+ },
100
+ )
101
+ if (result.failed) {
102
+ this.output.error(
103
+ `Dependency installation failed. The example is saved; run ${manualInstall} in its directory, then npm run demo.`,
104
+ )
105
+ return 1
106
+ }
107
+ }
108
+ this.output.print(
109
+ `Created ${destination}. No files were uploaded or published.\n\ncd ${quoteCliArgument(destination)}\n${this.install ? '' : `${manualInstall}\n`}npm run demo\n\nThe demo opens browser login when needed, then uploads one image. Storage must be enabled for your workspace.`,
110
+ { directory: destination, example: this.example, installed: this.install },
111
+ )
112
+ return undefined
113
+ }
114
+ }
@@ -247,11 +247,50 @@ export class AuthStatusCommand extends UnauthenticatedCommand {
247
247
  category: 'Authentication',
248
248
  description: 'Show the saved CLI workspace and key description',
249
249
  })
250
- protected run(): Promise<number | undefined> {
250
+ effective = Option.Boolean('--effective', false, {
251
+ description:
252
+ 'Check effective key-pair configuration, including environment overrides (offline)',
253
+ })
254
+
255
+ protected async run(): Promise<number | undefined> {
256
+ if (this.effective) {
257
+ const config = resolveCliConfig()
258
+ // Match requireCliCredentials: a usable pair takes precedence over a broken fallback file.
259
+ if (config.credentials == null && (config.loadError != null || config.auth != null)) {
260
+ this.output.error(
261
+ 'The effective signing credentials are incomplete or invalid. Check your shell, project .env and saved credentials before logging in again.',
262
+ )
263
+ return 1
264
+ }
265
+ const configured = config.credentials != null
266
+ // Login never overwrites an existing file implicitly, even if it has no usable key pair.
267
+ if (!configured) {
268
+ const saved = await lstat(getConfiguredCredentialsFilePath('shell')).catch(
269
+ (error: unknown) => {
270
+ if (isErrnoException(error) && error.code === 'ENOENT') return undefined
271
+ throw error
272
+ },
273
+ )
274
+ if (saved !== undefined) {
275
+ this.output.error(
276
+ 'The saved credentials file has no usable key pair. It was preserved. Choose a separate TRANSLOADIT_CREDENTIALS_FILE for browser login, or use auth login --replace only if you intend to replace it.',
277
+ )
278
+ return 1
279
+ }
280
+ }
281
+ const source = config.credentialsSource ?? null
282
+ this.output.print(
283
+ configured
284
+ ? `Key pair configured from ${source}; remote access has not been checked.`
285
+ : 'No key pair configured.',
286
+ { configured, source },
287
+ )
288
+ return undefined
289
+ }
251
290
  const config = resolveCliConfig('login')
252
291
  if (config.credentials === undefined) {
253
292
  this.output.error(config.loadError ?? 'Not logged in. Run transloadit auth login.')
254
- return Promise.resolve(1)
293
+ return 1
255
294
  }
256
295
  const workspace = config.credentialsWorkspace ?? 'not recorded'
257
296
  const description =
@@ -260,7 +299,7 @@ export class AuthStatusCommand extends UnauthenticatedCommand {
260
299
  `Saved login: ${workspace}\n${description}\nStorage commands report any shell or project credential override before use.`,
261
300
  { workspace, description },
262
301
  )
263
- return Promise.resolve(undefined)
302
+ return undefined
264
303
  }
265
304
  }
266
305
 
@@ -4,6 +4,7 @@ import type {
4
4
  } from '../intentRuntime.ts'
5
5
  import type { SemanticIntentDescriptor, SemanticIntentPresentation } from './index.ts'
6
6
 
7
+ import { robotSpeechTranscribeInstructionsSchema } from '../../alphalib/types/robots/speech-transcribe.ts'
7
8
  import { parseOptionalEnumValue } from './parsing.ts'
8
9
 
9
10
  const speechTranscribeProviders = ['aws', 'gcp', 'replicate'] as const
@@ -14,6 +15,13 @@ type SpeechTranscribeFormat = (typeof speechTranscribeFormats)[number]
14
15
 
15
16
  const defaultSpeechTranscribeProvider = 'replicate' satisfies SpeechTranscribeProvider
16
17
  const defaultSpeechTranscribeFormat = 'text' satisfies SpeechTranscribeFormat
18
+ // Keep schema guidance canonical while displaying the CLI flag and a single aligned option line.
19
+ const targetLanguageDescription = (
20
+ robotSpeechTranscribeInstructionsSchema.shape.target_language.description ?? ''
21
+ )
22
+ .replaceAll('`source_language`', '`--source-language`')
23
+ .replace(/\s+/g, ' ')
24
+ .trim()
17
25
 
18
26
  const speechTranscribeExecutionDefinition = {
19
27
  kind: 'dynamic-step',
@@ -53,17 +61,19 @@ const speechTranscribeExecutionDefinition = {
53
61
  kind: 'string',
54
62
  propertyName: 'targetLanguage',
55
63
  optionFlags: '--target-language',
56
- description: 'Target written language for providers that support translation.',
64
+ description: targetLanguageDescription,
57
65
  required: false,
58
- exampleValue: 'en-US',
66
+ exampleValue: 'french',
59
67
  },
60
68
  ] as const satisfies readonly IntentOptionDefinition[],
61
69
  } satisfies IntentDynamicStepExecutionDefinition
62
70
 
63
71
  const speechTranscribeCommandPresentation = {
64
72
  description: 'Transcribe speech in audio or video files',
65
- details:
66
- 'Runs `/speech/transcribe` with a text-first default and writes the transcript to `--output`.',
73
+ // Option tables abbreviate descriptions, so keep the complete language guidance in the details.
74
+ details: `Runs \`/speech/transcribe\` with a text-first default and writes the transcript to \`--output\`.
75
+
76
+ \`--target-language\`: ${targetLanguageDescription}`,
67
77
  examples: [
68
78
  [
69
79
  'Transcribe an audio file to text',