chore: add lobster CLI banner art

This commit is contained in:
Peter Steinberger
2026-01-09 07:51:32 +01:00
parent 8808d8c84c
commit af1f6fab29
2 changed files with 46 additions and 4 deletions

View File

@@ -33,6 +33,41 @@ export function formatCliBannerLine(
return `${title} ${version} (${commitLabel}) — ${tagline}`;
}
const LOBSTER_ASCII = [
"░████░█░░░░░█████░█░░░█░███░░████░░████░░▀█▀",
"█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░░█░█░░░█░░█░",
"█░░░░░█░░░░░█████░█░█░█░█░░█░████░░█░░░█░░█░",
"█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░█░░█░░░█░░█░",
"░████░█████░█░░░█░░█░█░░███░░████░░░███░░░█░",
" 🦞 FRESH DAILY 🦞",
];
export function formatCliBannerArt(options: BannerOptions = {}): string {
const rich = options.richTty ?? isRich();
if (!rich) return LOBSTER_ASCII.join("\n");
const colorChar = (ch: string) => {
if (ch === "█") return theme.accentBright(ch);
if (ch === "░") return theme.accentDim(ch);
if (ch === "▀") return theme.accent(ch);
return theme.muted(ch);
};
const colored = LOBSTER_ASCII.map((line) => {
if (line.includes("FRESH DAILY")) {
return (
theme.muted(" ") +
theme.accent("🦞") +
theme.info(" FRESH DAILY ") +
theme.accent("🦞")
);
}
return [...line].map(colorChar).join("");
});
return colored.join("\n");
}
export function emitCliBanner(version: string, options: BannerOptions = {}) {
if (bannerEmitted) return;
const argv = options.argv ?? process.argv;