{"id":18075749,"url":"https://github.com/sidedwards/auto-commit","last_synced_at":"2025-04-12T08:09:12.462Z","repository":{"id":259430086,"uuid":"877087811","full_name":"sidedwards/auto-commit","owner":"sidedwards","description":"Automatically generate git commit messages.","archived":false,"fork":false,"pushed_at":"2025-02-27T07:26:10.000Z","size":124,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T08:08:47.433Z","etag":null,"topics":["ai","cli","commit-messages","deno","developer-tools","git","git-tools"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sidedwards.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T04:14:03.000Z","updated_at":"2025-02-27T07:26:13.000Z","dependencies_parsed_at":"2024-10-25T10:12:04.233Z","dependency_job_id":"86266dfd-4522-4128-85ad-651b9d024a4a","html_url":"https://github.com/sidedwards/auto-commit","commit_stats":null,"previous_names":["sidedwards/auto-commit"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidedwards%2Fauto-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidedwards%2Fauto-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidedwards%2Fauto-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidedwards%2Fauto-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidedwards","download_url":"https://codeload.github.com/sidedwards/auto-commit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537137,"owners_count":21120709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","commit-messages","deno","developer-tools","git","git-tools"],"created_at":"2024-10-31T11:07:10.698Z","updated_at":"2025-04-12T08:09:12.436Z","avatar_url":"https://github.com/sidedwards.png","language":"TypeScript","readme":"# auto-commit\n\nAutomatically generate git commit messages using Claude 3 Haiku. This tool analyzes your staged changes and creates clear, concise commit messages. It uses the Conventional Commit format by default but can adapt to repository-specific or author-specific styles.\n\n![auto-commit-demo](https://github.com/user-attachments/assets/5ae52cd3-327a-4452-9674-a6eb2d3b29ce)\n\n## Features\n\n- Generates clear, concise commit messages from staged changes\n- Supports multiple LLM providers:\n  - Anthropic Claude (default)\n  - OpenAI GPT models\n  - Ollama (local LLMs)\n- Supports various commit formats:\n  - Conventional Commits (default)\n  - Angular\n  - Semantic Git Commits (with emojis)\n  - Linux Kernel style\n  - GitHub issue-reference style (e.g., `[#123]: description`)\n  - Custom styles from repository or author history\n- Simple CLI interface\n\n## Quick Start\n\nGet up and running in minutes:\n\n1. **Install the tool**:\n   ```bash\n   curl -fsSL https://raw.githubusercontent.com/sidedwards/auto-commit/main/scripts/install.sh | bash\n   ```\n\n2. **Set up your API key** (if using Anthropic or OpenAI):\n   - Anthropic (default): [Get your API key](https://console.anthropic.com/account/keys)\n   - OpenAI: [Get your API key](https://platform.openai.com/api-keys)\n   - Ollama: No API key needed (ensure Ollama is running locally).\n\n3. **Generate a commit message**:\n   ```bash\n   git add \u003cfiles\u003e\n   auto-commit\n   ```\n\n4. **Review and confirm**:\n   - Accept, edit, reject, or regenerate the proposed commit message.\n\n## Installation\n\n### Quick Install (Recommended for macOS/Linux)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/sidedwards/auto-commit/main/scripts/install.sh | bash\n```\n\nThis script:\n- Downloads the correct binary for your system.\n- Adds it to your PATH.\n- Makes it executable.\n\n### Manual Installation\n\n1. Download the latest release from [GitHub Releases](https://github.com/sidedwards/auto-commit/releases).\n2. Move the binary to a PATH directory and make it executable:\n\n   - **macOS (M1/M2)**:\n     ```bash\n     sudo mv auto-commit-darwin-arm64 /usr/local/bin/auto-commit\n     sudo chmod +x /usr/local/bin/auto-commit\n     ```\n   - **macOS (Intel)**:\n     ```bash\n     sudo mv auto-commit-darwin-x64 /usr/local/bin/auto-commit\n     sudo chmod +x /usr/local/bin/auto-commit\n     ```\n   - **Linux**:\n     ```bash\n     sudo mv auto-commit-linux-x64 /usr/local/bin/auto-commit\n     sudo chmod +x /usr/local/bin/auto-commit\n     ```\n   - **Windows (PowerShell as Admin)**:\n     ```powershell\n     move auto-commit-windows-x64.exe C:\\Windows\\System32\\auto-commit.exe\n     ```\n\n### Install from Source\n\n1. Install [Deno](https://deno.land/):\n   ```bash\n   curl -fsSL https://deno.land/x/install/install.sh | sh\n   ```\n2. Clone and install:\n   ```bash\n   git clone https://github.com/sidedwards/auto-commit.git\n   cd auto-commit\n   deno task install\n   ```\n\n### Updating\n\n- **Quick Install or Manual**:\n  ```bash\n  curl -fsSL https://raw.githubusercontent.com/sidedwards/auto-commit/main/scripts/install.sh | bash\n  ```\n- **From Source**:\n  ```bash\n  cd auto-commit\n  deno task update\n  ```\n\n## Usage\n\n### Basic Usage\n\n1. Stage your changes:\n   ```bash\n   git add \u003cfiles\u003e\n   ```\n2. Run the tool:\n   ```bash\n   auto-commit\n   ```\n3. Review the commit message and select:\n   - `(a)ccept`\n   - `(e)dit`\n   - `(r)eject`\n   - `(n)ew message`\n\n### Advanced Options\n\n- **Add a Git alias**:\n  ```bash\n  git config --global alias.ac '!auto-commit'\n  ```\n  Then use: `git ac`\n\n- **Choose a commit format**:\n  ```bash\n  auto-commit --format=conventional  # Default\n  auto-commit --format=angular      # Angular style\n  auto-commit --format=semantic     # With emojis\n  auto-commit --format=kernel       # Linux Kernel style\n  auto-commit --format=issue        # GitHub issue-reference\n  ```\n\n- **Learn custom styles**:\n  - From repository history:\n    ```bash\n    auto-commit --learn\n    ```\n  - From a specific author:\n    ```bash\n    auto-commit --learn --author=\"user@example.com\"\n    ```\n\n- **List repository authors**:\n  ```bash\n  auto-commit --list-authors\n  ```\n\n## LLM Provider Options\n\nChoose the LLM provider and model that best suits your needs.\n\n### Providers and Models\n\n- **Anthropic Claude** (default):\n  - `claude-3-5-haiku-20241022` (default): Fast and compact.\n  - `claude-3-5-sonnet-20241022`: Balanced performance.\n  - `claude-3-7-sonnet-20250219`: Most powerful with reasoning.\n\n- **OpenAI**:\n  - `gpt-4o-mini` (default): Fast and cost-effective.\n  - `gpt-4o`: Fast, intelligent, and flexible.\n  - `o3-mini`: Fast and flexible with reasoning.\n  - `o1`: High intelligence with reasoning.\n\n- **Ollama** (local LLMs):\n  - Depends on your Ollama setup. Examples:\n    - `llama3` (default): Meta's latest model.\n    - `mistral`: Mistral 7B.\n    - `mixtral`: Mixtral 8x7B.\n    - `codellama`: Code-optimized.\n\n### Commands\n\n- **List all models**:\n  ```bash\n  auto-commit --list-models\n  ```\n- **List models for a provider**:\n  ```bash\n  auto-commit --list-models --provider=anthropic\n  ```\n- **Use a specific provider/model**:\n  ```bash\n  auto-commit --provider=anthropic --model=claude-3-opus-20240229\n  auto-commit --provider=openai --model=gpt-4o\n  auto-commit --provider=ollama --model=llama3\n  ```\n- **Custom Ollama URL**:\n  ```bash\n  auto-commit --provider=ollama --base-url=http://localhost:11434\n  ```\n\n## Configuration\n\n- **API Keys**:\n  - Required for Anthropic/OpenAI; set on first run.\n  - Not needed for Ollama (just run the Ollama server locally).\n  - Links: [Anthropic](https://console.anthropic.com/account/keys) | [OpenAI](https://platform.openai.com/api-keys)\n\n- **Commit Formats**:\n  - Default: Conventional Commits.\n  - Change with `--format` (see Usage).\n\n- **Custom Styles**:\n  - Train with `--learn` or `--learn --author=\"email\"`.\n\n## Requirements\n\n- Git\n- GitHub CLI (gh) - for issue integration\n- Vim - for editing commit messages\n- API keys (Anthropic/OpenAI) or Ollama running locally\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidedwards%2Fauto-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidedwards%2Fauto-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidedwards%2Fauto-commit/lists"}