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

@oc-forge/gf

v0.1.1

Published

Gitflare CLI tool

Readme

Gitflare CLI - 开发完成

实现状态 ✅

完成了为 Gitflare 项目开发的 CLI 工具 gf,所有验收标准都已满足。

项目结构

packages/cli/
├── package.json          # @gitflare/cli 包配置
├── tsconfig.json         # TypeScript 配置
├── tsup.config.ts        # 构建配置
├── src/
│   ├── index.ts          # CLI 入口,命令路由和参数解析
│   ├── api.ts            # REST API 客户端封装
│   ├── config.ts         # 配置文件管理
│   └── commands/
│       ├── auth.ts       # 认证命令
│       ├── repo.ts       # 仓库管理命令
│       ├── issue.ts      # Issue 管理命令
│       └── clone.ts      # 克隆命令
└── dist/                 # 构建输出,单文件 ESM

技术实现

  • 语言: TypeScript
  • 构建: tsup 打包成单文件 ESM
  • CLI 框架: 手写参数解析器(轻量级)
  • HTTP: Node.js 原生 fetch API
  • 认证: Bearer Token,存储在 ~/.config/gf/config.json

支持的命令

# 认证
gf auth login              # 交互式设置 API key  
gf auth status             # 显示认证状态

# 仓库管理  
gf repo list [owner]       # 列出仓库
gf repo create <name> [-d desc] [--private]  # 创建仓库
gf repo view <owner/name>  # 查看仓库详情

# Issue 管理
gf issue list <owner/name>           # 列出 issues
gf issue create <owner/name> -t title -b body  # 创建 issue  
gf issue view <owner/name> #number   # 查看 issue
gf issue close <owner/name> #number  # 关闭 issue

# 代码克隆
gf clone <owner/name> [dir]  # 克隆仓库并配置认证

# 全局选项
--json                      # JSON 输出格式

验收标准测试结果

pnpm install - 在 monorepo 根目录成功
pnpm build - 构建成功,生成单文件 ESM
认证测试 - 交互式 API key 设置正常工作
仓库列表 - gf repo list scottwei 返回结果
仓库创建 - gf repo create test-cli -d "CLI test" 创建成功
Issue 列表 - gf issue list xiaomo/test-api 返回 issues
JSON 输出 - --json flag 正确输出 JSON 格式
类型检查 - tsc --noEmit 通过,无类型错误

关键特性

  1. 完整的 API 集成: 支持所有主要的 Gitflare REST API 端点
  2. 友好的用户体验: 人类可读的表格输出 + JSON 模式
  3. 错误处理: 详细的错误信息和友好提示
  4. 认证管理: 安全存储 API key,自动配置 git 认证
  5. 跨平台: 使用 Node.js 18+ 原生 API,无额外依赖

使用示例

# 设置认证
gf auth login

# 查看仓库
gf repo list xiaomo

# 创建项目
gf repo create my-awesome-project -d "My new project" 

# 管理 Issues
gf issue create xiaomo/my-project -t "Bug report" -b "Something is broken"
gf issue list xiaomo/my-project
gf issue close xiaomo/my-project 1

# 克隆代码
gf clone xiaomo/my-project

CLI 工具已完全就绪,可以立即使用!