[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71302":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},71302,"aicommits","Nutlope\u002Faicommits","Nutlope","A CLI that writes your git commit messages for you with AI","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Faicommits",null,"TypeScript",9010,463,30,4,0,10,39,12,"MIT License",false,"develop",true,[],"2026-06-12 02:02:50","\u003Cdiv align=\"center\">\n  \u003Cdiv>\n    \u003Cimg src=\".github\u002Fscreenshot.png\" alt=\"AI Commits\"\u002F>\n    \u003Cimg src=\".\u002Faic.png\" width=\"50\" alt=\"AI Commits\"\u002F>\n    \u003Ch1 align=\"center\">AI Commits\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n  \u003Cp>A CLI that writes your git commit messages for you with AI. Never write a commit message again.\u003C\u002Fp>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Faicommits\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Faicommits\" alt=\"Current version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Faicommits\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Faicommits\" alt=\"Downloads\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n## Setup\n\n> The minimum supported version of Node.js is v22. Check your Node.js version with `node --version`.\n\n1. Install _aicommits_:\n\n   ```sh\n   npm install -g aicommits\n   ```\n\n2. Run the setup command to choose your AI provider:\n\n   ```sh\n   aicommits setup\n   ```\n\nThis will guide you through:\n\n- Selecting your AI provider (sets the `provider` config)\n- Configuring your API key\n- **Automatically fetching and selecting from available models** (when supported)\n- **Choosing your preferred commit message format** (plain, conventional, conventional+body, gitmoji, or subject+body)\n\n  Supported providers include:\n\n  - **TogetherAI** (recommended) - Get your API key from [TogetherAI](https:\u002F\u002Fapi.together.ai\u002F)\n  - **OpenAI** - Get your API key from [OpenAI API Keys page](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys)\n  - **Groq** - Get your API key from [Groq Console](https:\u002F\u002Fconsole.groq.com\u002Fkeys)\n  - **xAI** - Get your API key from [xAI Console](https:\u002F\u002Fconsole.x.ai\u002F)\n  - **OpenRouter** - Get your API key from [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002Fkeys)\n  - **Ollama** (local) - Run AI models locally with [Ollama](https:\u002F\u002Follama.ai)\n  - **LM Studio** (local) - No API key required. Runs on your computer via [LM Studio](https:\u002F\u002Flmstudio.ai\u002F)\n  - **Custom OpenAI-compatible endpoint** - Use any service that implements the OpenAI API\n\n  **For CI\u002FCD environments**, you can also set up configuration via the config file:\n\n  ```bash\n  aicommits config set OPENAI_API_KEY=\"your_api_key_here\"\n  aicommits config set OPENAI_BASE_URL=\"your_api_endpoint\"  # Optional, for custom endpoints\n  aicommits config set OPENAI_MODEL=\"your_model_choice\"     # Optional, defaults to provider default\n  ```\n\n  > **Note:** When using environment variables, ensure all related variables (e.g., `OPENAI_API_KEY` and `OPENAI_BASE_URL`) are set consistently to avoid configuration mismatches with the config file.\n\n  This will create a `.aicommits` file in your home directory.\n\n### Upgrading\n\nCheck the installed version with:\n\n```sh\naicommits --version\n```\n\nTo update to the latest version, run:\n\n```sh\naicommits update\n```\n\nThis will automatically detect your package manager (npm, pnpm, yarn, or bun) and update using the correct command.\n\nAlternatively, you can manually update:\n\n```sh\nnpm install -g aicommits\n```\n\n## Usage\n\n### CLI mode\n\nYou can call `aicommits` directly to generate a commit message for your staged changes:\n\n```sh\ngit add \u003Cfiles...>\naicommits\n```\n\n`aicommits` passes down unknown flags to `git commit`, so you can pass in [`commit` flags](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgit-commit).\n\nFor example, you can stage all changes in tracked files with as you commit:\n\n```sh\naicommits --all # or -a\n```\n\n> 👉 **Tip:** Use the `aic` alias if `aicommits` is too long for you.\n\n#### CLI Options\n\n- `--all` or `-a`: Automatically stage changes in tracked files for the commit (default: **false**)\n- `--clipboard` or `-c`: Copy the selected message to the clipboard instead of committing (default: **false**)\n- `--generate` or `-g`: Number of messages to generate (default: **1**)\n- `--exclude` or `-x`: Files to exclude from AI analysis\n- `--type` or `-t`: Git commit message format (default: **plain**). Supports `plain`, `conventional`, `conventional+body`, `gitmoji`, and `subject+body`\n- `--prompt` or `-p`: Custom prompt to guide the LLM behavior (e.g., specific language, style instructions)\n- `--no-verify` or `-n`: Bypass pre-commit hooks while committing (default: **false**)\n- `--yes` or `-y`: Skip confirmation when committing after message generation (default: **false**)\n\n#### Generate multiple recommendations\n\nSometimes the recommended commit message isn't the best so you want it to generate a few to pick from. You can generate multiple commit messages at once by passing in the `--generate \u003Ci>` flag, where 'i' is the number of generated messages:\n\n```sh\naicommits --generate \u003Ci> # or -g \u003Ci>\n```\n\n> Warning: this uses more tokens, meaning it costs more.\n\n#### Commit Message Formats\n\nYou can choose from five different commit message formats:\n\n- **plain** (default): Simple, unstructured commit messages\n- **conventional**: [Conventional Commits](https:\u002F\u002Fconventionalcommits.org\u002F) format with type and scope\n- **conventional+body**: Conventional commit subject plus a body generated from the diff\n- **gitmoji**: Emoji-based commit messages\n- **subject+body**: Git-style subject line plus a body (description) generated from the diff\n\nUse the `--type` flag to specify the format:\n\n```sh\naicommits --type conventional      # or -t conventional\naicommits --type conventional+body # or -t conventional+body (conventional subject + body)\naicommits --type gitmoji           # or -t gitmoji\naicommits --type plain             # or -t plain (default)\naicommits --type subject+body      # or -t subject+body (subject + body)\n```\n\nThis feature is useful if your project follows a specific commit message standard or if you're using tools that rely on these commit formats.\n\n#### Custom Prompts\n\nYou can customize the LLM's behavior with the `--prompt` flag to guide commit message generation:\n\n```sh\n# Write commit messages in a specific language\naicommits -p \"Write commit messages in Italian\"\n\n# Focus on specific aspects of the changes\naicommits -p \"Focus on performance implications of changes\"\n\n# Use a specific style or tone\naicommits -p \"Use technical jargon suitable for senior developers\"\n\n# Include specific details in the message\naicommits -p \"Always mention the specific function names and file paths changed\"\n```\n\n### Git hook\n\nYou can also integrate _aicommits_ with Git via the [`prepare-commit-msg`](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgithooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.\n\n#### Install\n\nIn the Git repository you want to install the hook in:\n\n```sh\naicommits hook install\n```\n\n#### Uninstall\n\nIn the Git repository you want to uninstall the hook from:\n\n```sh\naicommits hook uninstall\n```\n\n#### Usage\n\n1. Stage your files and commit:\n\n   ```sh\n   git add \u003Cfiles...>\n   git commit # Only generates a message when it's not passed in\n   ```\n\n   > If you ever want to write your own message instead of generating one, you can simply pass one in: `git commit -m \"My message\"`\n\n2. Aicommits will generate the commit message for you and pass it back to Git. Git will open it with the [configured editor](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fgetting-started-with-git\u002Fassociating-text-editors-with-git) for you to review\u002Fedit it.\n\n3. Save and close the editor to commit!\n\n### Environment Variables\n\nYou can also configure aicommits using environment variables instead of the config file.\n\n**Example:**\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nexport OPENAI_BASE_URL=\"https:\u002F\u002Fapi.example.com\"\nexport OPENAI_MODEL=\"gpt-4\"\naicommits  # Uses environment variables\n```\n\nConfiguration settings are resolved in the following order of precedence:\n\n1. Command-line arguments\n2. Environment variables\n3. Configuration file\n4. Default values\n\n## Configuration\n\n### Viewing current configuration\n\nTo view all current configuration options that differ from defaults, run:\n\n```sh\naicommits config\n```\n\nThis will display only non-default configuration values with API keys masked for security. If no custom configuration is set, it will show \"(using all default values)\".\n\n### Changing your model\n\nTo interactively select or change your AI model, run:\n\n```sh\naicommits model\n```\n\nThis will:\n\n- Show your current provider and model\n- Fetch available models from your provider's API\n- Let you select from available models or enter a custom model name\n- Update your configuration automatically\n\n### Updating aicommits\n\nTo update to the latest version, run:\n\n```sh\naicommits update\n```\n\nThis will:\n\n- Check for the latest version on npm\n- Detect your package manager (npm, pnpm, yarn, or bun)\n- Update using the appropriate command\n- Show progress and confirm when complete\n\n### Reading a configuration value\n\nTo retrieve a configuration option, use the command:\n\n```sh\naicommits config get \u003Ckey>\n```\n\nFor example, to retrieve the API key, you can use:\n\n```sh\naicommits config get OPENAI_API_KEY\n```\n\nYou can also retrieve multiple configuration options at once by separating them with spaces:\n\n```sh\naicommits config get OPENAI_API_KEY generate\n```\n\n### Setting a configuration value\n\nTo set a configuration option, use the command:\n\n```sh\naicommits config set \u003Ckey>=\u003Cvalue>\n```\n\nFor example, to set the API key, you can use:\n\n```sh\naicommits config set OPENAI_API_KEY=\u003Cyour-api-key>\n```\n\nYou can also set multiple configuration options at once by separating them with spaces, like\n\n```sh\naicommits config set OPENAI_API_KEY=\u003Cyour-api-key> generate=3 locale=en\n```\n\n### Config Options\n\n#### OPENAI_API_KEY\n\nYour OpenAI API key or custom provider API Key\n\n#### OPENAI_BASE_URL\n\nCustom OpenAI-compatible API endpoint URL.\n\n#### OPENAI_MODEL\n\nModel to use for OpenAI-compatible providers.\n\n#### provider\n\nThe selected AI provider. Set automatically during `aicommits setup`. Valid values: `openai`, `togetherai`, `groq`, `xai`, `openrouter`, `ollama`, `lmstudio`, `custom`.\n\n#### locale\n\nDefault: `en`\n\nThe locale to use for the generated commit messages. Consult the list of codes in: https:\u002F\u002Fwikipedia.org\u002Fwiki\u002FList_of_ISO_639-1_codes.\n\n#### generate\n\nDefault: `1`\n\nThe number of commit messages to generate to pick from.\n\nNote, this will use more tokens as it generates more results.\n\n#### timeout\n\nThe timeout for network requests to the OpenAI API in milliseconds.\n\nDefault: `10000` (10 seconds)\n\n```sh\naicommits config set timeout=20000 # 20s\n```\n\n#### max-length\n\nThe maximum character length of the generated commit message.\n\nDefault: `72`\n\n```sh\naicommits config set max-length=100\n```\n\n#### type\n\nDefault: `plain`\n\nThe type of commit message to generate. Available options:\n\n- `plain`: Simple, unstructured commit messages\n- `conventional`: Conventional Commits format with type and scope\n- `conventional+body`: Conventional commit subject plus a body generated from the diff\n- `gitmoji`: Emoji-based commit messages\n- `subject+body`: Git-style subject line plus a body generated from the diff\n\nExamples:\n\n```sh\naicommits config set type=conventional\naicommits config set type=conventional+body\naicommits config set type=gitmoji\naicommits config set type=plain\naicommits config set type=subject+body\n```\n\n## How it works\n\nThis CLI tool runs `git diff` to grab all your latest code changes, sends them to the configured AI provider (TogetherAI by default), then returns the AI generated commit message.\n\nVideo coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI.\n\n## Maintainers\n\n- **Hassan El Mghari**: [@Nutlope](https:\u002F\u002Fgithub.com\u002FNutlope) [\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fnutlope?style=flat&label=nutlope&logo=twitter&color=0bf&logoColor=fff\" align=\"center\">](https:\u002F\u002Fx.com\u002Fnutlope)\n\n- **Riccardo Giorato**: [@riccardogiorato](https:\u002F\u002Fgithub.com\u002Friccardogiorato) [\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Friccardogiorato?style=flat&label=riccardogiorato&logo=twitter&color=0bf&logoColor=fff\" align=\"center\">](https:\u002F\u002Fx.com\u002Friccardogiorato)\n\n- **Hiroki Osame**: [@privatenumber](https:\u002F\u002Fgithub.com\u002Fprivatenumber) [\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fprivatenumbr?style=flat&label=privatenumbr&logo=twitter&color=0bf&logoColor=fff\" align=\"center\">](https:\u002F\u002Ftwitter.com\u002Fprivatenumbr)\n\n## Contributing\n\nIf you want to help fix a bug or implement a feature in [Issues](https:\u002F\u002Fgithub.com\u002FNutlope\u002Faicommits\u002Fissues), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup and test the project\n","AI Commits 是一个利用人工智能自动生成 Git 提交信息的命令行工具。其核心功能包括支持多种 AI 服务提供商（如 TogetherAI、OpenAI 等），并允许用户选择偏好的提交信息格式，如 conventional、gitmoji 等。此外，该工具还能够自动获取和选择可用模型，简化了配置流程。适用于希望提高开发效率、保持良好代码提交习惯的开发者或团队，在日常编码过程中使用尤为合适。通过简单的安装与设置步骤，即可在任何支持 Node.js 的环境中开始体验自动化生成高质量提交信息带来的便利。",2,"2026-06-11 03:37:05","high_star"]