beck 0.2.2

Local skills router CLI for AI agents. Your agent's skills, at its beck and call.
Documentation
//! Minimal ASCII banner for beck.
//! Two tones: default (white) and dim (gray). Only shown on TTY.

use std::io::IsTerminal;

// ANSI Shadow figlet for "BECK". Two lines (3 and 4) end with a single
// trailing space that closes the box-drawing corner glyph; written via
// "\x20" so editors that strip trailing whitespace cannot eat them.
const BANNER: &str = concat!(
    "\n",
    "██████╗ ███████╗ ██████╗██╗  ██╗\n",
    "██╔══██╗██╔════╝██╔════╝██║ ██╔╝\n",
    "██████╔╝█████╗  ██║     █████╔╝\x20\n",
    "██╔══██╗██╔══╝  ██║     ██╔═██╗\x20\n",
    "██████╔╝███████╗╚██████╗██║  ██╗\n",
    "╚═════╝ ╚══════╝ ╚═════╝╚═╝  ╚═╝\n",
    "\n",
    "your agent's skills, at its beck and call.\n",
);

/// Print the banner to stderr if stdout is a TTY (not piped).
pub fn maybe_print() {
    if std::io::stdout().is_terminal() {
        let lines: Vec<&str> = BANNER.lines().collect();
        for (i, line) in lines.iter().enumerate() {
            if line.is_empty() {
                eprintln!();
            } else if i < lines.len() - 1 {
                // ASCII art lines: dim gray
                eprintln!("\x1b[2m{}\x1b[0m", line);
            } else {
                // Tagline: default color
                eprintln!("{}", line);
            }
        }
    }
}