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

@bte-settle/cli

v0.2.3

Published

DTC+ 结算系统 Admin API CLI(查询数据 / 触发同步 / 周期管理 / 导出账单)

Readme

@bte-settle/cli

DTC+ 结算系统 Admin API 命令行工具(命令名 settle),用于查询结算数据、触发数据同步、管理结算周期、导出账单。

安装与使用

# 免安装直接用(推荐)
npx @bte-settle/cli projects list

# 或全局安装后直接用 settle
npm i -g @bte-settle/cli
settle projects list

鉴权

默认连接 https://dtcplus-bte.fastgrowth.app--base-url 或环境变量 SETTLEMENT_API_BASE 可覆盖)。

包内不含 token。向管理员索取 token 后设置环境变量:

export SETTLE_TOKEN=stl_xxx   # 也支持 SETTLEMENT_API_TOKEN 或 cwd .env 中的同名变量
settle projects list

安装 Claude Code Skill

把 settlement-cli skill 装到 Claude Code,让 Agent 自动按规范使用本 CLI:

# 项目级(.claude/skills/)
npx @bte-settle/cli skill install

# 用户级(~/.claude/skills/)
npx @bte-settle/cli skill install --global

安装到其他 AI 工具(Cursor / Codex / Gemini CLI 等)

写入通用 AGENTS.md 标准(幂等标记块,重复执行只更新不重复):

npx @bte-settle/cli skill install --agent

常用命令

settle --json projects list [--code <code>]            # 项目列表
settle --json periods list --project <code>            # 结算周期
settle periods report --project <code>                 # 周期汇总报表
settle flows list --period <periodId>                  # 结算流水(默认 pageSize=2000)
settle configs channels --project <code>               # 渠道结算配置
settle configs projects --project <code>               # 项目结算配置
settle expense-items list --project <code>             # 支出项(结算条款)
settle contract-files list --project <code>            # 合同文件
settle exchange-rates get --from EUR                   # 汇率
settle sync logs --project <code>                      # 同步日志
settle sync data orders --project <code>               # 已同步订单原始数据
settle periods export <periodId> --out .               # 导出账单 Excel
settle --help                                          # 完整命令列表

全局选项:--json(输出原始 JSON)、--base-url <url>--token <token>。退出码:0 成功、1 API 报错、2 网络错误。

安全注意

  • 破坏性操作(periods regenerateperiods confirmflows batch-updateperiods add-manual-flow 等)执行前请确认
  • token 等同于 Admin API 全权限,请妥善保管;泄露后联系管理员轮换(服务端改 SETTLEMENT_API_TOKEN,使用者更新 SETTLE_TOKEN 即可)