Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@
"dotenv": "^16.4.7",
"express": "^4.21.2",
"external-editor": "^3.1.0",
"figlet": "^1.8.0",
"figlet-cli": "^0.2.0",
"flat": "^6.0.1",
"gettext-parser": "^8.0.0",
"glob": "<11.0.0",
"gradient-string": "^3.0.0",
"gray-matter": "^4.0.3",
"ini": "^5.0.0",
"inquirer": "^12.3.0",
Expand Down Expand Up @@ -92,6 +95,7 @@
"@types/cors": "^2.8.17",
"@types/diff": "^6.0.0",
"@types/express": "^5.0.0",
"@types/figlet": "^1.7.0",
"@types/gettext-parser": "^4.0.4",
"@types/glob": "^8.1.0",
"@types/ini": "^4.1.1",
Expand Down
20 changes: 18 additions & 2 deletions packages/cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import dotenv from "dotenv";
dotenv.config();

import { InteractiveCommand } from "interactive-commander";
import figlet from "figlet";
import { vice } from "gradient-string";

import authCmd from "./cli/auth";
import initCmd from "./cli/init";
Expand All @@ -19,7 +21,14 @@ export default new InteractiveCommand()
.addHelpText(
"beforeAll",
`
Lingo.dev CLI
${vice(
figlet.textSync("LINGO.DEV", {
font: "ANSI Shadow",
horizontalLayout: "default",
verticalLayout: "default",
}),
)}

Website: https://lingo.dev
`,
)
Expand All @@ -30,4 +39,11 @@ Website: https://lingo.dev
.addCommand(authCmd)
.addCommand(configCmd)
.addCommand(lockfileCmd)
.addCommand(cleanupCmd);
.addCommand(cleanupCmd)
.exitOverride((err) => {
// Exit with code 0 when help or version is displayed
if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
process.exit(0);
}
throw err;
});
90 changes: 85 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.