
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
ai-coding-utils
Advanced tools
分析 Git 分支主线中 AI 与人工代码贡献比例的 CLI 工具。通过识别 commit message 中的 Co-Authored-By 标记,按开发者统计 AI 生成代码与手写代码的行数占比。
npx ai-coding-utils commit-stats [branch] [base]
参数:
[branch] — 目标分支(默认当前分支)[base] — 基准分支(默认自动检测 main/master)选项:
-d, --dir <path> — 指定 Git 仓库路径--from <ref> — 指定范围起点(commit/tag/branch),跳过自动分叉点检测--from-root — 从仓库起点统计目标分支完整主线历史,适合从零开发且代码都在 main/master 的项目--debug-author <name> — 调试指定开发者的每条 commit 判定明细示例:
# 分析当前分支相对于 main 的代码贡献
npx ai-coding-utils commit-stats
# 分析指定分支
npx ai-coding-utils commit-stats feature/login
# 指定基准分支
npx ai-coding-utils commit-stats feature/login develop
# 从零开发的项目,统计 main 完整主线历史
npx ai-coding-utils commit-stats main --from-root
# 在指定 feature 分支上调试某个开发者的 commit 判定过程
npx ai-coding-utils commit-stats feature/login --debug-author Philoveritas
通过检测 commit message 中是否包含 Co-Authored-By:.*noreply 来判断该 commit 是否为 AI 辅助生成。例如:
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
调试模式下会按 commit 打印完整 message、改动行数、匹配规则、命中证据和最终判定结果,便于核对识别是否符合预期。
commit-stats 默认按目标分支的 first-parent 主线统计,并排除 merge commits。
main 或其他旁支提交不会计入 AI/Human 行数占比--debug-author 会展示每条 commit 纳入统计的行数,以及被过滤掉的非代码文件行数按开发者输出彩色表格,包含:
# 监听模式
pnpm dev
# 构建
pnpm build
FAQs
AI 编码工具集 — 分析 git 分支的 AI/Human 代码贡献比例
The npm package ai-coding-utils receives a total of 25 weekly downloads. As such, ai-coding-utils popularity was classified as not popular.
We found that ai-coding-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.