Skip to content

Commit 681422d

Browse files
authored
refactor: enhance help text for CLI commands (#591)
1 parent 743d93e commit 681422d

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

.changeset/yellow-cherries-sin.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/cli/src/cli/cmd/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default new Command()
1111
.command("auth")
1212
.description("Authenticate with Lingo.dev API")
1313
.helpOption("-h, --help", "Show help")
14-
.option("--logout", "Delete existing authentication")
14+
.option("--logout", "Delete existing authentication and clear your saved API key")
1515
.option("--login", "Authenticate with Lingo.dev API")
1616
.action(async (options) => {
1717
try {

packages/cli/src/cli/cmd/cleanup.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export default new Command()
1414
.option("--locale <locale>", "Specific locale to cleanup")
1515
.option("--bucket <bucket>", "Specific bucket to cleanup")
1616
.option("--dry-run", "Show what would be removed without making changes")
17-
.option("--verbose", "Show verbose output")
17+
.option("--verbose", "Show detailed output including:\n" +
18+
" - List of keys that would be removed.\n" +
19+
" - Processing steps.")
1820
.action(async function (options) {
1921
const ora = Ora();
2022
const results: any = [];

packages/cli/src/cli/cmd/i18n.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export default new Command()
2424
.helpOption("-h, --help", "Show help")
2525
.option("--locale <locale>", "Locale to process", (val: string, prev: string[]) => (prev ? [...prev, val] : [val]))
2626
.option("--bucket <bucket>", "Bucket to process", (val: string, prev: string[]) => (prev ? [...prev, val] : [val]))
27-
.option("--key <key>", "Key to process")
28-
.option("--frozen", `Don't update the translations and fail if an update is needed`)
29-
.option("--force", "Ignore lockfile and process all keys")
30-
.option("--verbose", "Show verbose output")
31-
.option("--interactive", "Interactive mode")
32-
.option("--api-key <api-key>", "Explicitly set the API key to use")
33-
.option("--debug", "Debug mode")
34-
.option("--strict", "Stop on first error")
27+
.option("--key <key>", "Key to process. Process only a specific translation key, useful for debugging or updating a single entry")
28+
.option("--frozen", `Run in read-only mode - fails if any translations need updating, useful for CI/CD pipelines to detect missing translations`)
29+
.option("--force", "Ignore lockfile and process all keys, useful for full re-translation")
30+
.option("--verbose", "Show detailed output including intermediate processing data and API communication details")
31+
.option("--interactive", "Enable interactive mode for reviewing and editing translations before they are applied")
32+
.option("--api-key <api-key>", "Explicitly set the API key to use, override the default API key from settings")
33+
.option("--debug", "Pause execution at start for debugging purposes, waits for user confirmation before proceeding")
34+
.option("--strict", "Stop processing on first error instead of continuing with other locales/buckets")
3535
.action(async function (options) {
3636
updateGitignore();
3737

packages/cli/src/cli/cmd/show/files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { resolveOverriddenLocale } from "@lingo.dev/_spec";
99
export default new Command()
1010
.command("files")
1111
.description("Print out the list of files managed by Lingo.dev")
12-
.option("--source", "Only show source files")
13-
.option("--target", "Only show target files")
12+
.option("--source", "Only show source files, files containing the original translations")
13+
.option("--target", "Only show target files, files containing translated content")
1414
.helpOption("-h, --help", "Show help")
1515
.action(async (type) => {
1616
const ora = Ora();

0 commit comments

Comments
 (0)