Something went wrong. Try again.
A fully featured CLI used as an alternative to AppView applications (Bsky.app/mu.social)
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425#!/usr/bin/env node// Writes skills/atcli/reference.md from the command tree: every command, its// arguments and options, as the parser knows them. Generated so that it cannot// drift from the CLI; `npm test` fails when it is out of date.//// node tools/reference.ts write it// node tools/reference.ts --check exit 1 if it is not currentimport * as FS from 'node:fs';import * as PATH from 'node:path';import { reference } from '../src/reference.ts';
const FILE = PATH.resolve(import.meta.dirname, '..', 'skills', 'atcli', 'reference.md');const text = reference();
if (process.argv.includes('--check')) { const current = FS.existsSync(FILE) ? FS.readFileSync(FILE, 'utf-8') : ''; if (current !== text) { console.error(`${PATH.relative(process.cwd(), FILE)} is out of date: run 'node tools/reference.ts'`); process.exit(1); }} else { FS.writeFileSync(FILE, text); console.error(`* wrote ${PATH.relative(process.cwd(), FILE)}`);}