chore: clean up repository - remove dev files and update .gitignore
- Remove .kiro/ directory (Kiro IDE specific files) - Remove .github/ directory (GitHub workflows) - Remove coverage/ directory (test coverage reports) - Remove local .gimsrc config file - Update .gitignore to exclude dev/build directories - Keep only essential project files for npm package
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"provider": "openai",
|
|
||||||
"model": "",
|
|
||||||
"conventional": true,
|
|
||||||
"copy": true,
|
|
||||||
"autoStage": false,
|
|
||||||
"maxDiffSize": 100000,
|
|
||||||
"cacheEnabled": true,
|
|
||||||
"progressIndicators": true
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
+13
-2
@@ -1,9 +1,9 @@
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
# Lock files
|
# Lock files (keep package-lock.json for consistency)
|
||||||
package-lock.json
|
|
||||||
bun.lock
|
bun.lock
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
.env
|
.env
|
||||||
@@ -27,6 +27,14 @@ pids
|
|||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage/
|
coverage/
|
||||||
|
|
||||||
|
# Development and build tools
|
||||||
|
.kiro/
|
||||||
|
.github/
|
||||||
|
.npm-cache/
|
||||||
|
.cache/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
# OS generated files
|
# OS generated files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.DS_Store?
|
.DS_Store?
|
||||||
@@ -46,3 +54,6 @@ Thumbs.db
|
|||||||
# Temporary files
|
# Temporary files
|
||||||
*.tmp
|
*.tmp
|
||||||
*.temp
|
*.temp
|
||||||
|
|
||||||
|
# Local configuration files
|
||||||
|
.gimsrc
|
||||||
@@ -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.
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user