返回顶部
i

indexbind索引绑定

Use when an agent needs to install or use indexbind from Node, browsers, Web Workers, or Cloudflare Workers. This skill helps choose the right package, CLI, artifact, and entrypoint, and points to the live markdown docs for details.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
118
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

indexbind

Indexbind

当任务涉及从宿主应用程序或环境中使用 indexbind 时,请使用此技能。

使用示例

  • - 使用 indexbind 为文档文件夹添加本地搜索功能。
  • 帮我选择 indexbind、indexbind/web 和 indexbind/cloudflare。
  • 演示如何为 Node 构建 SQLite 工件,并为 Workers 构建捆绑包。

安装

安装该包:

bash
npm install indexbind

当目标是在任意目录中将 indexbind 作为 shell 命令使用时,可选择全局安装:

bash
npm install -g indexbind

然后使用以下任一方式:

  • - 本地安装和按项目工作流使用 npx indexbind ...
  • 全局安装后使用 indexbind ...
  • 编程式使用 import ... from indexbind 或 indexbind/build

平台说明:

  • - 原生预构建版本支持 macOS arm64、macOS x64 和 Linux x64(glibc)
  • Windows 使用应通过 WSL 进行

安装和打包文档:

  • - https://indexbind.jolestar.workers.dev/guides/getting-started.md
  • https://indexbind.jolestar.workers.dev/reference/packaging.md

选择正确的接口

  • - 从 shell 索引本地文档文件夹或本地知识库目录:
使用 npx indexbind ...
  • - 对已构建的 SQLite 工件进行本地 Node 查询:
使用 indexbind
  • - 编程式构建、增量缓存更新、检查或基准测试:
使用 indexbind/build
  • - 需要宿主定义文档分类、元数据或目录权重的混合本地知识库:
先在宿主中规范化文档,然后将其传递给 indexbind/build
  • - 仅需少量宿主策略的默认本地文档或知识库目录:
在该目录的 .indexbind/ 旁使用 indexbind.build.js 和 indexbind.search.js
  • - 对规范捆绑包进行浏览器或标准 Worker 查询:
使用 indexbind/web
  • - Cloudflare Worker 查询:
使用 indexbind/cloudflare
  • - Shell 驱动的构建/更新/导出/检查流程:
使用 npx indexbind ...

API 文档:

  • - https://indexbind.jolestar.workers.dev/reference/api.md
  • https://indexbind.jolestar.workers.dev/reference/cli.md

选择工件

  • - 为后续 Node 查询进行本地目录索引:
构建原生 SQLite 工件
  • - 为浏览器或 Worker 交付进行本地目录索引:
构建规范捆绑包
  • - Node 运行时:
使用原生 SQLite 工件
  • - 浏览器、Web Worker、Cloudflare Worker:
使用规范捆绑包
  • - 对稳定语料库进行重复重建:
使用构建缓存,然后导出新工件或捆绑包

概念:

  • - https://indexbind.jolestar.workers.dev/concepts/runtime-model.md
  • https://indexbind.jolestar.workers.dev/concepts/canonical-bundles.md

常用命令

典型的 CLI 命令:

  • - npx indexbind build ./docs
  • npx indexbind build-bundle ./docs
  • npx indexbind update-cache ./docs --git-diff
  • npx indexbind build [input-dir] [output-file] [--backend ]
  • npx indexbind build-bundle [input-dir] [output-dir] [--backend ]
  • npx indexbind update-cache [input-dir] [cache-file] [--git-diff] [--git-base ] [--backend ]
  • npx indexbind export-artifact [--cache-file ]
  • npx indexbind export-bundle [--cache-file ]
  • npx indexbind inspect
  • npx indexbind search
  • npx indexbind benchmark

当宿主已有内存中的文档或希望从代码中获得更紧密的控制时,请改用 indexbind/build。

索引范围约定

当一个索引根目录只需要少量宿主特定行为时,在该根目录旁放置约定文件:

text
docs/
indexbind.build.js
indexbind.search.js
.indexbind/

当默认目录扫描器已经正确,且你只需要以下操作时,使用 indexbind.build.js:

  • - 跳过索引中的几个文件
  • 推导 canonicalUrl
  • 注入元数据,如 isdefaultsearchable、sourceroot、contentkind 或 directory_weight
  • 规范化 title 或 summary

当 CLI 或 Node 搜索应自动应用以下内容时,使用 indexbind.search.js:

  • - 默认搜索配置文件
  • 元数据过滤器
  • 分数调整默认值
  • 轻量级查询重写或别名扩展

这些约定文件是索引范围的,而非仓库全局的:

  • - 如果你索引 ./docs,文件位于 ./docs/
  • 它们仅影响该索引根目录
  • 没有仓库根目录回退

常用 API

当宿主已有文档或希望获得更紧密的控制时,使用这些 API:

  • - 来自 indexbind 的 openIndex(...)
  • 来自 indexbind/build 的 buildFromDirectory(...)
  • 来自 indexbind/build 的 buildCanonicalBundle(...)
  • 来自 indexbind/build 的 buildCanonicalBundleFromDirectory(...)
  • 来自 indexbind/build 的 updateBuildCache(...)
  • 来自 indexbind/build 的 updateBuildCacheFromDirectory(...)
  • 来自 indexbind/build 的 exportArtifactFromBuildCache(...)
  • 来自 indexbind/build 的 exportCanonicalBundleFromBuildCache(...)
  • 来自 indexbind/build 的 inspectArtifact(...)
  • 来自 indexbind/build 的 benchmarkArtifact(...)
  • 来自 indexbind/web 的 openWebIndex(...)
  • 来自 indexbind/cloudflare 的 openWebIndex(...)

文档:

  • - https://indexbind.jolestar.workers.dev/reference/api.md
  • https://indexbind.jolestar.workers.dev/guides/adoption-examples.md
  • https://indexbind.jolestar.workers.dev/reference/cli.md

Cloudflare 规则

在 Cloudflare Workers 内部:

  • - 优先使用 indexbind/cloudflare
  • 如果捆绑文件未直接作为公共 URL 暴露,请向 openWebIndex(...) 传递自定义 fetch
  • 使用宿主资源加载器(如 ASSETS.fetch(...)),而非猴子补丁全局 fetch

文档:

  • - https://indexbind.jolestar.workers.dev/guides/web-and-cloudflare.md
  • https://indexbind.jolestar.workers.dev/reference/api.md

不确定时按此顺序阅读

  1. 1. https://indexbind.jolestar.workers.dev/guides/getting-started.md
  2. https://indexbind.jolestar.workers.dev/reference/api.md
  3. https://indexbind.jolestar.workers.dev/reference/cli.md
  4. https://indexbind.jolestar.workers.dev/guides/web-and-cloudflare.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 indexbind-1775932047 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 indexbind-1775932047 技能

通过命令行安装

skillhub install indexbind-1775932047

下载

⬇ 下载 indexbind v1.0.1(免费)

文件大小: 2.96 KB | 发布时间: 2026-4-12 10:16

v1.0.1 最新 2026-4-12 10:16
Refresh the skill for index-scoped conventions, current CLI defaults, and latest docs links.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部