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

rios-cli

v0.2.10

Published

睿思 CLI — 连接睿思智能模型网关的终端 AI 编程助手

Readme

睿思 CLI(RiOS CLI)

连接 睿思智能模型网关(https://mlm.rios.com.ai)的终端 AI 编程助手。在本地项目中读写代码、执行命令、调用 MCP 与 Skills,模型推理经睿思云平台统一调度与计费。

运行时:需要 Bun ≥ 1.2 与 Node.js ≥ 18。


一行安装

npm install -g rios-cli

或使用睿思控制台提供的安装脚本(自动检测并安装 Bun):

curl -fsSL https://cloud.rios.com.ai/install-rios-cli.sh | bash

验证:

rios --version

快速开始

1. 登录睿思云(推荐)

rios

在交互界面输入 /login,浏览器打开 睿思控制台 完成 OAuth。登录成功后会自动创建 sk_rios_* 并写入本机钥匙串;会话保存在 ~/.rios-code。

若已登录但对话报 401 Invalid or revoked API key,请先 /logout 再 /login(旧版 CLI 可能未自动建钥),或在 TokenHub 手动创建 Key 后 export RIOS_API_KEY=sk_rios_...。

2. 或使用 API Key

在控制台 TokenHub 创建 sk_rios_* 密钥(需有效会员订阅),然后:

export RIOS_API_KEY=sk_rios_你的密钥
export RIOS_BASE_URL=https://mlm.rios.com.ai
export RIOS_DEFAULT_MODEL=minimax-m2.5   # 可选,默认已是 minimax-m2.5
rios

网关为腾讯 TokenHub(OpenAI 兼容)。直接调用:

curl -sS -X POST "https://mlm.rios.com.ai/v1/chat/completions" \
  -H "Authorization: Bearer sk_rios_你的密钥" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax-m2.5","messages":[{"role":"user","content":"你好"}]}'

CLI 交互模式走 /v1/messages,由睿思网关自动适配;/model 会从 GET /v1/models 同步云端可用模型列表。

也可复制模板为本地配置:

cp .env.rios.example .env   # 仅源码开发时需要

3. 常用命令

rios                    # 交互 TUI
rios -p "解释这段代码"    # 无头单次输出(脚本 / CI)
rios --help
rios /model             # 选择网关可用模型

环境变量

| 变量 | 必填 | 说明 | |------|------|------| | RIOS_API_KEY | 二选一 | 睿思 API Key(sk_rios_*),映射为推理鉴权 | | RIOS_AUTH_TOKEN | 可选 | Bearer Token | | RIOS_BASE_URL | 否 | 网关地址,默认 https://mlm.rios.com.ai | | RIOS_OAUTH_API_BASE | 否 | OAuth 后端根地址;若 cloud 仅为静态站,需指向 rios-api | | RIOS_OAUTH_USE_CLOUD_CALLBACK | 否 | 设为 1 时浏览器登录后手动粘贴回调 URL |

preload.ts 会将 RIOS_* 映射到 CLI 内部推理配置。未设置 CLAUDE_CONFIG_DIR 时,状态目录默认为 ~/.rios-code(与第三方工具配置隔离)。


功能

  • Ink 终端交互界面
  • --print 无头模式
  • MCP 服务器、插件、Skills
  • /login 睿思云 OAuth
  • /model 拉取网关模型列表并与 Key 白名单对齐
  • Recovery 降级模式:CLAUDE_CODE_FORCE_RECOVERY_CLI=1 rios

从源码开发

git clone https://github.com/Finwhale-LLC/RiOS2026.git
cd RiOS2026/rios-cli
bun install
cp .env.rios.example .env
./bin/rios

Ghostty 终端

Ghostty 可能不加载完整 PATH,导致找不到 rios 或 bun。将以下内容写入 ~/.zprofile:

export BUN_INSTALL="$HOME/.bun"
export PATH="$HOME/.bun/bin:$HOME/.npm-global/bin:/opt/homebrew/bin:$PATH"

然后 source ~/.zprofile 或重开 Ghostty。rios 启动脚本(0.2.3+)也会自动尝试从上述路径查找 bun。


更新与卸载

npm update -g rios-cli
# 或
npm uninstall -g rios-cli

配置与会话数据在 ~/.rios-code,卸载 npm 包不会自动删除。


项目结构

bin/rios                 # 入口
preload.ts               # 环境映射与版本信息
bunfig.toml              # Bun preload 配置
.env.rios.example        # 环境变量模板
src/
├── entrypoints/cli.tsx  # CLI 主入口
├── main.tsx             # TUI 主逻辑
├── commands/            # 斜杠命令
├── tools/               # Agent 工具
├── services/            # API、OAuth、MCP
└── components/          # UI 组件

相关链接

  • 睿思控制台:https://cloud.rios.com.ai
  • 模型网关:https://mlm.rios.com.ai
  • CLI 安装页:https://cloud.rios.com.ai/cli.html

© RiOS Foundation