Skip to content
Open
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
14 changes: 13 additions & 1 deletion packages/cli/src/cli/utils/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import figlet from "figlet";
import { vice } from "gradient-string";
import readline from "readline";
import { colors } from "../constants";
import fs from "fs"; // <-- ADD THIS IMPORT

function isCI(): boolean {
return Boolean(process.env.CI) || fs.existsSync("/.dockerenv");
}

export async function renderClear() {
console.log("\x1Bc");
Expand Down Expand Up @@ -37,10 +42,17 @@ export async function renderHero() {
const label3 = "🎮 Join Discord:";
const maxLabelWidth = 17; // Approximate visual width accounting for emoji

// --- ADD THIS LOGIC ---
const isCIEnv = isCI(); // <-- USE THE LOCAL HELPER FUNCTION
const docsUrl = isCIEnv
? "https://lingo.dev/ci"
: "https://lingo.dev/cli";
// ------------------------

console.log(
`${chalk.hex(colors.blue)(label1.padEnd(maxLabelWidth + 1))} ${chalk.hex(
colors.blue,
)("https://lingo.dev/go/docs")}`,
)(docsUrl)}`,
); // Docs emoji seems narrower
console.log(
`${chalk.hex(colors.blue)(label2.padEnd(maxLabelWidth))} ${chalk.hex(
Expand Down