Automic VaultAutomic Vault

brew

使用 Homebrew 安装 claude-hooks

查看 claude-hooks 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install claude-hooks

local Homebrew formula metadata

概览

软件包摘要

Hook system for Claude Code

命令和别名

  • claude-hooks

历史

项目历史与用法

claude-hooks is a TypeScript-oriented setup tool for Claude Code hooks. Its official README describes it as a CLI that generates `.claude/settings.json` hook configuration and typed TypeScript handler files for Claude Code lifecycle events.

项目历史

The npm package was first published in July 2025, after Claude Code's hook system had become a documented extension point. The project focuses on one friction point in that system: turning JSON hook payloads and shell-command handlers into a typed TypeScript development environment.

The README documents generated files under `.claude/hooks/`, including `index.ts`, `lib.ts`, and `session.ts`, plus `.claude/settings.json`. It also requires Node.js 18+ for the CLI and Bun for running hooks.

采用历史

Distribution is source-backed through npm and Homebrew. The npm registry records 32 versions and published version 2.4.0, while Homebrew packages the same 2.4.0 release from the npm registry.

The evidence supports a niche but clear role: claude-hooks is not a general Claude Code replacement; it is a helper for users who are already adopting Claude Code's official hook lifecycle and want TypeScript types and scaffolding.

使用方式

Users run `npx claude-hooks` or install it globally with npm, then run `claude-hooks`. The tool creates Claude Code hook configuration and TypeScript handlers that can inspect typed payloads for events such as PreToolUse, PostToolUse, Notification, and Stop.

The official Claude Code hooks reference documents the underlying event model, including command, HTTP, prompt, and MCP hooks, matcher groups, JSON stdin payloads, and hook decisions. claude-hooks builds on that official mechanism.

为什么软件包爱好者会关心

claude-hooks is package-nerd interesting because it packages a type layer around an AI-agent lifecycle API. Instead of every team copying shell scripts and JSON snippets, it gives the hook surface a generated project structure and a package-manager install path.

It also shows how fast companion packages formed around Claude Code's configuration files: the package's value is not the hook runtime itself, but the typed developer experience around an official extension point.

时间线

  • 2025-07: npm registry records the first `claude-hooks` publication.
  • 2025-08: npm registry records published version 2.4.0 after 32 published versions.
  • 2026: Homebrew formula `claude-hooks` packages version 2.4.0 from the npm registry.

Related projects

  • Claude Code's official hooks system is the extension point claude-hooks configures.
  • Bun is required by the README for running generated hooks.
  • TypeScript is the language layer used for typed payloads and handlers.
  • claude-cmd and Claude Code Templates are related Claude Code configuration companion tools.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
.claude/settings.json

可执行文件

已安装的可执行文件

命令类型暴露范围备注
claude-hookscli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本2.4.0
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/johnlindquist/claude-hooks

安装元数据

软件包元数据

软件包键brew:claude-hooks
版本2.4.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/claude-hooks
主页https://github.com/johnlindquist/claude-hooks
仓库https://github.com/johnlindquist/claude-hooks
上游文档https://code.claude.com/docs/en/hooks
许可证MIT
源码归档https://registry.npmjs.org/claude-hooks/-/claude-hooks-2.4.0.tgz
依赖node
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameclaude-hooks
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • package relationship graph
  • package version freshness
  • package-page enrichment