Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polyfact/ai-git

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polyfact/ai-git

Generates auto commit messages with Polyfact

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Git AI

Git AI is a tool that helps generate commit messages using AI. It simplifies the commit process by automatically generating a short, descriptive commit message based on your code changes.

Features

  • Analyzes staged git diffs and generates a commit message summarizing the changes
  • Leverages Polyfact's AI API to generate natural language
  • Handles large diffs by splitting into multiple API requests
  • Customizable options like commit message language, model name, etc.
  • Auto-commit mode to directly commit the generated message
  • Optional git commit --amend to open editor and refine message

Usage

Prerequisites

  • Node.js
  • Git CLI
  • Polyfact Token

Installation

npm install -g @polyfact/git-ai

or

yarn global add @polyfact/git-ai

Configuration

Create a .ai-gitrc file to customize options.

ai-git init-config

Or set options as CLI flags:

ai-git commit --token YOUR_TOKEN --language english --model gpt-3.5-turbo

Basic Usage

# Auto generate and commit
ai-git commit

# Generate message without auto commit
ai-git commit --no-autocommit

# Open editor to refine message after commit
ai-git commit --editor

Configuration

The CLI and config file options allow customizing the commit message generation:

  • token - Polyfact API key
  • model - AI model name
  • maxTokens - Max tokens per API request
  • language - Commit message language
  • autocommit - Directly create commit
  • editor - Open editor after commit
  • exclude - Patterns to exclude from diff
  • filter - Git diff filter flag
  • template - Prompt template for AI

FAQs

Package last updated on 30 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc