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

@nick848/ft

v0.1.1

Published

Frontend Toolkit — CLI orchestration layer for Comet and Karpathy rules

Downloads

132

Readme

FT(Frontend Toolkit)

FT 是一个前端开发工具编排层。它以 Comet 为工作流基座,将 andrej-karpathy-skills 作为 AI 行为的强制约束。

FT 不内置任何 LLM。它的职责是通过 CLI 命令和 IDE Slash 命令,引导 Cursor、Codex、OpenCode 中的 LLM 完成开发任务。代码图谱能力由 Comet 生态(如 CodeGraph)提供,由 comet init 引导安装。

核心特性

| 特性 | 说明 | |------|------| | 零 LLM | FT 不做推理、不生成代码,所有智能行为由 IDE 内 LLM 完成 | | Comet 透传 | /ft-open/ft-build 等命令透传 Comet 工作流,保持原生能力 | | RTK 压缩 | 子进程长输出自动中间截断,降低 Token 消耗;--json 等结构化输出自动放行 | | Karpathy 约束 | 初始化时向三平台注入四条行为准则规则文件 | | 双语支持 | CLI 输出与 AGENTS.md 模板支持 zh-CN / en |

环境依赖

必需

| 依赖 | 版本 | 说明 | |------|------|------| | Node.js | >= 18 | FT 运行时 | | npm | 任意较新版本 | 安装与更新 FT、Comet | | Comet | 全局安装 | npm install -g @rpamis/cometft init 的强制依赖 |

可选

| 依赖 | 说明 | |------|------| | Cursor / Codex / OpenCode | Slash 命令与规则注入的目标 IDE |

支持平台

  • Cursor
  • Codex
  • OpenCode

初始化时可将 Karpathy 规则注入到对应平台,并安装 Cursor Slash 命令。

安装

npm install -g @nick848/ft
ft version

快速开始

1. 安装 Comet

npm install -g @rpamis/comet

2. 在目标项目中初始化

cd your-frontend-project
ft init

ft init 将依次执行:

  1. 检测 Comet(缺失则阻塞退出)
  2. 检测 Karpathy 规则(内置模板可用则通过)
  3. 交互选择注入目标(Cursor / Codex / OpenCode)
  4. 复制 Karpathy 规则到对应平台目录
  5. 若选择 Cursor,安装 .cursor/commands/ Slash 命令
  6. 生成 AGENTS.md(旧文件备份为 AGENTS-BAK.md
  7. 执行 comet init(含 CodeGraph 等 Comet 生态引导)
  8. 提示下一步执行 /ft-fill-context
ft init --lang en   # 英文初始化

3. 填充项目上下文

在 IDE 中执行 /ft-fill-context,由 Agent 根据终端输出的 Prompt 配方编辑 AGENTS.md

4. 使用 Comet 工作流

/ft-design
/ft-build
/ft-verify

CLI 命令

| 命令 | 说明 | |------|------| | ft init [--lang en\|zh-CN] | 全流程初始化 | | ft update | 更新 FT 自身,不更新 Comet | | ft version | 打印 FT 与 Comet 版本号 | | ft help | 显示帮助信息 |

Slash 命令

上下文

| Slash 命令 | 说明 | |------------|------| | /ft-fill-context | 输出结构化 Prompt,引导 LLM 填充 AGENTS.md |

门禁AGENTS.md 中仍存在 [NEEDS LLM INPUT] 时,Comet 透传类命令会被拦截。

Comet 工作流(透传)

| Slash 命令 | 说明 | |------------|------| | /ft-open | Comet open | | /ft-design | Comet design | | /ft-build | Comet build | | /ft-verify | Comet verify | | /ft-archive | Comet archive | | /ft-hotfix | Comet hotfix | | /ft-tweak | Comet tweak | | /ft-sync-cursor-commands | 重新安装 Cursor Slash 命令到 .cursor/commands/ |

门禁AGENTS.md 中仍存在 [NEEDS LLM INPUT] 时,Comet 透传类命令会被拦截。

TTY 处理:终端中保持 Comet 原生交互;IDE 非 TTY 环境尝试 --non-interactive,失败则提示在系统终端执行 comet <command>

Cursor Slash 命令

ft init 选择 Cursor 时会自动安装 .cursor/commands/。在 Agent 聊天框输入 / 即可调用。

修复命令列表:

ft slash sync-cursor-commands

配置文件

.ft/config.yaml 示例:

language: zh-CN

rtk:
  enabled: true
  auto_trigger_lines: 500
  exclude_patterns:
    - "--json"
    - "--format json"
    - "--xml"

tools:
  - cursor
  - codex
  - opencode

典型工作流

ft init  →  comet init(CodeGraph 等)
    ↓
/ft-fill-context  →  LLM 填充 AGENTS.md
    ↓
/ft-design → /ft-build → /ft-verify

或在 Cursor 中执行 /ft-sync-cursor-commands

Codex / OpenCode

参考各平台自定义 Command 机制,在终端执行 ft slash <subcommand>

RTK 输出压缩

子进程长输出采用中间截断(前 200 行 + 后 100 行),--json 等结构化参数自动旁路,TTY 交互时不压缩。

已知限制

  • AGENTS-BAK 合并依赖 LLM 判断
  • IDE 内 Comet 透传可能需在系统终端执行
  • 当前仅支持 Cursor、Codex、OpenCode

文档

相关链接

  • Comet:npm install -g @rpamis/comet
  • Karpathy Skills:https://github.com/multica-ai/andrej-karpathy-skills

License

MIT