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

workspace-filter

v1.0.8

Published

Workspace directory filter and scanner for multi-project environments

Readme

Workspace Filter

智能工作区过滤器,为多 Agent 开发环境统一管理忽略规则。

🎯 功能特性

  • 多 Agent 支持 - 自动为 40+ 个 AI 编程助手生成忽略规则

    • Claude Code, Codex, OpenClaw, Cursor, Windsurf
    • Cline, Continue, Roo Code, Trae, MCPJam
    • 以及更多主流 AI 编程工具
  • 统一配置 - 一次选择,同步生成所有 Agent 的忽略文件

    • .vscode/settings.json
    • .cursorignore, .traeignore, .claudeignore
    • .clineignore, .continueignore, .rooignore
  • 项目扫描 - 自动识别工作区中的前端和 Go 项目

  • 预设管理 - 保存和加载工作区配置预设

  • 交互式 UI - 提供 Web 界面进行可视化配置

🚀 使用方式

方式一:本地链接(推荐开发阶段使用)

# 1. 克隆并安装
git clone https://github.com/candy-Tong/workspace-filter.git
cd workspace-filter
pnpm install

# 2. 构建项目
pnpm run build:all

# 3. 链接到全局
pnpm link --global

# 4. 使用命令
workspace-filter switch
# 或简写
wf switch

方式二:pnpx 运行(需要从 npm 发布后)

pnpx workspace-filter switch

CLI 命令

# 交互式切换工作区(默认)
workspace-filter switch

# 应用预设
workspace-filter apply <preset-name>

# 列出所有预设
workspace-filter list

# 删除预设
workspace-filter delete <preset-name>

# 清除所有配置,恢复原始状态
workspace-filter clear

常用参数

# 指定工作目录
workspace-filter switch --cwd /path/to/workspace

# 指定项目根目录(逗号分隔)
workspace-filter switch --roots project1,project2,project3

# 永久可见的目录
workspace-filter switch --include .vscode,.git,docs

# 跳过特定 Agent 配置
workspace-filter switch --no-cursor --no-trae

# 仅输出 JSON(不写入文件)
workspace-filter switch --format json

# 使用预设
workspace-filter switch --preset my-preset

# 非交互模式(直接应用)
workspace-filter switch --no-server --no-interactive

📁 项目结构

workspace-filter/
├── src/                    # 前端 React 代码
│   ├── App.tsx            # 主界面组件
│   ├── main.tsx           # 入口文件
│   └── index.css          # 样式文件
├── server/                 # 后端服务
│   ├── index.ts           # CLI 入口
│   ├── server.ts          # HTTP 服务器
│   └── lib/
│       ├── agents.ts      # Agent 配置定义
│       ├── compute.ts     # 排除逻辑计算
│       ├── scanner.ts     # 项目扫描
│       ├── presets.ts     # 预设管理
│       ├── config.ts      # 配置管理
│       ├── ui/select.ts   # 交互式选择
│       └── writers/       # 文件写入器
│           ├── vscode.ts  # VSCode 设置生成
│           └── ignore/    # 各 Agent ignore 文件生成
├── tests/                  # 测试文件
│   ├── compute.test.js
│   └── ignore.test.js
├── package.json
├── tsconfig.json
└── vite.config.ts

🔧 支持的 Agent

完整支持列表(40+):

| Agent | 配置目录 | | ----------- | ----------------------------- | | Amp | .agents/skills | | Claude Code | .claude/skills | | Codex | .codex/skills | | Cursor | .cursor/skills | | Cline | .cline/skills | | Continue | .continue/skills | | OpenClaw | skills | | Windsurf | .windsurf/skills | | Trae | .trae/skills | | Roo Code | .roo/skills | | ... | 更多见 server/lib/agents.ts |

📝 预设示例

预设保存在工作区的 .workspace-filter/presets/ 目录下:

{
  "name": "frontend-dev",
  "roots": ["apps", "packages"],
  "selected": ["apps/web", "packages/ui"]
}

📄 License

ISC

🤝 贡献

欢迎提交 Issue 和 PR!

源码运行

从源码运行需要以下配置:

# 克隆仓库
git clone https://github.com/candy-Tong/workspace-filter.git
cd workspace-filter

# 安装依赖
pnpm install

# 运行 CLI(源码模式)
pnpm tsx server/index.ts switch

# 启动开发服务器(带 Web UI)
pnpm run dev:server

# 构建前端
pnpm run build

# 开发模式构建
pnpm run build:watch

测试

pnpm test

Web UI 开发

启动开发服务器(带 Web UI):

pnpm run dev:server

访问 http://127.0.0.1:3001 查看界面。