Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0f4cd97eb | ||
|
|
8de40357a6 | ||
|
|
b3ec6c74e8 | ||
|
|
9c2bd60cc5 |
No files matched your search
@@ -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
@@ -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 () => {
|
||||||
|
|||||||
Generated
+2
-2
@@ -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
@@ -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",
|
||||||
|
|||||||
Reference in new issue
Block a user