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

@aiform/cli-platform

v0.4.0

Published

hive 平台维护 CLI — 通过 platform HTTP API 管理租户/平台管理员/岗位/技能/new-api 同步

Readme

@aiform/cli-platform

Hive 平台维护 CLI(hive-platform)—— 通过 hive platform 服务的 HTTP API 管理租户、平台管理员、岗位、技能、new-api 同步队列。不直连数据库。

租户管理员视角的账号/节点动作在另一个包:@aiform/cli-workspace

安装

npm i -g @aiform/cli-platform       # 或 pnpm add -g / npx @aiform/cli-platform

配置

| 选项 | 环境变量 | 默认 | 用途 | |---|---|---|---| | --url <url> | PLATFORM_URL | http://localhost:3100(本地 dev) | platform base URL | | --email <email> | HIVE_ADMIN_EMAIL | —(多数命令必填) | 登录用 platform admin email | | --password <pw> | HIVE_ADMIN_PASSWORD | 无则交互输入 | 登录密码 | | --bootstrap-token <t> | PLATFORM_BOOTSTRAP_TOKEN | — | platform admin add 用(首位 admin 还不存在、无 session 时) |

线上 platform:https://platform.hiv.aiform.com(对应 workspace:https://app.hiv.aiform.com)。 PLATFORM_BOOTSTRAP_TOKEN 也要配在 platform 服务端(启用 POST /api/platform-admins)。

子命令

export PLATFORM_URL=https://platform.hiv.aiform.com   # 本地 dev 省略,默认 http://localhost:3100

# 引导首位 platform 管理员(不需要登录,用 bootstrap token)
PLATFORM_BOOTSTRAP_TOKEN=... hive-platform platform admin add [email protected]

# 之后用该 admin 登录做其它操作
export [email protected] HIVE_ADMIN_PASSWORD=...

# 租户(POST/GET /api/tenants)
hive-platform tenant add 'Acme Intelligence' --handle acme.co --plan pro --owner [email protected] --seats 50 --logo https://cdn.acme.co/logo.png
hive-platform tenant list

# 代某租户管理 workspace 成员(POST/GET /api/tenants/:id/users)——引导租户首位成员等
hive-platform tenant user add [email protected] --tenant acme.co --password 'init-pw-123'
hive-platform tenant user list --tenant acme.co

# new-api 同步队列(POST /api/newapi-outbox/drain、GET /api/newapi-outbox、POST /api/newapi-outbox/:id/requeue)
hive-platform outbox drain
hive-platform outbox list --pending
hive-platform outbox list --dead
hive-platform outbox requeue <id>

# 岗位(/api/positions*)
hive-platform position add 'Data Analyst' --code DATA_ANALYST --capability sql --skill <skillId> --publish
hive-platform position list --status published
hive-platform position publish <positionId>
hive-platform position archive <positionId>
hive-platform position enable  <positionId> --tenant acme.co
hive-platform position disable <positionId> --tenant acme.co

# 技能发布(多文件文件夹 → POST /api/skills + /versions)
hive-platform skill publish ./my-skill-folder --name my_skill --version 1.2.0 --label 'My Skill'

退码

0 成功;1 API/网络错误;2 参数错误;130 交互输入被 Ctrl-C 取消。