diff --git a/.gimsrc b/.gimsrc deleted file mode 100644 index a9a600c..0000000 --- a/.gimsrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "provider": "openai", - "model": "", - "conventional": true, - "copy": true, - "autoStage": false, - "maxDiffSize": 100000, - "cacheEnabled": true, - "progressIndicators": true -} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f467ca1..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: release to npm - -on: - push: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm test diff --git a/.gitignore b/.gitignore index f7b6b76..5c83f41 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ # Dependencies node_modules/ -# Lock files -package-lock.json +# Lock files (keep package-lock.json for consistency) bun.lock +yarn.lock # Environment variables .env @@ -27,6 +27,14 @@ pids # Coverage directory used by tools like istanbul coverage/ +# Development and build tools +.kiro/ +.github/ +.npm-cache/ +.cache/ +dist/ +build/ + # OS generated files .DS_Store .DS_Store? @@ -45,4 +53,7 @@ Thumbs.db # Temporary files *.tmp -*.temp \ No newline at end of file +*.temp + +# Local configuration files +.gimsrc \ No newline at end of file diff --git a/.kiro/steering/product.md b/.kiro/steering/product.md deleted file mode 100644 index 30ec846..0000000 --- a/.kiro/steering/product.md +++ /dev/null @@ -1,21 +0,0 @@ -# GIMS - Git Made Simple - -GIMS is an AI-powered Git CLI tool that automatically generates meaningful commit messages from code changes. It's designed to replace generic commit messages with descriptive, professional ones that tell a story. - -## Core Value Proposition -- Eliminates the need to write commit messages manually -- Uses AI (OpenAI, Google Gemini, Groq) to analyze code diffs and generate contextual messages -- Provides a streamlined Git workflow with single-command operations -- Supports both local and remote operations with intelligent fallbacks - -## Key Features -- AI-powered commit message generation from code diffs -- One-command workflow: analyze, commit, and push (`g o`) -- Smart suggestions with clipboard integration (`g s`) -- Conventional Commits support -- Numbered commit history and branch management -- Safe operations with confirmations and dry-run support -- Graceful fallbacks for large diffs and offline use - -## Target Users -Developers who want to maintain clean Git history without spending time crafting commit messages, especially those working on projects where commit message quality matters for collaboration and code review. \ No newline at end of file diff --git a/.kiro/steering/structure.md b/.kiro/steering/structure.md deleted file mode 100644 index ee00993..0000000 --- a/.kiro/steering/structure.md +++ /dev/null @@ -1,72 +0,0 @@ -# Project Structure - -## Directory Layout -``` -gims/ -├── bin/ -│ └── gims.js # Main CLI executable and entry point -├── node_modules/ # npm dependencies (auto-generated) -├── .npm-cache/ # npm cache directory (auto-generated) -├── .github/ # GitHub workflows and templates -├── .git/ # Git repository data -├── .kiro/ # Kiro AI assistant configuration -│ └── steering/ # AI guidance documents -├── package.json # Project metadata and dependencies -├── package-lock.json # Dependency lock file -├── README.md # Comprehensive project documentation -├── LICENSE # MIT license -└── .gitignore # Git ignore patterns -``` - -## Key Files - -### `bin/gims.js` -- **Purpose**: Single-file CLI application containing all functionality -- **Structure**: Monolithic approach with utility functions, command handlers, and AI integration -- **Exports**: Executable binary via shebang (`#!/usr/bin/env node`) -- **Commands**: All CLI commands and subcommands defined in this file - -### `package.json` -- **Binary entries**: `gims` and `g` both point to `bin/gims.js` -- **Main entry**: Points to `bin/gims.js` -- **Scripts**: Minimal test script placeholder -- **Keywords**: Focused on git, cli, ai, commit, developer-tools - -### Configuration Files -- **`.gimsrc`**: Optional JSON config (project root or home directory) -- **Environment variables**: API keys and default settings -- **Git integration**: Uses existing `.git` directory and configuration - -## Architecture Principles - -### Single-File Design -- All functionality consolidated in `bin/gims.js` for simplicity -- No separate modules or complex directory structure -- Easy to understand, debug, and maintain -- Reduces complexity for a CLI tool - -### Command Structure -- Uses commander.js for CLI parsing and command organization -- Short aliases for all commands (`g o`, `g s`, `g l`, etc.) -- Consistent option patterns across commands -- Global options available to all subcommands - -### File Naming Conventions -- Executable files in `bin/` directory -- Configuration files use dotfile convention (`.gimsrc`) -- Standard npm project files (package.json, README.md, LICENSE) -- No custom file extensions or special naming schemes - -## Development Guidelines - -### Adding New Features -- Add new commands directly to `bin/gims.js` -- Follow existing pattern of command definition with commander.js -- Maintain consistent error handling and logging patterns -- Add appropriate help text and examples - -### Configuration Management -- Environment variables for sensitive data (API keys) -- JSON config files for user preferences -- Runtime detection and fallback logic -- Validate configuration at startup when needed \ No newline at end of file diff --git a/.kiro/steering/tech.md b/.kiro/steering/tech.md deleted file mode 100644 index e67e2f6..0000000 --- a/.kiro/steering/tech.md +++ /dev/null @@ -1,68 +0,0 @@ -# Technology Stack - -## Runtime & Language -- **Node.js**: >= 18.18.0 (Node 20+ recommended) -- **JavaScript**: CommonJS modules (`"type": "commonjs"`) -- **Package Manager**: npm (with package-lock.json) - -## Core Dependencies -- **commander**: CLI framework for command parsing and structure -- **simple-git**: Git operations and repository management -- **clipboardy**: Cross-platform clipboard operations -- **@google/genai**: Google Gemini AI integration -- **openai**: OpenAI API client - -## Architecture Patterns -- Single-file CLI application (`bin/gims.js`) -- Functional programming approach with utility functions -- Configuration via environment variables and `.gimsrc` JSON files -- Graceful fallbacks and error handling throughout -- ANSI color utilities without external dependencies - -## Code Style Conventions -- Use `const` for immutable values, avoid `var` -- Prefer template literals for string interpolation -- Use async/await for asynchronous operations -- Implement comprehensive error handling with try/catch -- Keep functions focused and modular -- Use descriptive variable names (e.g., `rawDiff`, `prefProvider`) -- Comment complex logic and AI prompt engineering sections - -## Common Commands - -### Development -```bash -# Install dependencies -npm install - -# Test installation -npm test # Currently returns "No tests yet" - -# Global installation for testing -npm install -g . -``` - -### Publishing -```bash -# Update version -npm version patch|minor|major - -# Publish to npm -npm publish -``` - -### Local Development Testing -```bash -# Link for local testing -npm link - -# Test CLI commands -gims --help -g --help -``` - -## Configuration Management -- Environment variables for API keys (`OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY`) -- Optional `.gimsrc` JSON config in project root or home directory -- Runtime provider detection and fallback logic -- Support for custom models and base URLs \ No newline at end of file