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

gsc-scaffolding

v1.0.4

Published

GSC Basic Scaffolding CLI.

Readme

gsc-scaffolding

Lenovo GSC Basic 的项目脚手架 CLI。

它用于快速拉取基础仓库并初始化工作区,支持 frontend、backend、fullstack 三种模式。

相比传统脚手架,gsc-scaffolding 默认集成 AI 资产安装流程:帮助团队在项目落地后直接进入 AI 辅助开发状态。

核心价值:用同一条初始化链路同时完成“代码工作区 + AI 能力基建”的准备。

主要能力

  • 交互式初始化流程(语言、项目类型、目录、Git 配置)
  • 支持一键非交互执行(--yes
  • 支持受保护目录检测与显式清空(--force-clear
  • 默认浅克隆(--depth 1),并自动清理源仓库 .git
  • 默认执行 Git bootstrap(init、add remote、commit、push)
  • 克隆后自动安装 AI 资产(gsc-skills

安装与使用

一次性执行(推荐):

# npx -y 跳过 Ok to proceed? (y),直接安装并执行
npx -y gsc-scaffolding help
npx gsc-scaffolding init
npx gsc-scaffolding ai install --dir .

使用别名(gsc-sf)时:

# 方式 1:通过包名调用(推荐)
npx gsc-scaffolding init

# 方式 2:显式指定包后使用别名
npx -p gsc-scaffolding gsc-sf init

全局安装后执行:

npm i -g gsc-scaffolding
gsc-scaffolding init
gsc-scaffolding ai install --dir .
gsc-sf init

命令

gsc-scaffolding help
gsc-scaffolding init [options]
gsc-scaffolding ai install [options]
gsc-scaffolding ai update [options]
gsc-scaffolding --version

说明:

  • 无参数默认等价于 help
  • --help 显示顶层帮助
  • init --help 仅显示 init 参数
  • ai --help 显示 ai 子命令概览
  • ai install --help 仅显示 ai install 参数
  • ai update --help 仅显示 ai update 参数

init 参数

--help, -h
--version, -v
--yes, -y
--force-clear
--lang <zh|en>
--type, -t <frontend|backend|fullstack>
--dir, -d <dir>
--repo <url>
--agent <agent>
--ai-hook-strict
--git-init
--git-remote <url>
--git-commit-message <msg>
--git-push
--git-branch <name>

参数规则:

  • fullstack 模式不支持 --repo
  • --agent 可选值:github-copilotclaude-codeopenclawcursorgemini-clikimi-cliopencodeqwen-code
  • --ai-hook-strict 启用 AI 资产 hook 严格模式(hook 失败则初始化失败)
  • --git-push 需要有有效远程地址(--git-remote
  • 当前版本默认执行 git init--git-init 仅用于兼容历史脚本
  • 不接受位置参数(如 gsc-scaffolding init my-app

ai install 参数

--help, -h
--version, -v
--yes, -y
--lang <zh|en>
--dir, -d <dir>
--agent <agent>
--ai-hook-strict

参数规则:

  • ai install 用于已有项目,仅安装 AI 资产,不执行仓库克隆或 Git bootstrap
  • --dir 默认为当前目录;目录不存在时会自动创建
  • --agent 可选值:github-copilotclaude-codeopenclawcursorgemini-clikimi-cliopencodeqwen-code
  • --ai-hook-strict 启用 AI 资产 hook 严格模式(hook 失败则安装失败)
  • 不接受位置参数(如 gsc-scaffolding ai install my-project

ai update 参数

--help, -h
--version, -v
--yes, -y
--lang <zh|en>
--dir, -d <dir>
--agent <agent>
--ai-hook-strict

参数规则:

  • ai update 用于已有项目,刷新 AI 资产并同步最新 instructions / MCP 配置
  • 当前实现会按固定的 GSC AI 资产源重新执行一次刷新流程,并补跑内置 hook
  • 之所以不直接调用裸 gsc-skills update,是因为 gsc-scaffolding 还需要同步 instructions/.vscode/mcp.json
  • --dir 默认为当前目录;目录不存在时会自动创建
  • --agent 可选值:github-copilotclaude-codeopenclawcursorgemini-clikimi-cliopencodeqwen-code
  • --ai-hook-strict 启用 AI 资产 hook 严格模式(hook 失败则更新失败)
  • 不接受位置参数(如 gsc-scaffolding ai update my-project

默认仓库

  • frontend: https://gitlab.xpaas.lenovo.com/gsc-basic-group/gsc-basic-frontend-template.git
  • backend: https://gitlab.xpaas.lenovo.com/gsc-basic-group/gsc-backend-template.git
  • fullstack: 同时拉取 frontend + backend(到 <dir>/frontend<dir>/backend

执行流程(init)

  1. 解析参数与语言
  2. 确认仓库访问权限
  3. 选择项目类型与目标目录
  4. 展示执行前确认并二次确认
  5. 克隆仓库并清理 .git
  6. 安装 AI 资产
  7. 执行 Git bootstrap
  8. 输出结果与支持信息

AI 资产安装

对于新项目,init 会在克隆完成后自动安装 AI 资产。

对于已有项目,也可以单独执行:

npx gsc-scaffolding ai install --dir ./existing-project --agent github-copilot
npx gsc-scaffolding ai update --dir ./existing-project --agent github-copilot

init 内部默认复用 ai install 语义,会在目标目录执行:

npx --registry https://registry.npmmirror.com gsc-skills add gsc-basic-group/gsc-basic-skills --skills * --agent <selected-agent> --project -y --post-install-hook "node <internal-sync-assets-hook>"

说明:

  • gsc-skills 安装技能后,会通过内置 hook 同步额外 AI 资产。
  • instructions/ 会复制到目标项目 .github/instructions/
  • mcp/ 模板会合并到目标项目 .vscode/mcp.json

目录安全与 --force-clear

当目标目录包含以下受保护条目时,不会直接提供清空选项:

  • .git
  • node_modules
  • packages

如果确认覆盖,请重新执行并显式传入 --force-clear

开发

pnpm --dir packages/gsc-scaffolding build
pnpm --dir packages/gsc-scaffolding test
pnpm --dir packages/gsc-scaffolding type-check

License

LicenseRef-Proprietary