@phren/cli 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,23 +15,23 @@ const LIGHT_PURPLE = `${ESC}38;5;141m`; // lavender — brain highlights
15
15
  const MID_PURPLE = `${ESC}38;5;98m`; // mid tone
16
16
  const NAVY = `${ESC}38;5;18m`; // darkest outline
17
17
  /**
18
- * Phren ASCII art (~11 lines tall, ~20 cols wide).
19
- * Matches the pixel-art PNG: round purple brain with wrinkle texture,
20
- * diamond eyes, cute smile, stubby legs, cyan sparkle.
21
- * Uses Unicode half-blocks and ANSI 256-color for shading depth.
18
+ * Phren truecolor art (24px wide, generated from phren-transparent.png).
19
+ * Uses half-block with RGB foreground+background for pixel-faithful rendering.
20
+ * Requires truecolor terminal (most modern terminals support it).
22
21
  */
23
22
  export const PHREN_ART = [
24
- ` ${CYAN}✦${RESET}`,
25
- ` ${NAVY}▄${DARK_PURPLE}▄▄${PURPLE}████${DARK_PURPLE}▄▄${NAVY}▄${RESET}`,
26
- ` ${NAVY}▄${PURPLE}██${LIGHT_PURPLE}▓▓${PURPLE}██${LIGHT_PURPLE}▓▓${PURPLE}██${NAVY}▄${RESET}`,
27
- ` ${NAVY}█${PURPLE}██${LIGHT_PURPLE}░${BRIGHT_PURPLE}▓${PURPLE}██${LIGHT_PURPLE}░${BRIGHT_PURPLE}▓${PURPLE}███${NAVY}█${RESET}`,
28
- ` ${NAVY}█${PURPLE}███${MID_PURPLE}▄${PURPLE}████${MID_PURPLE}▄${PURPLE}███${NAVY}█${RESET}`,
29
- ` ${NAVY}█${PURPLE}█${NAVY}◆${PURPLE}██${DARK_PURPLE}▀${PURPLE}██${NAVY}◆${PURPLE}████${NAVY}█${RESET}`,
30
- ` ${NAVY}█${PURPLE}███${DIM}${PURPLE}ᵥ${RESET}${PURPLE}██████${BRIGHT_PURPLE}█${NAVY}█${RESET}`,
31
- ` ${NAVY}█${PURPLE}██████████${NAVY}█${RESET}`,
32
- ` ${NAVY}▀${DARK_PURPLE}▀${PURPLE}████████${DARK_PURPLE}▀${NAVY}▀${RESET}`,
33
- ` ${DARK_PURPLE}██${RESET} ${DARK_PURPLE}██${RESET}`,
34
- ` ${NAVY}▀▀▀${RESET} ${NAVY}▀▀▀${RESET}`,
23
+ " ",
24
+ " ",
25
+ " \x1b[38;2;40;211;242m▄\x1b[0m \x1b[38;2;27;210;241m▄\x1b[0m ",
26
+ " \x1b[38;2;38;39;142m▄\x1b[0m\x1b[38;2;153;140;248m▄\x1b[0m\x1b[38;2;40;41;142m\x1b[48;2;152;146;247m▀\x1b[0m\x1b[38;2;41;43;144m\x1b[48;2;93;67;243m▀\x1b[0m\x1b[38;2;157;147;250m▄\x1b[0m\x1b[38;2;43;44;147m\x1b[48;2;156;146;249m▀\x1b[0m\x1b[38;2;41;43;144m\x1b[48;2;145;147;247m▀\x1b[0m\x1b[38;2;155;146;248m▄\x1b[0m\x1b[38;2;41;40;141m▄\x1b[0m ",
27
+ " \x1b[38;2;39;39;132m▄\x1b[0m\x1b[38;2;150;132;250m\x1b[48;2;151;133;250m▀\x1b[0m\x1b[38;2;154;143;250m\x1b[48;2;148;129;251m▀\x1b[0m\x1b[38;2;104;75;249m\x1b[48;2;156;145;248m▀\x1b[0m\x1b[38;2;156;142;251m\x1b[48;2;92;68;236m▀\x1b[0m\x1b[38;2;156;149;248m\x1b[48;2;85;70;220m▀\x1b[0m\x1b[38;2;157;150;248m\x1b[48;2;157;151;248m▀\x1b[0m\x1b[38;2;151;130;250m\x1b[48;2;86;61;235m▀\x1b[0m\x1b[38;2;149;145;247m\x1b[48;2;105;83;245m▀\x1b[0m\x1b[38;2;155;143;248m\x1b[48;2;191;189;251m▀\x1b[0m\x1b[38;2;41;41;146m\x1b[48;2;153;135;250m▀\x1b[0m\x1b[38;2;71;68;183m▄\x1b[0m ",
28
+ " \x1b[38;2;12;31;109m\x1b[48;2;148;132;250m▀\x1b[0m\x1b[38;2;82;67;225m\x1b[48;2;144;126;251m▀\x1b[0m\x1b[38;2;143;122;252m\x1b[48;2;156;143;251m▀\x1b[0m\x1b[38;2;94;67;244m\x1b[48;2;149;132;251m▀\x1b[0m\x1b[38;2;152;144;249m\x1b[48;2;150;132;251m▀\x1b[0m\x1b[38;2;154;143;248m\x1b[48;2;151;133;250m▀\x1b[0m\x1b[38;2;157;153;248m\x1b[48;2;152;134;250m▀\x1b[0m\x1b[38;2;84;61;230m\x1b[48;2;152;139;247m▀\x1b[0m\x1b[38;2;152;139;250m\x1b[48;2;106;93;246m▀\x1b[0m\x1b[38;2;95;71;239m\x1b[48;2;155;141;250m▀\x1b[0m\x1b[38;2;92;68;237m\x1b[48;2;158;141;248m▀\x1b[0m\x1b[38;2;151;139;250m\x1b[48;2;116;101;251m▀\x1b[0m\x1b[38;2;67;61;181m\x1b[48;2;36;41;131m▀\x1b[0m ",
29
+ " \x1b[38;2;141;122;250m\x1b[48;2;146;128;248m▀\x1b[0m\x1b[38;2;21;32;101m\x1b[48;2;154;132;250m▀\x1b[0m\x1b[38;2;146;126;251m\x1b[48;2;145;123;251m▀\x1b[0m\x1b[38;2;146;128;250m\x1b[48;2;145;125;250m▀\x1b[0m\x1b[38;2;158;149;250m\x1b[48;2;146;123;248m▀\x1b[0m\x1b[38;2;22;31;104m\x1b[48;2;152;132;248m▀\x1b[0m\x1b[38;2;152;137;250m\x1b[48;2;151;133;251m▀\x1b[0m\x1b[38;2;150;142;249m\x1b[48;2;135;121;250m▀\x1b[0m\x1b[38;2;152;138;250m\x1b[48;2;119;99;247m▀\x1b[0m\x1b[38;2;154;140;251m\x1b[48;2;108;93;249m▀\x1b[0m\x1b[38;2;116;104;252m\x1b[48;2;117;100;251m▀\x1b[0m\x1b[38;2;127;111;251m\x1b[48;2;125;110;250m▀\x1b[0m\x1b[38;2;92;85;242m\x1b[48;2;93;81;242m▀\x1b[0m ",
30
+ " \x1b[38;2;10;28;98m▀\x1b[0m\x1b[38;2;147;128;251m\x1b[48;2;77;59;222m▀\x1b[0m\x1b[38;2;145;125;250m\x1b[48;2;100;82;243m▀\x1b[0m\x1b[38;2;48;39;174m\x1b[48;2;136;120;250m▀\x1b[0m\x1b[38;2;146;126;251m\x1b[48;2;102;86;245m▀\x1b[0m\x1b[38;2;146;128;250m\x1b[48;2;103;86;245m▀\x1b[0m\x1b[38;2;111;94;250m\x1b[48;2;116;102;249m▀\x1b[0m\x1b[38;2;122;109;250m\x1b[48;2;114;103;247m▀\x1b[0m\x1b[38;2;120;107;251m\x1b[48;2;86;74;229m▀\x1b[0m\x1b[38;2;121;100;250m\x1b[48;2;106;93;244m▀\x1b[0m\x1b[38;2;92;66;240m\x1b[48;2;36;25;138m▀\x1b[0m\x1b[38;2;117;92;249m\x1b[48;2;83;73;231m▀\x1b[0m\x1b[38;2;7;37;110m▀\x1b[0m ",
31
+ " \x1b[38;2;18;22;101m▀\x1b[0m\x1b[38;2;19;24;101m▀\x1b[0m\x1b[38;2;66;51;207m\x1b[48;2;69;51;218m▀\x1b[0m\x1b[38;2;95;83;244m\x1b[48;2;26;24;106m▀\x1b[0m\x1b[38;2;72;59;210m▀\x1b[0m\x1b[38;2;115;96;250m\x1b[48;2;58;46;198m▀\x1b[0m\x1b[38;2;117;104;249m\x1b[48;2;20;31;99m▀\x1b[0m\x1b[38;2;119;104;249m\x1b[48;2;26;29;111m▀\x1b[0m\x1b[38;2;23;21;110m▀\x1b[0m ",
32
+ " \x1b[38;2;24;29;112m\x1b[48;2;156;157;248m▀\x1b[0m\x1b[38;2;105;91;248m\x1b[48;2;155;157;248m▀\x1b[0m\x1b[38;2;9;30;102m\x1b[48;2;157;158;248m▀\x1b[0m\x1b[38;2;12;31;104m\x1b[48;2;158;161;248m▀\x1b[0m\x1b[38;2;112;102;250m\x1b[48;2;158;160;248m▀\x1b[0m\x1b[38;2;15;41;120m\x1b[48;2;158;162;248m▀\x1b[0m\x1b[38;2;160;169;250m\x1b[48;2;158;163;247m▀\x1b[0m ",
33
+ " ",
34
+ " ",
35
35
  ];
36
36
  /** Single-line compact phren for inline use */
37
37
  export const PHREN_INLINE = `${PURPLE}◆${RESET}`;
@@ -144,20 +144,9 @@ const PHREN_LOGO = [
144
144
  "██║ ██║ ██║██║ ██║███████╗██║ ╚████║",
145
145
  "╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝",
146
146
  ];
147
- // Compact phren character for startup (matches phren-art.ts PHREN_ART)
148
- const PHREN_STARTUP = [
149
- " \x1b[96m✦\x1b[0m",
150
- " \x1b[38;5;18m▄\x1b[38;5;57m▄▄\x1b[35m████\x1b[38;5;57m▄▄\x1b[38;5;18m▄\x1b[0m",
151
- " \x1b[38;5;18m▄\x1b[35m██\x1b[38;5;141m▓▓\x1b[35m██\x1b[38;5;141m▓▓\x1b[35m██\x1b[38;5;18m▄\x1b[0m",
152
- " \x1b[38;5;18m█\x1b[35m██\x1b[38;5;141m░\x1b[95m▓\x1b[35m██\x1b[38;5;141m░\x1b[95m▓\x1b[35m███\x1b[38;5;18m█\x1b[0m",
153
- " \x1b[38;5;18m█\x1b[35m███\x1b[38;5;98m▄\x1b[35m████\x1b[38;5;98m▄\x1b[35m███\x1b[38;5;18m█\x1b[0m",
154
- " \x1b[38;5;18m█\x1b[35m█\x1b[38;5;18m◆\x1b[35m██\x1b[38;5;57m▀\x1b[35m██\x1b[38;5;18m◆\x1b[35m████\x1b[38;5;18m█\x1b[0m",
155
- " \x1b[38;5;18m█\x1b[35m███\x1b[2m\x1b[35mᵥ\x1b[0m\x1b[35m██████\x1b[95m█\x1b[38;5;18m█\x1b[0m",
156
- " \x1b[38;5;18m█\x1b[35m██████████\x1b[38;5;18m█\x1b[0m",
157
- " \x1b[38;5;18m▀\x1b[38;5;57m▀\x1b[35m████████\x1b[38;5;57m▀\x1b[38;5;18m▀\x1b[0m",
158
- " \x1b[38;5;57m██\x1b[0m \x1b[38;5;57m██\x1b[0m",
159
- " \x1b[38;5;18m▀▀▀\x1b[0m \x1b[38;5;18m▀▀▀\x1b[0m",
160
- ];
147
+ // Compact phren character for startup (uses PHREN_ART from phren-art.ts via import)
148
+ import { PHREN_ART as PHREN_STARTUP_ART } from "./phren-art.js";
149
+ const PHREN_STARTUP = PHREN_STARTUP_ART;
161
150
  // ── Line-based viewport: edge-triggered scroll (stable, no jumpiness) ─────────
162
151
  export function lineViewport(allLines, cursorFirstLine, cursorLastLine, height, prevStart) {
163
152
  if (allLines.length === 0 || height <= 0)
@@ -230,17 +219,36 @@ export function shellStartupFrames(version) {
230
219
  const cols = process.stdout.columns || 80;
231
220
  const tagline = style.dim("local memory for working agents");
232
221
  const versionBadge = badge(`v${version}`, style.boldBlue);
222
+ if (cols >= 72) {
223
+ // Side-by-side: phren character on left, logo text on right
224
+ const phrenLines = PHREN_STARTUP;
225
+ const logoLines = PHREN_LOGO.map(line => gradient(line));
226
+ const infoLine = `${gradient("◆")} ${style.bold("phren")} ${versionBadge} ${tagline}`;
227
+ // Logo is 6 lines, pad to align vertically with character center
228
+ const rightSide = [
229
+ "", "", ...logoLines, "", infoLine,
230
+ ];
231
+ // Merge side by side: character left (26 cols), logo right
232
+ const charWidth = 26;
233
+ const maxLines = Math.max(phrenLines.length, rightSide.length);
234
+ const merged = [""];
235
+ for (let i = 0; i < maxLines; i++) {
236
+ const left = (i < phrenLines.length ? phrenLines[i] : "").padEnd(charWidth);
237
+ const right = i < rightSide.length ? rightSide[i] : "";
238
+ merged.push(left + right);
239
+ }
240
+ merged.push("");
241
+ return [
242
+ // Frame 1: Logo with character side by side immediately
243
+ merged.join("\n"),
244
+ ];
245
+ }
233
246
  if (cols >= 56) {
247
+ // Medium terminal: stacked but compact
234
248
  const logo = PHREN_LOGO.map(line => " " + gradient(line));
235
- const phren = PHREN_STARTUP.map(line => " " + line);
236
249
  const sep = gradient("━".repeat(Math.min(52, cols)));
237
250
  return [
238
- // Frame 1: Phren appears
239
- ["", ...phren, "", ` ${versionBadge} ${tagline}`, ""].join("\n"),
240
- // Frame 2: Full logo materializes with phren
241
- ["", ...phren, "", ...logo, "", ` ${versionBadge} ${tagline}`, ""].join("\n"),
242
- // Frame 3: Complete with brand separator
243
- ["", ...phren, "", ...logo, ` ${sep}`, ` ${gradient("◆")} ${style.bold("phren")} ${versionBadge} ${tagline}`, ""].join("\n"),
251
+ ["", ...logo, ` ${sep}`, ` ${gradient("◆")} ${style.bold("phren")} ${versionBadge} ${tagline}`, ""].join("\n"),
244
252
  ];
245
253
  }
246
254
  // Narrow terminal: progressive text reveal with gradient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phren/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Long-term memory for AI agents. Stored as markdown in a git repo you own.",
5
5
  "type": "module",
6
6
  "bin": {