Skip to content

hwttop5/tabbit2api

Repository files navigation

Tabbit2API

Tabbit2API 是一个本地网关,它会把你电脑上已安装的 Tabbit 客户端封装成兼容 OpenAI Responses、Chat Completions、Assistants、Realtime 文本接口,以及 Anthropic Messages 的本地端点,供 Codex、Claude Code、OpenClaw、Hermes Agent 等工具使用。

它运行在你自己的机器上,依赖本机 Tabbit 的登录状态,定位是本地单用户自动化桥接,而不是公网部署服务。

快速开始

临时运行:

npx tabbit2api

全局安装:

npm i -g tabbit2api
tabbit2api

如果当前还没有可用的运行时 profile,Tabbit2API 会先打开 Tabbit 登录窗口,并在登录完成后再启动网关。

验证环境

检查本地路径和网关健康状态:

tabbit2api doctor

使用默认端口启动网关:

tabbit2api start

健康检查:

curl.exe http://127.0.0.1:50124/health

使用本地占位 API 密钥列出模型:

curl.exe -H "Authorization: Bearer sk-tabbit-local" http://127.0.0.1:50124/v1/models

支持的平台

  • Windows:官方支持
  • macOS:官方支持
  • Linux:仅支持通过 TABBIT_EXECUTABLETABBIT_USER_DATA_DIR 手动覆盖

默认路径:

Windows 可执行文件: %USERPROFILE%\AppData\Local\Tabbit\Application\Tabbit.exe
Windows 用户数据目录: %USERPROFILE%\AppData\Local\Tabbit\User Data
macOS 可执行文件: /Applications/Tabbit.app/Contents/MacOS/Tabbit
macOS 用户数据目录: ~/Library/Application Support/Tabbit/User Data

运行时状态目录默认值:

Windows 运行态目录: %LOCALAPPDATA%\tabbit2api
macOS 运行态目录: ~/Library/Application Support/tabbit2api
Linux 运行态目录: ~/.local/share/tabbit2api

常用命令

tabbit2api
tabbit2api start --port 50125
tabbit2api login --refresh
tabbit2api probe
tabbit2api doctor

文档

使用限制

  • 这不是 Tabbit 官方 API。
  • 它依赖本地 Tabbit 桌面端安装和登录状态。
  • 它面向本地使用,不应直接暴露到公网。

许可证

GPL-3.0-only。详见 LICENSE

About

一个本地网关,把 Tabbit Web Chat 能力桥接成 API 给外部调用,白嫖最新的大模型 GPT-5.5、 Opus-4.8 等。| A local gateway that turns Tabbit into an API, letting you freeload the latest LLMs — GPT-5.5, Opus 4.8, and more.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors