Skip to content
18 changes: 18 additions & 0 deletions .changeset/bright-timers-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"react-router-app": patch
"@replexica/integration-directus": patch
"vite-project": patch
"@lingo.dev/_compiler": patch
"@lingo.dev/_locales": patch
"@lingo.dev/_logging": patch
"@lingo.dev/_react": patch
"next-app": patch
"@lingo.dev/_spec": patch
"lingo.dev": patch
"@lingo.dev/_sdk": patch
"docs": patch
"replexica": patch
"@replexica/sdk": patch
---

Update CLI header to conditionally link to ci or cli docs.
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