From bd3309d31b8cd02bdbdec0bb4d33a561f5e5a551 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Wed, 11 Mar 2026 01:10:13 -0600 Subject: [PATCH] feat(postinstall): add branded GSD banner with version and next-step hint --- scripts/postinstall.js | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 991a5e821..a2bc40da1 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -1,10 +1,45 @@ #!/usr/bin/env node import { execSync } from 'child_process' +import { createRequire } from 'module' import os from 'os' +import { fileURLToPath } from 'url' +import { dirname, resolve } from 'path' +const __dirname = dirname(fileURLToPath(import.meta.url)) +const require = createRequire(import.meta.url) +const pkg = require(resolve(__dirname, '..', 'package.json')) + +// Colors +const cyan = '\x1b[36m' +const green = '\x1b[32m' +const yellow = '\x1b[33m' +const dim = '\x1b[2m' +const reset = '\x1b[0m' + +const banner = + '\n' + + cyan + + ' ██████╗ ███████╗██████╗ \n' + + ' ██╔════╝ ██╔════╝██╔══██╗\n' + + ' ██║ ███╗███████╗██║ ██║\n' + + ' ██║ ██║╚════██║██║ ██║\n' + + ' ╚██████╔╝███████║██████╔╝\n' + + ' ╚═════╝ ╚══════╝╚═════╝ ' + + reset + '\n' + + '\n' + + ` Get Shit Done ${dim}v${pkg.version}${reset}\n` + + ` A standalone coding agent that plans, executes, and ships.\n` + + '\n' + + ` ${green}✓${reset} Installed successfully\n` + + ` ${dim}Run ${reset}${cyan}gsd${reset}${dim} to get started.${reset}\n` + +console.log(banner) + +// Install Playwright chromium for browser tools (non-fatal) const args = os.platform() === 'linux' ? '--with-deps' : '' try { execSync(`npx playwright install chromium ${args}`, { stdio: 'inherit' }) + console.log(`\n ${green}✓${reset} Browser tools ready\n`) } catch { - // Non-fatal — browser tools will show a clear error if playwright is missing + console.log(`\n ${yellow}⚠${reset} Browser tools unavailable — run ${cyan}npx playwright install chromium${reset} to enable\n`) }