···143143}
144144145145program.name('wisp-cli').description('CLI for wisp.place - deploy static sites to the AT Protocol').version('1.1.1')
146146+ .option('-q, --quiet', 'Suppress progress output (also set via WISPCTL_NO_PROGRESS=1)')
146147147148// Deploy command (default)
148149program
···556557 await clearDirSession(options.db)
557558 }
558559 })
560560+561561+// Set WISPCTL_NO_PROGRESS from --quiet flag before any command runs
562562+program.hook('preAction', () => {
563563+ if (program.opts().quiet) {
564564+ process.env.WISPCTL_NO_PROGRESS = '1'
565565+ }
566566+})
559567560568program.parse()
+24
cli/lib/progress.ts
···2020}
21212222export function createSpinner(text: string): SpinnerLike {
2323+ // when no tty is attached or WISPCTL_NO_PROGRESS is set, return a silent spinner
2424+ if (!process.stdout.isTTY || process.env.WISPCTL_NO_PROGRESS === '1') {
2525+ let currentText = text
2626+ return {
2727+ get text() {
2828+ return currentText
2929+ },
3030+ set text(newText: string) {
3131+ currentText = newText
3232+ },
3333+ start() {
3434+ return this
3535+ },
3636+ succeed(message?: string) {
3737+ console.log(`✓ ${message ?? currentText}`)
3838+ return this
3939+ },
4040+ fail(message?: string) {
4141+ console.error(`✗ ${message ?? currentText}`)
4242+ return this
4343+ },
4444+ }
4545+ }
4646+2347 const s = spinner()
2448 let currentText = text
2549 let started = false