fix: add -v flag, rename help-quick to quick-help, add push command

- Add -v/--version flag to show version number
- Rename help-quick command to quick-help (alias 'q' still works)
- Add standalone 'push' command (g push or gims push)
- Bumped version to 0.6.7
This commit is contained in:
s41r4j
2025-10-26 21:33:23 +05:30
parent 5846c77f51
commit 4a30dd018f
3 changed files with 24 additions and 3 deletions
+14 -2
View File
@@ -137,7 +137,7 @@ async function hasChanges() {
program
.name('gims')
.alias('g')
.version(require('../package.json').version)
.version(require('../package.json').version, '-v, --version', 'Output the version number')
.option('--provider <name>', 'AI provider: auto|openai|gemini|groq|none')
.option('--model <name>', 'Model identifier for provider')
.option('--staged-only', 'Use only staged changes (default for suggest)')
@@ -321,7 +321,7 @@ program.command('config')
}
});
program.command('help-quick').alias('q')
program.command('quick-help').alias('q')
.description('Show quick reference for main commands')
.action(() => {
console.log(color.bold('🚀 GIMS Quick Reference\n'));
@@ -648,6 +648,18 @@ program.command('pull')
catch (e) { handleError('Pull error', e); }
});
program.command('push')
.description('Push commits to remote')
.action(async () => {
await ensureRepo();
try {
Progress.info('Pushing to remote...');
await git.push();
Progress.success('Pushed to remote');
}
catch (e) { handleError('Push error', e); }
});
program.command('sync')
.description('Smart sync: pull + rebase/merge')
.option('--rebase', 'Use rebase instead of merge')