@abyssinia-labs/sokie

中文文档
0.10.1发布于 2026/11/11Apache-2.0ES Module近 30 天下载 8495

Turn an OpenAPI or Swagger spec into an MCP server, run it on your machine, and deploy it to Sokie. The sokie command (alias sok).

原始使用文档
文档目录5 节
  1. From a spec to a live server
  2. Commands
  3. Workspaces
  4. Links
  5. License

sokie

The command line for Sokie. Give it an OpenAPI or Swagger spec and every endpoint becomes a typed tool on an MCP server: run it on your machine, then deploy it to its own address at <slug>.sokie.cloud/mcp, where claude.ai, ChatGPT, Cursor, Claude Code and VS Code can call it.

npm i -g @abyssinia-labs/sokie

You need Node 22 or later. This installs sokie, and sok as a short alias.

From a spec to a live server

sokie login
sokie init https://petstore3.swagger.io/api/v3/openapi.json petstore
cd petstore
sokie dev
sokie deploy --create
  • sokie login opens your browser to sign this computer in. The same page makes your account. On a machine you reach over SSH, add --no-browser.
  • sokie init reads an OpenAPI 3 or Swagger 2 spec, from a file or a URL, and writes the server: sokie.json, a copy of the spec, and one Markdown file per tool in tools/. Those files are the whole server, with no generated code to maintain. When the API takes a key, it asks for yours, for sokie dev, and keeps it in .sokie/dev.env, which git ignores.
  • sokie dev runs it on the same runtime a deploy uses, with an inspector to call each tool, and reloads on every save.
  • sokie deploy --create puts it live and prints its address. After the first time, sokie deploy is enough.

The quickstart walks through it, including the key the Petstore API asks for and connecting claude.ai.

Commands

CommandWhat it does
initStart a server from an OpenAPI or Swagger spec.
checkCheck the server the way a deploy would, without deploying.
toolsList the tools, or show one with its effect and findings.
skillsList the skills in skills/, write a new one, try it, or install a server's.
callCall one tool as an agent would, on sokie dev or a deploy.
testRun the cases in tests/ on sokie dev or a deploy.
fmtWrite sokie.json the one way Sokie writes it.
devRun the server locally on the real runtime, reloading on every edit.
editOpen a server's files in your editor, with sokie dev running.
pullBring a folder from sokie edit up to date with production.
login, logout, whoamiSign this computer in or out, or show who it's signed in as.
workspaceShow, list or choose the workspace commands work in.
deployDeploy the server and wait until it's live.
deploysList a server's deploys, compare two, or restore an earlier one.
linkDeploy the server from its GitHub repository.
secretsList, set or remove the server's secrets.
keysMake, list and revoke API keys for CI, scripts and agents.
domainsServe your servers at your own domain: one for the workspace, or one per server.
requestsAsk an owner or admin for a change that's theirs, or answer what members asked.
logsShow the server's calls, as far back as your plan keeps them.
auditShow who changed what in your workspace.
configShow or shorten how long CLI sign-ins last.
updateInstall the newest sokie, the way this one was installed.

Every command takes --help, and --json when a script reads its output. Commands that talk to Sokie take --site <url> (or SOKIE_SITE) for a site other than sokie.sh. The CLI reference lists every option.

Workspaces

Servers, keys, domains and the audit trail belong to a workspace. Commands work in your default one, the workspace you last opened on sokie.sh, unless you choose another:

sokie workspace list          # the workspaces you're in
sokie workspace use acme      # work in sokie.sh/acme from now on
sokie deploy --create --workspace acme   # or for one command

SOKIE_WORKSPACE=acme does the same as --workspace for every command run with it set, which suits CI. sokie workspace shows the one in use and why, and sokie workspace use --clear goes back to your default.

Deleting a server, making one public, and taking away an address callers use are for owners and admins. A member asks instead, and any one owner or admin answers:

sokie requests ask delete billing-v2 --reason "Replaced by billing-v3"
sokie requests                    # what waits for your answer, and what you asked
sokie requests approve kd7a3f9c   # or decline, with --note

An owner or admin can also make a server's production deploys wait for one of them. A deploy that must wait is held: sokie deploy stops there and says why, and it serves only the team, signed in, at its own address for up to 7 days. It's listed in sokie requests for an owner or admin to approve, which puts it live:

sokie call getInvoice --held 12   # try held deploy 12 before anyone approves it
sokie deploys                     # held shows as waiting for an admin

License

Apache-2.0: see the LICENSE and NOTICE files in this package. The CLI bundles third-party packages, whose licenses are in dist/THIRD-PARTY-NOTICES.txt. Using the hosted service at sokie.sh is covered by its terms.

版本与发布记录

@abyssinia-labs/sokie 共发布 68 个版本,首次发布于 2026/10/22;过去 12 个月发布了 68 个版本。

版本发布日期距今
0.10.1latest2026/11/11今天
0.10.1-staging.234staging2026/11/11今天
0.10.1-staging.2332026/11/11今天
0.10.1-staging.2312026/11/10今天
0.10.1-staging.2292026/11/074 天前
0.10.1-staging.2282026/11/074 天前

关于 @abyssinia-labs/sokie 的常见问题

@abyssinia-labs/sokie 是什么?

Turn an OpenAPI or Swagger spec into an MCP server, run it on your machine, and deploy it to Sokie. The sokie command (alias sok).

如何安装 @abyssinia-labs/sokie?

在项目目录运行 npm install @abyssinia-labs/sokie,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 sok、sokie,可以用 npx sok 直接运行。

@abyssinia-labs/sokie 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/abyssinia-labs__sokie 是否存在。

@abyssinia-labs/sokie 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@abyssinia-labs/sokie 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@abyssinia-labs/sokie 可以商用吗?

@abyssinia-labs/sokie 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@abyssinia-labs/sokie 的下载量有多少?

根据 npm 官方下载统计,@abyssinia-labs/sokie 在 2026/10/05 – 2026/11/03 这 30 天内被下载 8,495 次,日均约 283 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@abyssinia-labs/sokie 还在维护吗?

最新版本 0.10.1 发布于 2026/11/11(今天);至今共发布 68 个版本,其中过去 12 个月发布了 68 个;首次发布于 2026/10/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。