Download the PHP package mi-lopez/claude-git-hook without Composer

On this page you can find all versions of the php package mi-lopez/claude-git-hook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package claude-git-hook

Claude Git Hook

CI Latest Stable Version License PHP Version Require

Automatically generate intelligent commit messages using Claude AI. This package installs a git hook that analyzes your code changes and creates descriptive commit messages following conventional commit standards with automatic issue extraction from branch names.

Features

Commit Message Format

Generated messages follow this format:

Examples

Input: Branch feature/CAM-942-implement-auth with authentication code changes

Output:

Installation

Via Composer (Recommended)

The hook will be automatically installed after Composer finishes.

Manual Installation

  1. Clone this repository
  2. Run the installer:

Configuration

1. Get Claude API Key

  1. Visit Anthropic Console
  2. Create an account or sign in
  3. Generate an API key

2. Configure API Key

Or set manually:

Usage

Once installed and configured, the hook works automatically:

Manual Commands

Branch Name Patterns

The hook automatically extracts issue numbers from branch names:

How It Works

  1. Code Analysis: When you run git commit, the hook captures your staged changes
  2. Branch Analysis: Extracts issue number from current branch name
  3. AI Processing: Sends the diff to Claude AI for analysis
  4. Message Generation: Claude generates a structured commit message
  5. Fallback: If API fails, generates a basic message based on file analysis

Commit Message Types

The generated messages use conventional commit types:

Configuration Options

Environment Variables

Custom Configuration

You can modify the hook behavior by editing .git/hooks/prepare-commit-msg directly.

Requirements

Troubleshooting

Hook Not Working

API Key Issues

Permission Issues

Debug Information

Development

Project Structure

Running Tests

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Run the test suite
  6. Submit a pull request

Code Style

This project follows PSR-12 coding standards:

License

MIT License. See LICENSE file for details.

Support

Changelog

v1.0.0


Made with ❤️ and AI by mi-lopez


All versions of claude-git-hook with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mi-lopez/claude-git-hook contains the following files

Loading the files please wait ....