Skip to content

feat(cli): add Weaver, a block-art terminal mascot - #511

Open
Agnik47 wants to merge 1 commit into
agentrhq:mainfrom
Agnik47:feat/terminal-mascot-weaver
Open

Agnik47 wants to merge 1 commit into
agentrhq:mainfrom
Agnik47:feat/terminal-mascot-weaver

Conversation

@Agnik47

@Agnik47 Agnik47 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Description

Gives webcmd a mascot: Weaver, a chunky block spider who drops in on a thread when you install webcmd, and stands beside the wordmark in the help banner.

The character argues for itself on product grounds, not only on taste — a spider that crawls a site once and weaves what it learns into its web is sitemap memory, so it draws "explore once, execute forever" without a sentence of explanation.

Related issue: #510

What changed

  • src/mascot.ts (new) — the art, seven frames, renderer, animator. Pure; no I/O beyond an injected writer.
  • src/brand.tsACCENT_RGB / SHADE_RGB move here so #56C5FF is declared once and shared with the help banner rather than a fourth copy.
  • src/command-presentation.tsROOT_HELP_BANNER_PARTS gains a third column for the sprite. Banner width becomes 73 display columns (wordmark 52 + 2 gutter + mascot 18), inside the 80 budget. The Hangul-filler spacer row is left exactly as wide as it was.
  • scripts/postinstall.js — animates the drop on a global install, above the existing "Next step" block.
  • src/hosted/setup.ts — greets first-run setup.
  • docs/webcmd-weaver.svg (new) — vector twin, generated from the same sprite so the terminal character and the illustrated one cannot drift.

Two constraints worth calling out for review

The art is filled block glyphs, not box-drawing outlines. Each part of Weaver is a different character ( body, legs, eyes) rather than one character recolored. That keeps color purely additive, which is what preserves the invariant at command-presentation.test.ts:170 — stripping ANSI from a colored help screen returns the plain one byte for byte. All 14 existing banner tests pass untouched, including the local/hosted byte-identity assertions in hosted/runner.test.ts.

Animation is gated on the output stream being a TTY, not on prompting being possible. setup.ts's existing canPrompt() returns true whenever a question fn is injected, even with no terminal attached; animating on that broke does not resolve until all caller-owned output writes complete, which asserts exact write counts. A separate canAnimate() checks the stream instead — the more correct condition, since an injected prompt says nothing about whether a cursor can be moved. Every existing setup test passes unmodified.

Escape hatches: piped installs get one static frame with no escapes, CI gets nothing (the existing process.env.CI guard), NO_COLOR drops color, and WEBCMD_NO_MASCOT=1 opts out entirely.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful
  • If I edited skill-src/, I ran make build and committed skills/ — n/a, no skill changes

Verification

npm run typecheck clean. npm run build clean.

npx vitest run --project unit src/mascot.test.ts src/postinstall.test.ts \
  src/command-presentation.test.ts src/hosted/setup.test.ts
→ Test Files  4 passed (4)
        Tests  75 passed (75)

14 new tests in src/mascot.test.ts cover:

  • every frame is the same height and width, or the \x1b[<n>A redraw tears mid-animation
  • the plain render contains no escapes, and the colored render strips back to it exactly
  • the cursor is restored even when a write throws mid-animation
  • the frames inlined in scripts/postinstall.js match WEAVER_FRAMES — that script must run with no build step, so it cannot import the module, and this is the guard against the copies drifting

Note on the wider suite: npm test shows unrelated pre-existing failures on Windows (EBUSY unlinking chrome_debug.log in the browser runner tests, plus temp-dir contention). I reproduced 28 of them on a clean checkout of main with this branch stashed, so they are environmental rather than introduced here.

Screenshots / Output

webcmd --help:

    ▓▓      ▓▓      ██╗    ██╗███████╗██████╗  ██████╗███╗   ███╗██████╗
    ██████████      ██║    ██║██╔════╝██╔══██╗██╔════╝████╗ ████║██╔══██╗
  ▓▓██ ●  ● ██▓▓    ██║ █╗ ██║█████╗  ██████╔╝██║     ██╔████╔██║██║  ██║
  ▓▓██  ▾   ██▓▓    ██║███╗██║██╔══╝  ██╔══██╗██║     ██║╚██╔╝██║██║  ██║
    ██████████      ╚███╔███╔╝███████╗██████╔╝╚██████╗██║ ╚═╝ ██║██████╔╝
 ▓▓  ▓▓    ▓▓  ▓▓    ╚══╝╚══╝ ╚══════╝╚═════╝  ╚═════╝╚═╝     ╚═╝╚═════╝
ㅤ
  Make any website your CLI. Zero setup. AI-powered.

Final frame of the install greeting:

        ││        
        ││        
        ││        
    ▓▓      ▓▓    
    ██████████    
  ▓▓██ ●  ● ██▓▓  
  ▓▓██  ▾   ██▓▓  
    ██████████    
 ▓▓  ▓▓    ▓▓  ▓▓ 
  Webcmd installed. Weaver crawls a site once so your agents never have to rediscover it.

Blink frame — becomes , and the leg rows shift one column as he lands:

    ▓▓      ▓▓            ▓▓        ▓▓   
    ██████████            ██████████     
  ▓▓██ ●  ● ██▓▓        ▓▓██ ─  ─ ██▓▓   
  ▓▓██  ▾   ██▓▓        ▓▓██  ▾   ██▓▓   
    ██████████            ██████████     
 ▓▓  ▓▓    ▓▓  ▓▓        ▓▓ ▓▓    ▓▓ ▓▓  

Happy to change the character, the palette, or drop any of the three surfaces — the art lives behind one module, so placement is easy to trim.

🤖 Generated with Claude Code

https://claude.ai/code/session_013dvZ6uiCdQmpUTTiQ2XJZL

webcmd has a logo but no character. Nothing greets a fresh
`npm install -g @agentrhq/webcmd`, and `--help` shows block-letter
wordmark art with no personality.

Weaver is a chunky block spider: webcmd crawls a site once and weaves
what it learns into local memory, so the character draws the product's
own pitch — explore once, execute forever.

- src/mascot.ts holds the art, the frames, and the renderer.
- The sprite joins the --help banner as a third column, 73 display
  columns in total, inside the 80-column budget.
- postinstall animates it on a global install; setup greets first run.
- docs/webcmd-weaver.svg is a vector twin generated from the same
  sprite, for docs and merch.

The art is drawn with filled block glyphs rather than box-drawing
outlines so the silhouette survives with color stripped. Color is
layered on top and stays purely additive, which is what keeps the
existing command-presentation invariant that stripping ANSI from a
colored help screen yields the plain one byte for byte. All 14 existing
banner tests pass untouched.

Animation is gated on the output stream being a TTY — not on prompting
being possible — so piped installs and scripted setup runs get a single
static frame with no escapes, and CI gets nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013dvZ6uiCdQmpUTTiQ2XJZL
@github-actions

Copy link
Copy Markdown
Contributor

🟠 Maintainer review suggested — low confidence

The automated review could not reach a fully supported conclusion.

This review is advisory and does not block merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant