4 Commits
Author SHA1 Message Date
s41r4j c0f4cd97eb 0.5.4 2025-09-12 14:47:14 +05:30
s41r4j 8de40357a6 chore: support Node 18 and pin @google/genai
- Relax engines to >=18.18.0\n- Pin @google/genai to 1.5.1 to avoid Node 20-only releases\n- Docs: add nvm steps and npm global prefix guidance for EACCES on Linux
2025-09-12 14:47:10 +05:30
s41r4j b3ec6c74e8 0.5.3 2025-09-10 15:06:13 +05:30
s41r4j 9c2bd60cc5 0.5.2 2025-09-10 15:05:25 +05:30
4 changed files with 56 additions and 6 deletions

No files matched your search

+25 -1
View File
@@ -60,12 +60,35 @@ g o # AI analyzes changes, commits with perfect message, and pushes!
## 🚀 Quick Start ## 🚀 Quick Start
### Prerequisites
- Node.js >= 18.18.0 (Node 20+ recommended)
- npm >= 9
Tip: Use nvm to manage Node versions per-user without sudo:
```bash
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh"
nvm install 20 && nvm alias default 20
```
### Installation ### Installation
```bash ```bash
npm install -g gims npm install -g gims
``` ```
If you get EACCES permission errors on Linux when installing globally, set a user prefix:
```bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
npm install -g gims
```
### Setup AI (Choose One) ### Setup AI (Choose One)
**Option 1: OpenAI** **Option 1: OpenAI**
@@ -109,6 +132,7 @@ g o
| `gims online` | `g o` | AI commit + push (use `--set-upstream` on first push) | `g o --set-upstream` | | `gims online` | `g o` | AI commit + push (use `--set-upstream` on first push) | `g o --set-upstream` |
| `gims commit <message...>` | `g m` | Commit with a custom message (no AI) | `g m "fix: handle empty input"` | | `gims commit <message...>` | `g m` | Commit with a custom message (no AI) | `g m "fix: handle empty input"` |
| `gims pull` | `g p` | Pull latest changes | `g p` | | `gims pull` | `g p` | Pull latest changes | `g p` |
| `gims amend` | `g a` | Stage all changes and amend the last commit (reuse message) | `g a` |
| `gims list` | `g ls` | Show numbered commit history | `g ls` | | `gims list` | `g ls` | Show numbered commit history | `g ls` |
| `gims largelist` | `g ll` | Detailed commit history | `g ll` | | `gims largelist` | `g ll` | Detailed commit history | `g ll` |
| `gims branch <n>` | `g b` | Branch from commit #n | `g b 3 feature-x` | | `gims branch <n>` | `g b` | Branch from commit #n | `g b 3 feature-x` |
@@ -301,4 +325,4 @@ MIT © [Your Name](https://github.com/yourusername)
*Made with ❤️ by developers who hate writing commit messages* *Made with ❤️ by developers who hate writing commit messages*
</div> </div>
+26
View File
@@ -542,6 +542,32 @@ program.command('pull').alias('p')
catch (e) { handleError('Pull error', e); } catch (e) { handleError('Pull error', e); }
}); });
program.command('amend').alias('a')
.description('Stage all changes and amend last commit (no message edit)')
.action(async () => {
await ensureRepo();
try {
const { all } = await safeLog();
if (!all || all.length === 0) {
console.log('No commits to amend. Make an initial commit first.');
return;
}
await git.add('.');
const rawDiff = await git.diff(['--cached', '--no-ext-diff']);
if (!rawDiff.trim()) {
console.log('No staged changes to amend.');
return;
}
await git.raw(['commit', '--amend', '--no-edit']);
console.log('Amended last commit with staged changes.');
} catch (e) {
handleError('Amend error', e);
}
});
program.command('list').alias('ls') program.command('list').alias('ls')
.description('Short numbered git log (oldest → newest)') .description('Short numbered git log (oldest → newest)')
.action(async () => { .action(async () => {
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "gims", "name": "gims",
"version": "0.4.3", "version": "0.5.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "gims", "name": "gims",
"version": "0.4.3", "version": "0.5.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@google/genai": "^1.5.1", "@google/genai": "^1.5.1",
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "gims", "name": "gims",
"version": "0.5.1", "version": "0.5.4",
"description": "Git Made Simple – AI‑powered git helper using Gemini / OpenAI", "description": "Git Made Simple – AI‑powered git helper using Gemini / OpenAI",
"author": "S41R4J", "author": "S41R4J",
"license": "MIT", "license": "MIT",
@@ -29,10 +29,10 @@
"homepage": "https://github.com/s41r4j/gims#readme", "homepage": "https://github.com/s41r4j/gims#readme",
"main": "bin/gims.js", "main": "bin/gims.js",
"engines": { "engines": {
"node": ">=20.0.0" "node": ">=18.18.0"
}, },
"dependencies": { "dependencies": {
"@google/genai": "^1.5.1", "@google/genai": "1.5.1",
"clipboardy": "^3.0.0", "clipboardy": "^3.0.0",
"commander": "^11.1.0", "commander": "^11.1.0",
"openai": "^4.0.0", "openai": "^4.0.0",