@vertana/cli 0.1.0-dev.10 → 0.1.0-dev.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.
- package/dist/index.cjs +16 -16
- package/dist/index.mjs +16 -16
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -400,13 +400,13 @@ const globalOptions = (0, _optique_core_constructs.object)({ logging: (0, _optiq
|
|
|
400
400
|
*/
|
|
401
401
|
const translateCommand = (0, _optique_core_primitives.command)("translate", (0, _optique_core_constructs.object)({
|
|
402
402
|
command: (0, _optique_core_primitives.constant)("translate"),
|
|
403
|
-
target: (0, _optique_core_primitives.option)("-t", "--target", (0, _optique_core_valueparser.string)({ metavar: "LANG" })),
|
|
404
|
-
source: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("-s", "--source", (0, _optique_core_valueparser.string)({ metavar: "LANG" }))),
|
|
403
|
+
target: (0, _optique_core_primitives.option)("-t", "--target", (0, _optique_core_valueparser.string)({ metavar: "LANG" }), { description: _optique_core_message.message`Target language code (e.g., ${"ko"}, ${"ja"}, ${"es"}).` }),
|
|
404
|
+
source: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("-s", "--source", (0, _optique_core_valueparser.string)({ metavar: "LANG" }), { description: _optique_core_message.message`Source language code. Auto-detected if omitted.` })),
|
|
405
405
|
mediaType: (0, _optique_core_modifiers.withDefault)((0, _optique_core_primitives.option)("-T", "--type", (0, _optique_core_valueparser.choice)([
|
|
406
406
|
"text/plain",
|
|
407
407
|
"text/markdown",
|
|
408
408
|
"text/html"
|
|
409
|
-
])), "text/plain"),
|
|
409
|
+
]), { description: _optique_core_message.message`Media type of the input text.` }), "text/plain"),
|
|
410
410
|
tone: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("--tone", (0, _optique_core_valueparser.choice)([
|
|
411
411
|
"formal",
|
|
412
412
|
"informal",
|
|
@@ -415,24 +415,24 @@ const translateCommand = (0, _optique_core_primitives.command)("translate", (0,
|
|
|
415
415
|
"professional",
|
|
416
416
|
"literary",
|
|
417
417
|
"journalistic"
|
|
418
|
-
]))),
|
|
419
|
-
domain: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("--domain", (0, _optique_core_valueparser.string)())),
|
|
420
|
-
glossary: (0, _optique_core_modifiers.multiple)((0, _optique_core_primitives.option)("-g", "--glossary", glossaryEntry())),
|
|
418
|
+
]), { description: _optique_core_message.message`Tone of the translation.` })),
|
|
419
|
+
domain: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("--domain", (0, _optique_core_valueparser.string)(), { description: _optique_core_message.message`Domain or context (e.g., ${"legal"}, ${"medical"}, ${"tech"}).` })),
|
|
420
|
+
glossary: (0, _optique_core_modifiers.multiple)((0, _optique_core_primitives.option)("-g", "--glossary", glossaryEntry(), { description: _optique_core_message.message`Term translation mapping. Can be repeated.` })),
|
|
421
421
|
glossaryFile: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("--glossary-file", (0, _optique_run_valueparser.path)({
|
|
422
422
|
mustExist: true,
|
|
423
423
|
type: "file"
|
|
424
|
-
}))),
|
|
424
|
+
}), { description: _optique_core_message.message`Path to a JSON file with glossary entries.` })),
|
|
425
425
|
fetchLinks: (0, _optique_core_primitives.option)("-L", "--fetch-links", { description: _optique_core_message.message`Fetch linked pages for additional context.` }),
|
|
426
|
-
output: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("-o", "--output", (0, _optique_run_valueparser.path)({ metavar: "FILE" }))),
|
|
427
|
-
input: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)((0, _optique_run_valueparser.path)({ metavar: "FILE" })))
|
|
428
|
-
}));
|
|
426
|
+
output: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.option)("-o", "--output", (0, _optique_run_valueparser.path)({ metavar: "FILE" }), { description: _optique_core_message.message`Output file path. Writes to stdout if omitted.` })),
|
|
427
|
+
input: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)((0, _optique_run_valueparser.path)({ metavar: "FILE" }), { description: _optique_core_message.message`Input file. Reads from stdin if omitted.` }))
|
|
428
|
+
}), { description: _optique_core_message.message`Translate text to another language using an LLM.` });
|
|
429
429
|
/**
|
|
430
430
|
* Parser for the "config model" subcommand.
|
|
431
431
|
*/
|
|
432
432
|
const configModelCommand = (0, _optique_core_primitives.command)("model", (0, _optique_core_constructs.object)({
|
|
433
433
|
subcommand: (0, _optique_core_primitives.constant)("model"),
|
|
434
|
-
value: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)(modelCode()))
|
|
435
|
-
}));
|
|
434
|
+
value: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)(modelCode(), { description: _optique_core_message.message`Model to configure in provider:model format.` }))
|
|
435
|
+
}), { description: _optique_core_message.message`Get or set the default LLM model.` });
|
|
436
436
|
/**
|
|
437
437
|
* Parser for the "config api-key" subcommand.
|
|
438
438
|
*/
|
|
@@ -442,16 +442,16 @@ const configApiKeyCommand = (0, _optique_core_primitives.command)("api-key", (0,
|
|
|
442
442
|
"openai",
|
|
443
443
|
"anthropic",
|
|
444
444
|
"google"
|
|
445
|
-
], { metavar: "PROVIDER" })),
|
|
446
|
-
key: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)((0, _optique_core_valueparser.string)({ metavar: "KEY" })))
|
|
447
|
-
}));
|
|
445
|
+
], { metavar: "PROVIDER" }), { description: _optique_core_message.message`Provider name.` }),
|
|
446
|
+
key: (0, _optique_core_modifiers.optional)((0, _optique_core_primitives.argument)((0, _optique_core_valueparser.string)({ metavar: "KEY" }), { description: _optique_core_message.message`API key value. Prompts if omitted.` }))
|
|
447
|
+
}), { description: _optique_core_message.message`Get or set an API key for a provider.` });
|
|
448
448
|
/**
|
|
449
449
|
* Parser for the "config" subcommand with nested subcommands.
|
|
450
450
|
*/
|
|
451
451
|
const configCommand = (0, _optique_core_primitives.command)("config", (0, _optique_core_constructs.object)({
|
|
452
452
|
command: (0, _optique_core_primitives.constant)("config"),
|
|
453
453
|
action: (0, _optique_core_constructs.or)(configModelCommand, configApiKeyCommand)
|
|
454
|
-
}));
|
|
454
|
+
}), { description: _optique_core_message.message`Configure CLI settings such as model and API keys.` });
|
|
455
455
|
/**
|
|
456
456
|
* The main CLI parser combining all subcommands.
|
|
457
457
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -372,13 +372,13 @@ const globalOptions = object({ logging: loggingOptions({ level: "verbosity" }) }
|
|
|
372
372
|
*/
|
|
373
373
|
const translateCommand = command("translate", object({
|
|
374
374
|
command: constant("translate"),
|
|
375
|
-
target: option("-t", "--target", string({ metavar: "LANG" })),
|
|
376
|
-
source: optional(option("-s", "--source", string({ metavar: "LANG" }))),
|
|
375
|
+
target: option("-t", "--target", string({ metavar: "LANG" }), { description: message`Target language code (e.g., ${"ko"}, ${"ja"}, ${"es"}).` }),
|
|
376
|
+
source: optional(option("-s", "--source", string({ metavar: "LANG" }), { description: message`Source language code. Auto-detected if omitted.` })),
|
|
377
377
|
mediaType: withDefault(option("-T", "--type", choice([
|
|
378
378
|
"text/plain",
|
|
379
379
|
"text/markdown",
|
|
380
380
|
"text/html"
|
|
381
|
-
])), "text/plain"),
|
|
381
|
+
]), { description: message`Media type of the input text.` }), "text/plain"),
|
|
382
382
|
tone: optional(option("--tone", choice([
|
|
383
383
|
"formal",
|
|
384
384
|
"informal",
|
|
@@ -387,24 +387,24 @@ const translateCommand = command("translate", object({
|
|
|
387
387
|
"professional",
|
|
388
388
|
"literary",
|
|
389
389
|
"journalistic"
|
|
390
|
-
]))),
|
|
391
|
-
domain: optional(option("--domain", string())),
|
|
392
|
-
glossary: multiple(option("-g", "--glossary", glossaryEntry())),
|
|
390
|
+
]), { description: message`Tone of the translation.` })),
|
|
391
|
+
domain: optional(option("--domain", string(), { description: message`Domain or context (e.g., ${"legal"}, ${"medical"}, ${"tech"}).` })),
|
|
392
|
+
glossary: multiple(option("-g", "--glossary", glossaryEntry(), { description: message`Term translation mapping. Can be repeated.` })),
|
|
393
393
|
glossaryFile: optional(option("--glossary-file", path({
|
|
394
394
|
mustExist: true,
|
|
395
395
|
type: "file"
|
|
396
|
-
}))),
|
|
396
|
+
}), { description: message`Path to a JSON file with glossary entries.` })),
|
|
397
397
|
fetchLinks: option("-L", "--fetch-links", { description: message`Fetch linked pages for additional context.` }),
|
|
398
|
-
output: optional(option("-o", "--output", path({ metavar: "FILE" }))),
|
|
399
|
-
input: optional(argument(path({ metavar: "FILE" })))
|
|
400
|
-
}));
|
|
398
|
+
output: optional(option("-o", "--output", path({ metavar: "FILE" }), { description: message`Output file path. Writes to stdout if omitted.` })),
|
|
399
|
+
input: optional(argument(path({ metavar: "FILE" }), { description: message`Input file. Reads from stdin if omitted.` }))
|
|
400
|
+
}), { description: message`Translate text to another language using an LLM.` });
|
|
401
401
|
/**
|
|
402
402
|
* Parser for the "config model" subcommand.
|
|
403
403
|
*/
|
|
404
404
|
const configModelCommand = command("model", object({
|
|
405
405
|
subcommand: constant("model"),
|
|
406
|
-
value: optional(argument(modelCode()))
|
|
407
|
-
}));
|
|
406
|
+
value: optional(argument(modelCode(), { description: message`Model to configure in provider:model format.` }))
|
|
407
|
+
}), { description: message`Get or set the default LLM model.` });
|
|
408
408
|
/**
|
|
409
409
|
* Parser for the "config api-key" subcommand.
|
|
410
410
|
*/
|
|
@@ -414,16 +414,16 @@ const configApiKeyCommand = command("api-key", object({
|
|
|
414
414
|
"openai",
|
|
415
415
|
"anthropic",
|
|
416
416
|
"google"
|
|
417
|
-
], { metavar: "PROVIDER" })),
|
|
418
|
-
key: optional(argument(string({ metavar: "KEY" })))
|
|
419
|
-
}));
|
|
417
|
+
], { metavar: "PROVIDER" }), { description: message`Provider name.` }),
|
|
418
|
+
key: optional(argument(string({ metavar: "KEY" }), { description: message`API key value. Prompts if omitted.` }))
|
|
419
|
+
}), { description: message`Get or set an API key for a provider.` });
|
|
420
420
|
/**
|
|
421
421
|
* Parser for the "config" subcommand with nested subcommands.
|
|
422
422
|
*/
|
|
423
423
|
const configCommand = command("config", object({
|
|
424
424
|
command: constant("config"),
|
|
425
425
|
action: or(configModelCommand, configApiKeyCommand)
|
|
426
|
-
}));
|
|
426
|
+
}), { description: message`Configure CLI settings such as model and API keys.` });
|
|
427
427
|
/**
|
|
428
428
|
* The main CLI parser combining all subcommands.
|
|
429
429
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertana/cli",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.12+b6c40594",
|
|
4
4
|
"description": "Command-line interface for Vertana translation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LLM",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@logtape/logtape": "^1.3.5",
|
|
61
61
|
"@napi-rs/keyring": "^1.2.0",
|
|
62
|
-
"@optique/core": "^0.8.
|
|
63
|
-
"@optique/logtape": "^0.8.
|
|
64
|
-
"@optique/run": "^0.8.
|
|
62
|
+
"@optique/core": "^0.8.5",
|
|
63
|
+
"@optique/logtape": "^0.8.5",
|
|
64
|
+
"@optique/run": "^0.8.5",
|
|
65
65
|
"@vertana/context-web": "",
|
|
66
66
|
"@vertana/facade": ""
|
|
67
67
|
},
|