Skip to content

Installation Guide

sem edited this page Jul 4, 2025 · 1 revision

Installation Guide

This guide will walk you through installing Claude Hooks Manager on your system.

Prerequisites

Before installing Claude Hooks Manager, ensure you have:

  • Node.js (version 14 or higher)
  • npm or yarn package manager
  • Git (version 2.9 or higher)

Checking Prerequisites

# Check Node.js version
node --version

# Check npm version
npm --version

# Check Git version
git --version

Installation Methods

Method 1: Global Installation (Recommended)

Install Claude Hooks Manager globally to use it across all your projects:

npm install -g claude-hooks-manager

Or with yarn:

yarn global add claude-hooks-manager

Method 2: Local Installation

For project-specific installation:

npm install --save-dev claude-hooks-manager

Or with yarn:

yarn add --dev claude-hooks-manager

Method 3: Install from Source

Clone and install from the repository:

# Clone the repository
git clone https://github.com/your-repo/claude-hooks-manager.git
cd claude-hooks-manager

# Install dependencies
npm install

# Link globally
npm link

Verifying Installation

After installation, verify that Claude Hooks Manager is properly installed:

claude-hooks --version

You should see the version number displayed.

Post-Installation Setup

1. Initialize in Your Project

Navigate to your project directory and initialize:

cd your-project
claude-hooks init

2. Install Default Hooks

Install the recommended default hooks:

claude-hooks install --defaults

3. Verify Installation

Check the status of installed hooks:

claude-hooks status

Platform-Specific Notes

macOS

No additional setup required. If you encounter permission issues:

sudo npm install -g claude-hooks-manager

Windows

  1. Run the installation in an Administrator command prompt
  2. If using Git Bash, ensure it's in your PATH
  3. You may need to enable script execution:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Linux

If you encounter permission issues:

sudo npm install -g claude-hooks-manager

Or configure npm to install global packages without sudo:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Troubleshooting Installation

Common Issues

  1. "command not found" after global installation

    • Ensure npm's global bin directory is in your PATH
    • Run npm config get prefix to find the installation location
  2. Permission denied errors

    • Use sudo (not recommended) or configure npm properly
    • See platform-specific notes above
  3. Node version too old

    • Update Node.js to version 14 or higher
    • Use a version manager like nvm or n

Getting Help

If you encounter issues:

  1. Check the Troubleshooting Guide
  2. Search existing GitHub Issues
  3. Create a new issue with your error details

Next Steps

Now that you have Claude Hooks Manager installed:


← Back to Home | Getting Started →

Clone this wiki locally