brignano 0.0.40 → 1.1.0

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.
@@ -0,0 +1,29 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - '**/*.ts'
7
+ - '*.json'
8
+ - '.github/workflows/ci.yml'
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ node-version: [20.x, 22.x, 24.x]
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ - name: Use Node.js ${{ matrix.node-version }}
19
+ uses: actions/setup-node@v6
20
+ with:
21
+ node-version: ${{ matrix.node-version }}
22
+ - name: Install dependencies
23
+ run: npm ci
24
+ - name: Build
25
+ run: npm run build
26
+ - name: Test (non-interactive)
27
+ run: npm test
28
+ env:
29
+ CI: true
@@ -0,0 +1,32 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Publish Package
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ release:
9
+ types: [created]
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v6
18
+ with:
19
+ node-version: '22.x'
20
+ registry-url: 'https://registry.npmjs.org'
21
+ - name: Install & Build
22
+ run: |
23
+ npm ci
24
+ npm run build
25
+ - name: Test (non-interactive)
26
+ run: npm test
27
+ env:
28
+ CI: true
29
+ - name: Publish to npm
30
+ env:
31
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32
+ run: npm publish --access public
package/demo.gif CHANGED
Binary file
package/dist/banner.js ADDED
@@ -0,0 +1,57 @@
1
+ import figlet from 'figlet';
2
+ import gradient from 'gradient-string';
3
+ import { sleep } from './reveal.js';
4
+ // Brand palette — matches brignano.io's electric indigo/violet accent
5
+ // (violet-700 → violet-500 → violet-400). Reads well on a dark terminal.
6
+ const BRAND = ['#6d28d9', '#8b5cf6', '#a78bfa'];
7
+ // A longer ramp with a bright crest (violet-300) used for the shimmer sweep.
8
+ const SHIMMER = [
9
+ '#5b21b6',
10
+ '#6d28d9',
11
+ '#7c3aed',
12
+ '#8b5cf6',
13
+ '#a78bfa',
14
+ '#c4b5fd',
15
+ '#a78bfa',
16
+ '#8b5cf6',
17
+ '#7c3aed',
18
+ '#6d28d9',
19
+ ];
20
+ function bannerArt(text) {
21
+ try {
22
+ return figlet.textSync(text, { font: 'ANSI Shadow' });
23
+ }
24
+ catch {
25
+ return text.toUpperCase();
26
+ }
27
+ }
28
+ function paint(colors, art) {
29
+ try {
30
+ return gradient(colors).multiline(art);
31
+ }
32
+ catch {
33
+ return art;
34
+ }
35
+ }
36
+ // Static gradient banner (used for the non-animated path).
37
+ export function renderBanner(text = 'brignano') {
38
+ return paint(BRAND, bannerArt(text));
39
+ }
40
+ // Animated splash: a violet highlight sweeps across the letters, then settles on
41
+ // the static brand gradient. Redraws in place via ANSI cursor moves, so it must
42
+ // only be called on a TTY (the caller gates this behind `shouldAnimate`).
43
+ export async function animateBanner(text = 'brignano', frames = 14, frameMs = 70) {
44
+ const art = bannerArt(text);
45
+ const lineCount = art.split('\n').length;
46
+ for (let i = 0; i < frames; i++) {
47
+ const offset = i % SHIMMER.length;
48
+ const rotated = SHIMMER.slice(offset).concat(SHIMMER.slice(0, offset));
49
+ if (i > 0)
50
+ process.stdout.write(`\u001b[${lineCount}A`);
51
+ process.stdout.write(`\r${paint(rotated, art)}\n`);
52
+ await sleep(frameMs);
53
+ }
54
+ // Settle on the canonical brand gradient.
55
+ process.stdout.write(`\u001b[${lineCount}A`);
56
+ process.stdout.write(`${renderBanner(text)}\n`);
57
+ }
package/dist/card.js ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+ import chalk from 'chalk';
3
+ import inquirer from 'inquirer';
4
+ import { animateBanner, renderBanner } from './banner.js';
5
+ import { renderCard } from './cardBox.js';
6
+ import { funFacts, pick, profile, taglines } from './data.js';
7
+ import { clearConsole, isInteractive, parseFlags, shouldAnimate, shouldFetchLive, } from './env.js';
8
+ import { fetchLive } from './live.js';
9
+ import { buildChoices, sendEmail, viewResume } from './menu.js';
10
+ import { renderQr } from './qrcode.js';
11
+ import { reveal, sleep } from './reveal.js';
12
+ import { writeAndOpenVCard } from './vcard.js';
13
+ function printHelp() {
14
+ console.log('\nUsage: npx brignano [options]\n');
15
+ console.log('Options:');
16
+ console.log(' -h, --help Show this help');
17
+ console.log(' -v, --view Open my resume in your browser');
18
+ console.log(' -e, --email Open your mail client to email me');
19
+ console.log(' --qr Print a scannable QR code to my website');
20
+ console.log(' --vcard Save my contact card (.vcf) and open it');
21
+ console.log(' --no-animation Render instantly, skip the reveal animation');
22
+ console.log(' --no-prompt Show the card only (non-interactive)');
23
+ console.log(' -d, --download Deprecated alias for --view\n');
24
+ }
25
+ async function main() {
26
+ const argv = process.argv.slice(2);
27
+ const flags = parseFlags(argv);
28
+ // Direct-action flags short-circuit the full experience.
29
+ if (flags.help)
30
+ return printHelp();
31
+ if (flags.view || flags.download) {
32
+ if (flags.download) {
33
+ console.warn('Note: --download is deprecated; opening the resume instead.');
34
+ }
35
+ return viewResume();
36
+ }
37
+ if (flags.email)
38
+ return sendEmail();
39
+ if (flags.qr) {
40
+ console.log(await renderQr(profile.website));
41
+ console.log(chalk.gray(` ${profile.website}\n`));
42
+ return;
43
+ }
44
+ if (flags.vcard)
45
+ return writeAndOpenVCard();
46
+ const animate = shouldAnimate(flags);
47
+ const interactive = isInteractive(flags);
48
+ // Kick off the live fetch early (don't await yet) so its timeout budget
49
+ // overlaps the banner render. Skipped entirely when non-interactive/CI.
50
+ const livePromise = shouldFetchLive(flags) ? fetchLive() : Promise.resolve(null);
51
+ clearConsole();
52
+ // Banner first: an animated violet shimmer when we can animate, otherwise the
53
+ // static gradient.
54
+ if (animate) {
55
+ await animateBanner();
56
+ await sleep(120);
57
+ }
58
+ else {
59
+ console.log(renderBanner());
60
+ }
61
+ // Card, enriched with whatever the (bounded) live fetch returned.
62
+ const live = await livePromise;
63
+ const tagline = pick(taglines);
64
+ await reveal(renderCard({ live, tagline }), 30, animate);
65
+ console.log(`Tip: ${chalk.cyanBright.bold('cmd/ctrl + click')} the links above.`);
66
+ console.log(chalk.gray(` ${pick(funFacts)}\n`));
67
+ if (!interactive)
68
+ return;
69
+ const prompt = inquirer.createPromptModule();
70
+ const { action } = await prompt([
71
+ {
72
+ type: 'list',
73
+ name: 'action',
74
+ message: 'What would you like to do?',
75
+ choices: buildChoices(),
76
+ },
77
+ ]);
78
+ await action();
79
+ }
80
+ main().catch((err) => {
81
+ const message = err instanceof Error ? err.message : String(err);
82
+ console.error(`Something went wrong: ${message}`);
83
+ process.exitCode = 1;
84
+ });
@@ -0,0 +1,44 @@
1
+ import boxen from 'boxen';
2
+ import chalk from 'chalk';
3
+ import { profile } from './data.js';
4
+ // Right-aligns labels to a common width so the values line up cleanly.
5
+ const LABEL_WIDTH = 10;
6
+ function label(text) {
7
+ return chalk.white.bold(text.padStart(LABEL_WIDTH) + ':');
8
+ }
9
+ // Builds the boxen business card. `live` is optional — when absent the live
10
+ // line is simply omitted, so the card looks intentional with or without network.
11
+ export function renderCard({ live, tagline }) {
12
+ // Violet accent matches brignano.io (violet-400 #a78bfa on dark).
13
+ const accent = chalk.hex('#a78bfa');
14
+ const lines = [
15
+ accent.bold(profile.fullName) + ' ' + chalk.gray(profile.handle),
16
+ '',
17
+ `${label('Work')} ${profile.title} ${chalk.gray('at')} ${chalk
18
+ .hex('#3A5A78')
19
+ .bold(profile.org)}`,
20
+ '',
21
+ `${label('GitHub')} ${chalk.gray('https://github.com/')}${chalk.green(profile.username)}`,
22
+ `${label('LinkedIn')} ${chalk.gray('https://linkedin.com/in/')}${chalk.blue(profile.username)}`,
23
+ `${label('Website')} ${chalk.cyan(profile.website)}`,
24
+ ];
25
+ if (live) {
26
+ lines.push('');
27
+ const parts = [
28
+ `${chalk.yellow('★')} ${chalk.bold(live.followers)} followers`,
29
+ `${chalk.bold(live.publicRepos)} repos`,
30
+ ];
31
+ if (live.latestRepo) {
32
+ parts.push(`latest: ${chalk.green(live.latestRepo.name)}`);
33
+ }
34
+ lines.push(`${label('Live')} ${chalk.gray(parts.join(' · '))}`);
35
+ }
36
+ lines.push('', `${label('Card')} ${chalk.red('npx')} ${chalk.white('brignano')}`, '', chalk.italic(tagline));
37
+ return boxen(lines.join('\n'), {
38
+ margin: 1,
39
+ float: 'center',
40
+ padding: 1,
41
+ borderStyle: 'round',
42
+ borderColor: 'gray',
43
+ });
44
+ }
package/dist/data.js ADDED
@@ -0,0 +1,34 @@
1
+ // Single source of truth for everything the card, vCard, QR and live modules need.
2
+ // Plain (uncolored) values live here; chalk styling is applied at render time.
3
+ export const profile = {
4
+ firstName: 'Anthony',
5
+ lastName: 'Brignano',
6
+ fullName: 'Anthony Brignano',
7
+ handle: '@brignano',
8
+ username: 'brignano',
9
+ title: 'Senior Staff Software Engineer',
10
+ org: 'The Hartford',
11
+ email: 'hi@brignano.io',
12
+ website: 'https://brignano.io',
13
+ resume: 'https://brignano.io/resume',
14
+ github: 'https://github.com/brignano',
15
+ linkedin: 'https://linkedin.com/in/brignano',
16
+ };
17
+ // Rotating taglines — one is picked per run so repeat visitors see variety.
18
+ export const taglines = [
19
+ 'My inbox is always open. Ask a question or just say hi — I read everything.',
20
+ 'Building reliable systems, mentoring engineers, and shipping things that last.',
21
+ "If it's worth automating, it's worth a clean abstraction. Let's build.",
22
+ 'Self-hoster, spec-driven, and unreasonably fond of a tidy terminal.',
23
+ 'Good engineering is mostly good taste applied consistently. Say hello.',
24
+ ];
25
+ // Small easter-egg facts, shown occasionally below the card.
26
+ export const funFacts = [
27
+ 'This card is open source — `npx brignano --help` shows every trick.',
28
+ 'Tip: scan the QR with your phone to save my contact instantly.',
29
+ 'The live stats above are pulled fresh from GitHub (with a strict timeout).',
30
+ ];
31
+ // Deterministic-enough pick without Math.random (kept simple + dependency-free).
32
+ export function pick(items, seed = Date.now()) {
33
+ return items[Math.floor(seed / 1000) % items.length];
34
+ }
package/dist/env.js ADDED
@@ -0,0 +1,48 @@
1
+ // Environment + capability detection. Keeps the render logic free of scattered
2
+ // `process.stdout.isTTY` checks and guarantees CI / piped output never hangs.
3
+ export function hasFlag(argv, names) {
4
+ return names.some((n) => argv.includes(n));
5
+ }
6
+ export function parseFlags(argv) {
7
+ return {
8
+ help: hasFlag(argv, ['--help', '-h']),
9
+ view: hasFlag(argv, ['--view', '-v']),
10
+ download: hasFlag(argv, ['--download', '-d']),
11
+ email: hasFlag(argv, ['--email', '-e']),
12
+ qr: hasFlag(argv, ['--qr']),
13
+ vcard: hasFlag(argv, ['--vcard', '--save-contact']),
14
+ noPrompt: hasFlag(argv, ['--no-prompt', '--quiet']),
15
+ noAnimation: hasFlag(argv, ['--no-animation']),
16
+ };
17
+ }
18
+ const isCI = () => Boolean(process.env.CI);
19
+ // True only when we can safely show an interactive inquirer prompt.
20
+ export function isInteractive(flags) {
21
+ return Boolean(process.stdout.isTTY && process.stdin.isTTY && !isCI() && !flags.noPrompt);
22
+ }
23
+ // True only when the reveal animation should play.
24
+ export function shouldAnimate(flags) {
25
+ return Boolean(process.stdout.isTTY &&
26
+ !isCI() &&
27
+ !flags.noPrompt &&
28
+ !flags.noAnimation &&
29
+ !process.env.NO_COLOR);
30
+ }
31
+ // True only when we should spend time on a live network fetch.
32
+ export function shouldFetchLive(flags) {
33
+ return isInteractive(flags);
34
+ }
35
+ export function clearConsole() {
36
+ const out = process.stdout;
37
+ if (typeof out.clear === 'function') {
38
+ try {
39
+ out.clear();
40
+ }
41
+ catch {
42
+ /* ignore */
43
+ }
44
+ }
45
+ if (process.stdout.isTTY) {
46
+ process.stdout.write('\u001b[2J\u001b[0f');
47
+ }
48
+ }
package/dist/live.js ADDED
@@ -0,0 +1,40 @@
1
+ import { profile } from './data.js';
2
+ const API = 'https://api.github.com';
3
+ const HEADERS = {
4
+ 'User-Agent': 'npx-brignano',
5
+ Accept: 'application/vnd.github+json',
6
+ };
7
+ // Fetches live GitHub stats with a hard timeout. ANY failure (timeout, offline,
8
+ // non-200, rate-limit, parse error) resolves to null — this never throws and
9
+ // never blocks the card for longer than `timeoutMs`.
10
+ export async function fetchLive(timeoutMs = 1500) {
11
+ const controller = new AbortController();
12
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
13
+ try {
14
+ const [userRes, reposRes] = await Promise.all([
15
+ fetch(`${API}/users/${profile.username}`, {
16
+ headers: HEADERS,
17
+ signal: controller.signal,
18
+ }),
19
+ fetch(`${API}/users/${profile.username}/repos?sort=updated&per_page=1`, { headers: HEADERS, signal: controller.signal }),
20
+ ]);
21
+ if (!userRes.ok || !reposRes.ok)
22
+ return null;
23
+ const user = (await userRes.json());
24
+ const repos = (await reposRes.json());
25
+ const latest = Array.isArray(repos) ? repos[0] : undefined;
26
+ return {
27
+ followers: user.followers ?? 0,
28
+ publicRepos: user.public_repos ?? 0,
29
+ latestRepo: latest?.name && latest?.html_url
30
+ ? { name: latest.name, url: latest.html_url }
31
+ : undefined,
32
+ };
33
+ }
34
+ catch {
35
+ return null;
36
+ }
37
+ finally {
38
+ clearTimeout(timer);
39
+ }
40
+ }
package/dist/menu.js ADDED
@@ -0,0 +1,73 @@
1
+ import chalk from 'chalk';
2
+ import clipboard from 'clipboardy';
3
+ import open from 'open';
4
+ import { profile } from './data.js';
5
+ import { renderQr } from './qrcode.js';
6
+ import { buildVCard, writeAndOpenVCard } from './vcard.js';
7
+ // --- Action helpers (kept as named functions so flags and the menu share them) ---
8
+ export async function copyEmail() {
9
+ try {
10
+ await clipboard.write(profile.email);
11
+ console.log(`\n${chalk.green('Copied')} ${profile.email} to your clipboard.\n`);
12
+ }
13
+ catch {
14
+ // Clipboard access fails in headless/SSH environments — degrade gracefully.
15
+ console.log(`\nMy email is ${chalk.green(profile.email)} — drop me a line!\n`);
16
+ }
17
+ }
18
+ export async function sendEmail() {
19
+ try {
20
+ await open(`mailto:${profile.email}`);
21
+ console.log('\nOpened your mail client — see you in the inbox.\n');
22
+ }
23
+ catch (err) {
24
+ const message = err instanceof Error ? err.message : String(err);
25
+ console.error(`Failed to open mail client: ${message}`);
26
+ console.error(`Reach me directly at ${profile.email}`);
27
+ }
28
+ }
29
+ export async function openUrl(url, label) {
30
+ try {
31
+ await open(url);
32
+ console.log(`\nOpened ${label}: ${url}\n`);
33
+ }
34
+ catch (err) {
35
+ const message = err instanceof Error ? err.message : String(err);
36
+ console.error(`Failed to open ${label}: ${message}`);
37
+ console.error(`Here it is: ${url}`);
38
+ }
39
+ }
40
+ export async function viewResume() {
41
+ await openUrl(profile.resume, 'resume');
42
+ }
43
+ export async function showContactQr() {
44
+ const qr = await renderQr(buildVCard());
45
+ console.log('\nScan to save my contact:\n');
46
+ console.log(qr);
47
+ }
48
+ export function buildChoices() {
49
+ return [
50
+ { name: `Copy my ${chalk.green.bold('email')} to clipboard`, value: copyEmail },
51
+ { name: `Send me an ${chalk.green.bold('email')}`, value: sendEmail },
52
+ {
53
+ name: `Open my ${chalk.green.bold('GitHub')}`,
54
+ value: () => openUrl(profile.github, 'GitHub'),
55
+ },
56
+ {
57
+ name: `Open my ${chalk.blue.bold('LinkedIn')}`,
58
+ value: () => openUrl(profile.linkedin, 'LinkedIn'),
59
+ },
60
+ { name: `View my ${chalk.magentaBright.bold('resume')}`, value: viewResume },
61
+ {
62
+ name: `Save my ${chalk.cyan.bold('contact')} (.vcf)`,
63
+ value: writeAndOpenVCard,
64
+ },
65
+ { name: `Show a ${chalk.yellow.bold('contact QR')} code`, value: showContactQr },
66
+ {
67
+ name: 'Just quit',
68
+ value: () => {
69
+ console.log('\nHave a great day!\n');
70
+ },
71
+ },
72
+ ];
73
+ }
package/dist/qrcode.js ADDED
@@ -0,0 +1,8 @@
1
+ import qrcode from 'qrcode-terminal';
2
+ // Promisified wrapper around qrcode-terminal's callback API. `small: true` keeps
3
+ // the code compact enough for most terminals.
4
+ export function renderQr(text) {
5
+ return new Promise((resolve) => {
6
+ qrcode.generate(text, { small: true }, (output) => resolve(output));
7
+ });
8
+ }
package/dist/reveal.js ADDED
@@ -0,0 +1,19 @@
1
+ // Tiny animation helpers — no dependencies. Line-by-line reveal is immune to the
2
+ // ANSI-escape-splitting problem a per-character typewriter would hit, and the
3
+ // total budget stays well under a second.
4
+ export function sleep(ms) {
5
+ return new Promise((resolve) => setTimeout(resolve, ms));
6
+ }
7
+ // Prints `text` one line at a time, pausing `perLineMs` between lines.
8
+ // When `animate` is false, prints everything at once (CI / piped / --no-animation).
9
+ export async function reveal(text, perLineMs = 35, animate = true) {
10
+ if (!animate) {
11
+ console.log(text);
12
+ return;
13
+ }
14
+ const lines = text.split('\n');
15
+ for (const line of lines) {
16
+ console.log(line);
17
+ await sleep(perLineMs);
18
+ }
19
+ }
package/dist/vcard.js ADDED
@@ -0,0 +1,40 @@
1
+ import { writeFileSync } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
4
+ import open from 'open';
5
+ import { profile } from './data.js';
6
+ // Builds a valid vCard 3.0 string (broadest contact-app compatibility) with the
7
+ // spec-required CRLF line endings.
8
+ export function buildVCard() {
9
+ const lines = [
10
+ 'BEGIN:VCARD',
11
+ 'VERSION:3.0',
12
+ `N:${profile.lastName};${profile.firstName};;;`,
13
+ `FN:${profile.fullName}`,
14
+ `ORG:${profile.org}`,
15
+ `TITLE:${profile.title}`,
16
+ `EMAIL;TYPE=INTERNET,PREF:${profile.email}`,
17
+ `URL:${profile.website}`,
18
+ `X-SOCIALPROFILE;TYPE=github:${profile.github}`,
19
+ `X-SOCIALPROFILE;TYPE=linkedin:${profile.linkedin}`,
20
+ 'NOTE:npx brignano',
21
+ 'END:VCARD',
22
+ ];
23
+ return lines.join('\r\n') + '\r\n';
24
+ }
25
+ // Writes the vCard to a temp file and asks the OS to open it (Contacts on
26
+ // macOS/iOS, the default handler elsewhere). On failure, prints the path so the
27
+ // user can open it manually — never throws.
28
+ export async function writeAndOpenVCard() {
29
+ const file = join(tmpdir(), 'anthony-brignano.vcf');
30
+ try {
31
+ writeFileSync(file, buildVCard(), 'utf8');
32
+ await open(file);
33
+ console.log(`\nSaved my contact card to: ${file}\n`);
34
+ }
35
+ catch (err) {
36
+ const message = err instanceof Error ? err.message : String(err);
37
+ console.error(`\nCouldn't open the contact card automatically (${message}).`);
38
+ console.error(`It's saved here — open it manually: ${file}\n`);
39
+ }
40
+ }
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "brignano",
3
- "version": "0.0.40",
4
- "main": "card.js",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "main": "dist/card.js",
6
+ "engines": {
7
+ "node": ">=20"
8
+ },
5
9
  "bin": {
6
- "anthony": "card.js"
10
+ "brignano": "dist/card.js"
7
11
  },
8
12
  "scripts": {
9
- "test": "node card.js"
13
+ "build": "tsc",
14
+ "dev": "ts-node --esm src/card.ts",
15
+ "start": "node dist/card.js",
16
+ "test": "node dist/card.js --no-prompt",
17
+ "prepare": "npm run build"
10
18
  },
11
19
  "repository": {
12
20
  "type": "git",
@@ -18,16 +26,31 @@
18
26
  "url": "https://github.com/brignano/npx-brignano/issues"
19
27
  },
20
28
  "homepage": "https://github.com/brignano/npx-brignano#readme",
21
- "keywords": [],
29
+ "keywords": [
30
+ "npx",
31
+ "business-card",
32
+ "cli",
33
+ "brignano",
34
+ "resume",
35
+ "vcard"
36
+ ],
22
37
  "description": "A personal card for Anthony Brignano (@brignano)",
23
38
  "dependencies": {
24
- "boxen": "^4.2.0",
25
- "chalk": "^4.1.0",
26
- "clear": "^0.1.0",
27
- "cli-spinners": "^2.5.0",
28
- "inquirer": "^7.3.3",
29
- "open": "^7.3.0",
30
- "ora": "^5.1.0",
31
- "request": "^2.88.2"
39
+ "boxen": "^6.0.0",
40
+ "chalk": "^5.2.0",
41
+ "clipboardy": "^5.0.0",
42
+ "figlet": "^1.11.0",
43
+ "gradient-string": "^3.0.0",
44
+ "inquirer": "^9.2.7",
45
+ "open": "^8.4.0",
46
+ "qrcode-terminal": "^0.12.0"
47
+ },
48
+ "devDependencies": {
49
+ "ts-node": "^10.9.1",
50
+ "typescript": "^5.1.6",
51
+ "@types/node": "^20.5.1",
52
+ "@types/inquirer": "^9.0.3",
53
+ "@types/figlet": "^1.7.0",
54
+ "@types/gradient-string": "^1.1.6"
32
55
  }
33
56
  }
package/readme.md CHANGED
@@ -1,14 +1,81 @@
1
- # npx_brignano <a href="#"><img src="https://img.shields.io/badge/-npx%20brignano-white?style=flat-square&logo=npm&logoColor=grey" align="right" alt="npm Badge"></img></a>
1
+ # npx-brignano <a href="#"><img src="https://img.shields.io/badge/-npx%20brignano-white?style=flat-square&logo=npm&logoColor=grey" align="right" alt="npm Badge"></img></a>
2
2
 
3
- An interactive shell experience that renders my business card in your terminal.
3
+ An interactive terminal business card for Anthony Brignano. Run it with `npx` to get a gradient ASCII-art intro, a styled card with **live GitHub stats**, and quick actions — copy my email, open my socials, save my contact, or grab a scannable QR code.
4
+
5
+ ## Quick start
4
6
 
5
- 👇 just hit
6
7
  ```bash
7
8
  npx brignano
8
9
  ```
9
10
 
10
- ### DEMO
11
+ ![](demo.gif)
12
+
13
+ ## What it does
14
+
15
+ - **Gradient ASCII banner** (`figlet` + `gradient-string`) with a smooth line-by-line reveal animation.
16
+ - **Styled business card** (`boxen` + `chalk`) with name, role, and links.
17
+ - **Live GitHub stats** — follower/repo counts and my latest repo, fetched fresh with a strict ~1.5s timeout. If the network is slow or offline, the card renders instantly and just omits the live line. It never hangs.
18
+ - **Interactive menu** (`inquirer`) with quick actions:
19
+ - Copy my email to your clipboard
20
+ - Send me an email (`mailto:`)
21
+ - Open my GitHub / LinkedIn
22
+ - View my resume
23
+ - Save my contact as a `.vcf` (opens in Contacts)
24
+ - Show a scannable contact **QR code**
25
+ - Quit
26
+
27
+ The animation, network fetch, and prompt are all skipped automatically when output isn't a TTY (piped, CI, or `--no-prompt`), so it stays fast and never blocks scripts.
28
+
29
+ ## CLI
30
+
31
+ Run `npx brignano --help` to see this list.
32
+
33
+ | Flag | Description |
34
+ |------|-------------|
35
+ | `-h, --help` | Show help and exit. |
36
+ | `-v, --view` | Open my resume in your default browser (`https://brignano.io/resume`). |
37
+ | `-e, --email` | Open your mail client with a new message to `hi@brignano.io`. |
38
+ | `--qr` | Print a scannable QR code to my website and exit. |
39
+ | `--vcard` / `--save-contact` | Save my contact card (`.vcf`) and open it. |
40
+ | `--no-animation` | Render the full card instantly, skipping the reveal animation. |
41
+ | `--no-prompt` | Show the card only and exit (non-interactive). |
42
+ | `-d, --download` | Deprecated alias for `--view`. |
43
+
44
+ ### Examples
45
+
46
+ ```bash
47
+ npx brignano # full interactive experience
48
+ npx brignano --view # jump straight to my resume
49
+ npx brignano --qr # print a QR code to my site
50
+ npx brignano --vcard # save my contact card
51
+ npx brignano --no-prompt # card only (useful in CI/scripts)
52
+ ```
53
+
54
+ ## Local development
55
+
56
+ ```bash
57
+ git clone https://github.com/brignano/npx-brignano.git
58
+ cd npx-brignano
59
+ npm install
60
+ npm run build
61
+ node dist/card.js
62
+ ```
63
+
64
+ Source lives in `src/` (split into small modules — `card.ts` is the entry/`bin` target) and compiles to `dist/` via `tsc`.
65
+
66
+ ## Prerequisites
67
+
68
+ - Node.js **>=20** (`npx` ships with npm).
69
+
70
+ ## Notes
71
+
72
+ - Links printed in the card are cmd/ctrl+clickable in supported terminals.
73
+ - The `--download` flag is deprecated and now opens the resume in your browser instead of writing a local file.
74
+
75
+ ## Credits
76
+
77
+ Inspired by [anmol098/npx_card](https://github.com/anmol098/npx_card).
11
78
 
12
- ![](https://raw.githubusercontent.com/brignano/npx_brignano/main/demo.gif)
79
+ ## License
13
80
 
14
- > _100% credit to [anmol098/npx_card](https://github.com/anmol098/npx_card)_
81
+ See `package.json` for license information.