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

@ailuntz/minilink

v0.10.10

Published

Use your Codex profiles in the Desktop model menu.

Readme

MiniLink

在 ChatGPT / Codex Desktop 的原生模型菜单中使用自定义模型。

说明

官方 Profiles 已支持独立配置文件:codex --profile deep-review 会在 ~/.codex/config.toml 上叠加 ~/.codex/deep-review.config.toml。配置使用顶层字段,无需嵌套在 [profiles.deep-review] 中。

截至 2026-09-24,仅添加 Profile 不会将额外供应商的模型加入 Desktop 菜单。MiniLink 读取这些配置,补充桌面端的模型选择能力。

用量提示: 请避免耗尽原生 ChatGPT / Codex 账号的可用额度。额度耗尽后,Desktop 可能禁用输入框的发送按钮,即使切换至自定义模型也可能无法发送。MiniLink 不解除这一限制。

安装

需 Node.js ≥22.16,并已安装 Desktop。

macOS / Windows / Linux:

npm install -g @ailuntz/minilink
minilink on

完全退出并重开 Desktop。

npm install 只安装命令;minilink on 才接入 Desktop。更新包后再次运行 minilink on。

本机 Desktop 集成调用 Desktop 自带的 Codex;SSH 远程入口调用远程主机的独立 Codex。配置和会话仍使用官方的 CODEX_HOME(默认 ~/.codex);MiniLink 自己的启动文件放在 ~/.local/share/minilink。

从 MacBook 的 Desktop 通过 SSH 使用 Mac mini 会话时,也要在 Mac mini 上安装并运行 minilink on。远程入口使用 Mac mini 的独立 Codex,并把模型列表和选择接入 MiniLink。on 会在远程登录 shell 中设置仅供 Codex SSH 启动器使用的 CODEX_INSTALL_DIR;off 会撤销这段设置。重新连接远程主机后生效。

命令

| 命令 | 用途 | | --- | --- | | minilink on | 开启 | | minilink link | 选择模型与推理强度 | | minilink off | 关闭,并撤销后续 Desktop 启动的 MiniLink 覆盖 | | minilink doctor | 检查配置与运行状态 |

通过 minilink link 保存选择后,完全退出并重开 Desktop。

off 会让后续启动直接使用 Desktop 自带的 Codex;on 会重新接入 MiniLink。已打开的 Desktop 需要完全退出并重开,才会切换启动方式。

配置

读取 ~/.codex/*.config.toml。通过 model_catalog_json 指定模型目录;未指定时继承原生目录。密钥使用提供商配置的环境变量,也可保存在 ~/.codex/.env。

支持 Responses API。符合条件的连接提供 -Chat 选项。

Chat(0.10.8)

版本号接续此前的 0.10 系列;当前实现保留普通模型直连和 Chat 专用 Responses 路径。0.9.16-chat.1 / chat.2 是本地实验编号,未发布到 npm。

普通模型由 Codex 直连供应商。只有 -Chat 经过 MiniLink 专用转发:提取用户和助手的聊天内容,直接发送精简的 Responses 请求。不使用 Chat Completions,不注入编程提示、工作区、技能或本地工具目录;默认 instructions 为空。

  • 文字:保留用户与助手的聊天历史。不会自动摘要或静默丢弃旧消息。
  • 图片:可添加 PNG、JPEG、GIF、WebP,单张最多 8 MiB;支持本地附件、图片 data URL 和 HTTPS URL。模型和供应商仍需支持图片。历史本地图片必须仍可读取;暂不支持文件 ID。
  • 搜索:按当前连接和模型的能力选择;支持联网时始终提供工具,以 tool_choice: auto 让模型自行决定是否使用。独立搜索使用官方 web.run 与当前供应商的 alpha/search;原生搜索使用当前供应商 Responses 的 web_search。两种方式都保留搜索事件和来源,不开放本地工具,不借用其他供应商的密钥。
  • 文件、音频、技能和应用附件:暂不支持,明确报错。普通文本里提到文件路径不会自动读取文件。
  • 用量:minilink doctor 的 active[].chatUsage 显示每个 profile 最近完成的 Chat 请求字节数及上游实际输入、缓存、输出 token;缺失用量显示 null。仅记录计数,不记录消息、图片或密钥。

Chat 请求正文上限为 16 MiB;这是字节限制,不是模型 token 上下文大小。供应商可能有更低限制。新增能力应在新建的 Chat 会话中试用;旧运行进程需重启 Desktop 才会加载。

搜索能力选择

| 当前连接 | 自动选择 | | --- | --- | | 提供商明确设置 supports_standalone_web_search = true(现有 MiniSub、Sub2API 配置) | 独立搜索;请求仍发给所选连接 | | 豆包官方北京 Ark /api/v3,Seed 2.1 Pro / Lite | 原生 web_search;账号需开通联网搜索服务 | | DeepSeek 当前 Responses API | 普通 Chat,不提供搜索工具 | | 未声明搜索能力的其他连接/模型 | 普通 Chat,不盲试接口 |

未提供搜索工具时,菜单会说明无法联网,并加入唯一一段简短提示:当前连接没有联网搜索工具。涉及实时信息时请说明无法实时查询,不要声称已搜索或编造搜索结果。

已确认自定义网关能力时,可在对应 *.config.toml 指定(只影响 Chat):

[minilink]
chat_search = "auto" # auto / standalone / native / disabled

显式设置优先于自动选择。native 要求该连接实际支持 Responses 内置 web_search;不会把普通 function calling 当成联网能力。服务未开通、权限不足或接口失败时保留明确错误,不自动切换到其他搜索服务。能力依据:DeepSeek Responses 兼容说明、豆包联网内容插件。

独立搜索每轮最多 6 次,每次结果由官方 Codex 执行器返回给模型;相同搜索请求的本轮重试复用结果。只放行已登记的 web.run 调用及其真实结果,完整工具定义仍占用 token。原生搜索的内部循环由供应商执行,不额外发送 alpha/search,不套用独立搜索的次数上限。每个 HTTP 请求最多 120 秒,整轮最多 4 分钟,取消会中止连接;模型生成失败不自动重发。搜索按供应商规则计费;doctor 记录 searchMode、整轮模型用量、模型请求数和搜索次数。原生搜索次数优先使用供应商 usage.tool_usage.web_search,否则按完成的搜索事件计数,不能据此推断账单。

同一会话可以切换同一供应商下的模型。跨供应商切换目前会在发送前被拒绝;请在新会话中选择目标模型。MiniLink 不修改 Codex 的会话 JSONL 或 SQLite 索引。请求层转换的设计见框架图。

0.10.6 修复创建分支时丢失自定义连接的问题:普通分支从原生 thread/read 读取父会话的当前供应商、模型和推理强度,显式传给 thread/fork;模型列表、会话读取、创建通知与恢复响应统一显示 profile 模型名称。此前已经创建成其他供应商的分支不会自动改写,请重启 Desktop 后从正确的父会话重新创建分支。此修复不开放跨供应商热切换。

换连接后分支续聊(0.10.7)

0.10.10 修复 Node 26 将历史中的 Unicode 行/段落分隔符误当成 RPC 换行的问题:模型目录进程使用 LF 字节划分 JSONL,避免恢复长会话后进程退出、发送时报 thread not found。目录进程意外退出时,也会保留会话归属并明确提示重新打开,不再把发送请求交给未加载该会话的主进程。

0.10.9 增加 DeepSeek、豆包 Responses profile 的原生分支续聊支持;需要指定该 profile 模型目录中的模型及其支持的推理强度。普通跨连接发送与 Chat 模式仍不支持切换。

0.10.8 修复旧会话保存了 cdr:… 菜单模型别名时被误判为不兼容的问题,并保留 MiniLink 返回的具体错误原因。模型别名只用于识别模型,实际供应商仍以原生会话元数据为准;不修改旧会话记录。

支持主配置入口(config.toml 的 model_provider)以及 minisub.config.toml、sub2api.config.toml、deepseek.config.toml、doubao.config.toml 之间的 Responses 会话分支。目标 profile 需配置 Responses API,并在模型目录中提供所选模型。OpenAI / openai / native 都表示当前主配置入口,不会强行改成 OpenAI 官网地址。

复制旧会话链接,在终端执行:

minilink fork codex://threads/会话ID minisub
minilink fork codex://threads/会话ID sub2api
minilink fork codex://threads/会话ID deepseek --model deepseek-flash --effort low
minilink fork codex://threads/会话ID doubao --model doubao-seed-2-1-pro-260915 --effort low
minilink fork codex://threads/会话ID OpenAI

命令通过官方 thread/fork 创建新会话,保留原生历史,并在 macOS 自动打开新分支;原会话保留。命令不发送聊天消息,不增加模型请求代理,不修改原会话 JSONL 或数据库。默认继承已保存的模型和推理强度;换到不同模型家族时,请指定目标目录中的模型和该模型支持的推理强度:

minilink fork codex://threads/会话ID minisub --model gpt-6-astra --effort high

--no-open 仅返回链接,适合 SSH 或脚本。请在上一轮完成后执行;尚未保存的输入草稿不会自动转移。普通模型菜单仍只更新同一连接内的模型,不会隐式创建分支。Chat 模式不加入这个兼容组。分支保留完整原生历史,因此图片、搜索引用、工具记录及长上下文是否被另一入口接受,仍取决于目标服务;失败不会自动删减历史或重试到另一连接。

供应商示例:DeepSeek / 豆包 / Sub2API。修改配置后重启 Desktop。

卸载

先运行 minilink off,再卸载:

minilink off
npm uninstall -g @ailuntz/minilink

卸载后完全退出并重开 Desktop。

官方搜索实现来源

src/web-tool.json 是从 Desktop 自带 Codex 0.158.0-alpha.2.1 捕获的完整 web.run 定义,未改写参数或说明;当原生请求仅暴露代码模式工具时使用该定义。执行器仍是官方 Codex。实现对应 openai/codex 的 web-search 扩展,采用 Apache-2.0 许可,见 LICENSE。搜索上下文仅携带最近两条用户文字及中间的助手文字;助手部分额外限制为 1,000 个 Unicode 字符,避免引入分词依赖。