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

@jiangzhx/adcli

v0.1.3

Published

CLI for searching hosted advertising platform API docs.

Readme

AdCLI

AdCLI 是一个广告平台 API 文档查询 CLI。它默认使用线上发布的文档包,帮助开发者和 AI Agent 快速定位快手磁力引擎、巨量引擎、腾讯广告等平台的接口文档。

线上文档入口:

https://adcli.jiangzhx.com/llms.txt
https://adcli.jiangzhx.com/llms-full.txt
https://adcli.jiangzhx.com/search-index.json

项目当前是 Bun + TypeScript CLI,不使用 Next.js。

Monorepo

当前仓库使用 Bun workspace 管理:

  • 根包:@jiangzhx/adcli,负责 CLI 和文档包生成。
  • SDK 子包:packages/*,每个媒体平台 SDK 独立维护。

已存在的 SDK:

  • packages/oceanengine-ad-open-sdk: 巨量广告开放平台 OpenAPI SDK。

后续新增广点通等媒体 SDK 时,按平台官方 API 名称放到独立子包,例如 packages/tencentad-marketing-api-sdk/

安装

node --version
npm install -g @jiangzhx/adcli

安装后确认:

adcli list
adcli doc search "广告消耗"

也可以从 GitHub 安装当前代码:

npm install -g github:jiangzhx/adcli

常用命令

列出当前支持的平台和能力:

adcli list
adcli list kuaishou

搜索文档:

adcli doc search "广点通 广告消耗"
adcli doc search "广告消耗" --platform tencent_ads
adcli doc search "广告消耗" --limit 5
adcli doc search "广告消耗" --json

刷新本地搜索索引缓存:

adcli doc sync
adcli doc search "广告消耗" --refresh

输出给 AI / Agent 使用的文档入口:

adcli llms
adcli prompt

调用巨量引擎 SDK。可以先保存一次 token,后续命令会自动读取:

| 命令 | 作用 | 默认输出 | | --- | --- | --- | | adcli oceanengine auth <token> | 保存巨量引擎 access token | 保存结果 | | adcli oceanengine advertiser list | 拉取当前 token 授权的广告主列表 | 原始 JSON | | adcli oceanengine project list --advertiser-id <id> | 拉取广告主下的项目列表 | project_idname | | adcli oceanengine promotion list --advertiser-id <id> | 拉取广告主下的广告列表 | promotion_idname |

常用示例:

adcli oceanengine auth <token>
adcli oceanengine advertiser list --json
adcli oceanengine project list --advertiser-id <advertiser_id> --page 1 --page-size 20
adcli oceanengine project list --advertiser-id <advertiser_id> --filtering '{"status":"PROJECT_STATUS_ALL"}'
adcli oceanengine promotion list --advertiser-id <advertiser_id> --project-id <project_id>

token 优先级为 --access-tokenOCEANENGINE_ACCESS_TOKEN、本地保存的 token。 本地 token 会保存到同一个 AdCLI 缓存目录,例如 macOS 上是 ~/Library/Caches/adcli/oceanengine.json。 巨量 project/list 默认不返回已删除项目;需要包含已删除时传 --filtering '{"status":"PROJECT_STATUS_ALL"}'

完整命令说明见 docs/commands.md

搜索索引缓存

adcli doc search 默认读取线上索引:

https://adcli.jiangzhx.com/search-index.json

第一次搜索会下载索引并缓存到系统标准缓存目录:

  • macOS: ~/Library/Caches/adcli/search-index.json
  • Linux: ${XDG_CACHE_HOME:-~/.cache}/adcli/search-index.json
  • Windows: %LOCALAPPDATA%/adcli/Cache/search-index.json

巨量引擎 token 也按缓存处理,保存到同目录的 oceanengine.json

本地调试可指定索引文件:

adcli doc search "广告消耗" --index public/search-index.json

维护者工作流

安装开发依赖:

bun install

常用校验:

bun run test
bun run typecheck
bun run sdk:test
bun run sdk:typecheck
bun run lint
bun run build

重新生成发布产物:

bun run build:llms all

只重建搜索索引:

bun run build:search-index

构建 CLI 发布文件:

bun run build:cli
npm pack --dry-run

发布产物

public/llms.txt
public/llms-full.txt
public/search-index.json
public/{platform}/index.md
public/{platform}/manifest.json
public/{platform}/docs/{doc_id}.md

public/ 是可发布文档包;data/ 是维护者本地采集数据,不提交。

数据流

recipes/
  -> discover / ingest
  -> data/sources/{platform}/{source_id}/cleaned.md
  -> build:llms
  -> public/

更多文档包说明见 docs/llms.md