Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/cli/src/lib/banner.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/cli/src/lib/banner.ts |
| Original SHA-256 | 82220ad99f98e643c903afb91968b62d85f223176cea887324bd9beda0b35870 |
| Git blob SHA | 8dc89e1bed34b935ee8b0cee69801a9d9985ffa1 |
| Reading-copy SHA-256 | 82220ad99f98e643c903afb91968b62d85f223176cea887324bd9beda0b35870 |
Recovered source transcript
Download complete source text ↓30 lines · 1.6 KB
import pc from 'picocolors'
const BANNER_LINES = [
' ██╗ ██╗ ███╗ ███╗███████╗████████╗██╗ ██╗████████╗',
' ██║ ██║ ████╗ ████║██╔════╝╚══██╔══╝╚██╗██╔╝╚══██╔══╝',
' ██║ ██║ ██╔████╔██║███████╗ ██║ ╚███╔╝ ██║ ',
' ██║ ██║ ██║╚██╔╝██║╚════██║ ██║ ██╔██╗ ██║ ',
' ███████╗███████╗██║ ╚═╝ ██║███████║ ██║ ██╔╝ ██╗ ██║ ',
' ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ '
]
// ANSI 256-color gradient: cyan → blue → purple
const GRADIENT_COLORS = [39, 38, 75, 69, 63, 99]
/**
* Apply ANSI 256-color to a single line of text.
*/
function colorLine(line: string, colorCode: number): string {
return `\x1b[38;5;${colorCode}m${line}\x1b[0m`
}
/**
* Print the ASCII art banner with gradient colors, version, and tagline.
*/
export function printBanner(version: string): void {
const lines = BANNER_LINES.map((line, i) => colorLine(line, GRADIENT_COLORS[i]))
const output = `\n${lines.join('\n')}\n\n${pc.dim(` v${version} · Install llms.txt documentation for AI coding tools`)}\n`
process.stdout.write(output)
}