fix: Rename files to correct paths (remove leading dots)
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-03 08:05:34 +00:00
parent ddcfde4be2
commit 3648b3e2cf

40
src/index.ts Normal file
View File

@@ -0,0 +1,40 @@
#!/usr/bin/env node
import { Command } from 'commander';
import chalk from 'chalk';
import {
createCreateCommand,
createListCommand,
createStatusCommand,
createMergeCommand,
createDestroyCommand,
createDiffCommand
} from './commands';
import { loadGlobalConfig } from './utils/file-utils';
const program = new Command();
program
.name('git-agent-sync')
.alias('gas')
.description('Manage isolated git worktrees for AI coding agents')
.version('1.0.0')
.addCommand(createCreateCommand())
.addCommand(createListCommand())
.addCommand(createStatusCommand())
.addCommand(createMergeCommand())
.addCommand(createDestroyCommand())
.addCommand(createDiffCommand())
.configureHelp({
subcommandTerm: (cmd) => cmd.name(),
argumentTerm: (arg) => `<${arg}>`,
optionTerm: (opt) => opt.short ? `-${opt.short}, --${opt.long}` : `--${opt.long}`
})
.addHelpCommand('help', 'Show help for a command');
program.parse();
process.on('unhandledRejection', (reason: any) => {
console.error(chalk.red('\n❌ Unhandled error:'), reason?.message || reason);
process.exit(1);
});