npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-utils-github

v1.0.0

Published

AI-powered GitHub utilities toolkit

Readme

AI Utils GitHub

AI-powered GitHub utilities toolkit - 一个强大的GitHub工具集

安装

全局安装

npm install -g ai-utils-github

使用npx

npx ai-utils-github <command> [options]

功能

createRepo - 创建GitHub仓库

创建一个新的GitHub仓库并初始化本地git仓库。

# 使用全局安装的命令
util-github createRepo --github-token "your_github_token" --github-user "your_username" --name "repo_name" --description "Repository description" --git-email "[email protected]" --git-user-name "Your Name"

# 使用npx
npx ai-utils-github createRepo --github-token "your_github_token" --github-user "your_username" --name "repo_name"

# 交互式使用(不提供参数时会提示输入)
util-github createRepo

# 非交互模式(使用 -y 选项,只使用提供的参数和环境变量)
util-github createRepo -y --github-token "your_github_token" --github-user "your_username" --name "repo_name"

# 使用环境变量
export GITHUB_TOKEN="your_github_token"
export GITHUB_USERNAME="your_username"
export GIT_USER_EMAIL="[email protected]"
export GIT_USER_NAME="Your Name"
util-github createRepo --name "repo_name"

# 非交互模式 + 环境变量
util-github createRepo -y --name "repo_name"

参数说明

  • --github-token <token>: GitHub个人访问令牌(必需)
  • --github-user <username>: GitHub用户名(必需)
  • --name <name>: 仓库名称(必需)
  • --description <description>: 仓库描述(可选)
  • --git-email <email>: Git用户邮箱(可选)
  • --git-user-name <name>: Git用户名(可选)
  • -y, --yes: 非交互模式,跳过提示并仅使用提供的选项和环境变量

环境变量支持

可以通过设置以下环境变量来避免重复输入:

  • GITHUB_TOKEN: GitHub个人访问令牌
  • GITHUB_USERNAME: GitHub用户名
  • GIT_USER_EMAIL: Git用户邮箱
  • GIT_USER_NAME: Git用户名

优先级顺序

参数获取的优先级顺序:

  1. 命令行参数(最高优先级)
  2. 环境变量
  3. 交互式输入(最低优先级)

功能特性

  • ✅ 在GitHub上创建远程仓库
  • ✅ 初始化本地git仓库
  • ✅ 创建README.md文件
  • ✅ 配置git用户信息
  • ✅ 自动推送到远程仓库
  • ✅ 支持自定义仓库描述
  • ✅ 支持交互式输入
  • ✅ 支持环境变量配置
  • ✅ 智能参数优先级处理
  • ✅ 支持非交互模式(-y 选项)
  • ✅ 智能错误提示(缺少参数时明确指出)

开发

本地开发

# 安装依赖
pnpm install

# 开发模式
pnpm run dev

# 构建
pnpm run build

# 测试构建结果
node dist/index.js --help

项目结构

ai-utils-github/
├── src/
│   ├── commands/          # 命令实现
│   │   └── createRepo.ts  # createRepo命令
│   └── index.ts          # 主入口文件
├── bin/
│   └── cli.js            # CLI入口
├── dist/                 # 构建输出
├── .codebase/
│   └── genius-ai/
│       └── agent-check.sh # 构建检查脚本
└── package.json

扩展功能

项目采用模块化设计,可以轻松添加新的命令:

  1. src/commands/ 目录下创建新的命令文件
  2. src/index.ts 中注册新命令
  3. 重新构建项目

许可证

MIT