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

@tengence/search-sdk

v0.1.1

Published

Tengence Search SDK: lazy auto-registration, dataset/search-app initialization, data push and full-text search (thin HTTP client, no local business database). 通智搜索 SDK:自动注册 + 初始化 + 推送 + 搜索(薄 HTTP 客户端)

Readme

@tengence/search-sdk

Tengence Search(通智搜索)SDK:懒加载自动注册 → 初始化「数据集 + 搜索应用」→ 推送数据 → 全文搜索。纯 HTTP 薄客户端,无本地业务数据库;凭据与身份保存在 ~/.tengence/search-mcp/state.json(0600)。

使用

const sdk = require("@tengence/search-sdk");

// 初始化(幂等):自动注册客户端身份 → 服务端创建数据集+搜索应用并绑定(免费套餐)
// 首次注册返回:激活链接 / 登录地址 / 账号 / 初始密码(仅此一次明文)
await sdk.init.init({ timeoutMs: 15000 });

// 推送(单条或批量;每条必须含唯一 id;仅含 id = 删除;首次推送后自动启动搜索应用)
await sdk.push.push([{ id: "1", title: "Hello Tengence" }], { chunkSize: 100 });

// 搜索
const res = await sdk.search.search({ query: "Hello", page: 1, size: 10 });
// { items, total, took, aggs }

API

| 模块 | 方法 | 说明 | |---|---|---| | sdk.init | init({timeoutMs}) | 幂等初始化;首次注册明文返回控制台登录信息 | | sdk.push | push(records, {chunkSize, timeoutMs}) | 推送/更新/删除(按 id upsert) | | sdk.search | search(params, {timeoutMs}) | 搜索(分页/排序/过滤/高亮/聚合) | | sdk.util | ping({probe}) | 状态与下游探测 | | sdk.config | readConfig() / maskKey() | 配置读取(密钥掩码) | | sdk.identity | loadState / isRegistered / isInitialized / claimLink() | 本地身份 |

环境变量

| 变量 | 默认 | |---|---| | TENGENCE_SOLUTION_BASE_URL | https://console.tengence.com | | TENGENCE_SEARCH_API_KEY / TENGENCE_DATASET_API_KEY | 双 API Key(不配也行,初始化自动落盘) | | TENGENCE_SITE_URL | 注册幂等键,默认 https://tengence-mcp.local/<deviceId> | | TENGENCE_SEARCH_HOME | 状态目录,默认 ~/.tengence/search-mcp |

License

MIT