UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

36 lines (35 loc) • 1.16 kB
/** * Node glyphs for the terminal graph view. * * The default set is plain Unicode that every monospace font carries. With * `PHREN_ICONS=nerd` the view switches to Nerd Font icons (the Font Awesome * block, U+F000–U+F2E0, which has been stable across Nerd Font releases), for * terminals running a patched font such as JetBrainsMono Nerd Font. */ const UNICODE = { project: "◉", finding: "✦", task: "▤", entity: "❖", reference: "▣", topic: "◆", note: "▪", other: "·", }; const NERD = { project: "", // nf-fa-folder finding: "", // nf-fa-lightbulb_o task: "", // nf-fa-check_square_o entity: "", // nf-fa-share_alt (node graph) reference: "", // nf-fa-book topic: "", // nf-fa-tag note: "", // nf-fa-sticky_note other: "", // nf-fa-circle }; export function iconMode(env = process.env) { const raw = (env.PHREN_ICONS || "").trim().toLowerCase(); return raw === "nerd" || raw === "nerdfont" || raw === "nf" ? "nerd" : "unicode"; } export function graphGlyphs(env = process.env) { return iconMode(env) === "nerd" ? NERD : UNICODE; }