Skip to content

feat: bare-invocation banner with quick-start cheat sheet#19

Merged
vvillait88 merged 5 commits intomainfrom
banner-bare-invocation
May 6, 2026
Merged

feat: bare-invocation banner with quick-start cheat sheet#19
vvillait88 merged 5 commits intomainfrom
banner-bare-invocation

Conversation

@vvillait88
Copy link
Copy Markdown
Contributor

@vvillait88 vvillait88 commented May 6, 2026

Summary

  • New src/banner.ts renders a compact AGENTSCORE PAY block-char logo (cfonts tiny font, 2 lines, ~55 cols), a tagline, and a quick-start cheat sheet.
  • src/index.ts intercepts bare invocation (argv.length === 2 && stderr.isTTY) and prints the banner before incur's serve() is called. Non-bare and non-TTY paths are unchanged.
  • Width-aware: terminals narrower than 60 cols collapse to plain AgentScore Pay plus tagline + cheat sheet.
  • Color-aware: NO_COLOR=1 skips ANSI escapes.
  • Stderr-only — stdout (used by incur for structured output) is never touched.
  • Bumps 0.1.0-rc.17 → 0.1.0-rc.18.

Branding follows the internal branding reference: full AgentScore Pay prefix on first mention; agentscore-pay binary stays as-is in command examples.

Test plan

  • bun run test tests/banner.test.ts passes (8/8 locally).
  • bun run lint, bun run typecheck, bun run build all clean.
  • In a real terminal (verified via macOS script PTY at stty cols 120): agentscore-pay shows the block art with ANSI fg color + tagline + cheat sheet.
  • agentscore-pay > out.txt produces no banner — pipe is non-TTY, falls through to incur help; zero block-art chars in the captured file.
  • NO_COLOR=1 agentscore-pay (PTY at cols 120): block art renders monochrome, zero ANSI fg-color escapes (38;5;39) in output.
  • Narrow terminal (PTY at cols 40): collapses to plain-text AgentScore Pay header; zero block-art chars.
  • agentscore-pay --json (PTY at cols 120): banner silent (argv.length === 3), falls through to incur; zero block-art chars. Same for --help.

🤖 Generated with Claude Code

vvillait88 and others added 5 commits May 6, 2026 04:16
When a human runs `agentscore-pay` with no args in a TTY, render a
compact AGENTSCORE PAY block-char logo plus tagline and quick-start
cheat sheet. Silent on non-TTY (agents in shell-tool loops capture
clean output) and on structured/JSON modes. Falls back to plain text
when the terminal is narrower than 60 cols. Stderr-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Generated via oh-my-logo (one-shot, dev-time). Embeds a baked
true-color (24-bit RGB) forest gradient that renders across columns
in any color-capable terminal. NO_COLOR strips to plain shade chars.
Width threshold raised to 70 cols (art is 67 wide).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The colored art had two empty entries plus a standalone reset entry
after the last visible line, which produced ~3 blank lines between
the bottom of the logo and the tagline. Inlined the reset on the last
art line so the gap collapses to a single blank line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the flat "Quick start" 5-item list with four role-grouped
sections (Pay 402/MPP, Identity, Agents, Account management) plus an
Output formats line, matching the layout pattern of related agent-
payment CLIs in the ecosystem. Drops the redundant binary prefix from
each line and surfaces dual-audience output flags (--json, --format
toon, --mcp) at the bare invocation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops reputation, assess, credentials, associate-wallet, and sessions
from the bare-invocation cheat sheet — those route through getClient()
which requires AGENTSCORE_API_KEY in env. The bare invocation should
work out-of-the-box for first-time users with no credentials yet.

Folds passport into Account management (it's a one-time setup like
init) so the lonely Identity section can collapse. Adds a regression
test that asserts none of the API-key-only commands appear.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vvillait88 vvillait88 merged commit 2a2636b into main May 6, 2026
6 checks passed
@vvillait88 vvillait88 deleted the banner-bare-invocation branch May 6, 2026 12:25
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