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

knowledge-studio-cli

v1.15.0

Published

Lightweight RAG CLI for Aliyun Model Studio — focused on knowledge-base retrieval.

Readme

Knowledge Studio CLI

阿里云 Model Studio 轻量级 RAG 命令行工具 — 专注知识库检索。

npm version Node.js TypeScript License

Knowledge Studio 控制台 · English · API 文档

这是什么?

kscli 是阿里云 Model Studio (DashScope) 平台的知识库检索专用命令行工具,专为 RAG(检索增强生成)场景打造。

安装

npm install -g knowledge-studio-cli

需要 Node.js >= 18.17。

快速开始

# 检索知识库
kscli search \
  --query "什么是 Model Studio?" \
  --agent-id <your-agent-id> \
  --workspace-id <your-workspace-id>

# 知识库问答
kscli chat \
  --message "什么是RAG?" \
  --agent-id <your-agent-id> \
  --workspace-id <your-workspace-id>

命令列表

| 命令 | 说明 | | :------------ | :------------------------------------ | | search | 知识库语义检索(RAG) | | chat | 知识库问答(流式输出) | | retrieve | 查询知识库(已弃用,请使用 search) | | config show | 显示当前配置 | | config set | 设置配置项 | | update | 自更新到最新版本 |

认证方式

推荐使用 DashScope API Key 进行认证。前往 DashScope 控制台 获取。

# 方式一:环境变量
export DASHSCOPE_API_KEY=sk-xxxxx

# 方式二:登录命令(持久化到 ~/.bailian/config.json)
kscli config set --key api_key --value sk-xxxxx

# 方式三:命令行参数
kscli search --api-key sk-xxxxx --query "..." --agent-id <id> --workspace-id <id>

配置

# 查看当前配置
kscli config show

# 设置默认值
kscli config set --key base_url --value https://dashscope-us.aliyuncs.com
kscli config set --key timeout --value 600

# 自更新
kscli update

配置文件位置:~/.bailian/config.json

相关链接

| 资源 | 地址 | | :---------------------- | :--------------------------------------------------- | | Knowledge Studio 控制台 | https://rag.console.aliyun.com/ | | DashScope API 文档 | https://help.aliyun.com/zh/model-studio/ | | 获取 API Key | https://bailian.console.aliyun.com/?tab=app#/api-key |

参与贡献

欢迎提 Issue、Feature Request 和 PR。开发环境搭建与贡献流程请见 CONTRIBUTING.zh.md

许可证

Apache 2.0