#!/usr/bin/env node /** * ───────────────────────────────────────────── * SPB Git — Personal Git Platform * ───────────────────────────────────────────── * Author : Simon-Pierre Boucher * Contact : contact@spboucher.ai * File : cli/spbgit.mjs * Purpose : spbgit CLI entry point — terminal command center * License : MIT © Simon-Pierre Boucher * ───────────────────────────────────────────── */ import { Command } from 'commander'; import pc from 'picocolors'; import { registerInit } from './commands/init.mjs'; import { registerToken } from './commands/token.mjs'; import { registerList } from './commands/list.mjs'; import { registerCreate } from './commands/create.mjs'; import { registerClone } from './commands/clone.mjs'; import { registerStatus } from './commands/status.mjs'; import { registerCommit } from './commands/commit.mjs'; import { registerPush } from './commands/push.mjs'; import { registerPull } from './commands/pull.mjs'; import { registerSync } from './commands/sync.mjs'; import { registerOpen } from './commands/open.mjs'; import { registerInfo } from './commands/info.mjs'; import { registerRm } from './commands/rm.mjs'; import { registerDoctor } from './commands/doctor.mjs'; import { registerRelease } from './commands/release.mjs'; const program = new Command(); program .name('spbgit') .description('SPB Git — manage every repository on git.spboucher.ai from the terminal') .version('1.0.0'); for (const register of [ registerInit, registerToken, registerList, registerCreate, registerClone, registerStatus, registerCommit, registerPush, registerPull, registerSync, registerOpen, registerInfo, registerRm, registerDoctor, registerRelease, ]) { register(program); } program.parseAsync(process.argv).catch((err) => { console.error(pc.red(`✗ ${err.message}`)); process.exit(1); });