Octri CLI

dev.octri由 octri.dev 發布v1.0.6更新於 Oct 24, 2026

Push OpenAPI specs, build SDKs in ten languages, publish API docs, and triage production SDK errors.

概覽

AI 產生的概覽

Octri CLI 的 MCP 伺服器讓助理在 Octri 專案中推送 OpenAPI 規格、建置 SDK、發布文件,並處理正式環境的 SDK 錯誤。

可以做什麼
  • 推送、匯入、列出與檢視 OpenAPI 規格,並追蹤產生文件與變更記錄的流程
  • 建置、稽核、預覽、下載與重試十種語言的 SDK,並管理建置產物與儲存庫
  • 產生、發布與標記文件頁面、版本、導覽與自訂網域
  • 讀取監控摘要、問題、日誌、追蹤、效能、版本、警示與檢查,並對問題執行解決、忽略、重開或留言
  • 管理專案、組織、成員、API 金鑰、GitHub 同步與工作
  • 以具型別的工具提供相同指令,失敗會以工具結果回傳,助理可讀取並自行修正
適用情境
適合讓助理直接在 Octri 專案內工作:送出 OpenAPI 規格、反覆調整產生的 SDK、發布文件,或追查這些 SDK 回報的正式環境錯誤,而不必切換到主控台。
執行需求
以 stdio 在本機執行,透過 npx 或 octri 指令啟動;需要 Node 20 或更新版本。需要 Octri 帳號:先以 octri auth login 登入,或設定 OCTRI_API_KEY。可選 OCTRI_PROFILE 與 OCTRI_PROJECT_ID 指定設定檔與預設專案;在公司代理伺服器後方需在伺服器的 env 中設定 HTTPS_PROXY 與 NO_PROXY。
安裝前請注意
憑證來自 ~/.octri/config.json 中儲存的登入狀態,該檔案含工作階段權杖,應妥善保護;助理看不到這些憑證。除非以 --allow-publish 或 --allow-delete 啟動,否則發布到套件登錄與刪除規格會被拒絕。監控處理會寫入狀態(解決、忽略、重開、留言),建置、文件發布與網域變更會影響線上專案,並可能產生付費用量。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Octri CLI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@octri/cli

octri is the command line for your Octri project. It does what the dashboard does: push a spec, build SDKs, publish docs, and work through the errors those SDKs report from production.

Octri takes an OpenAPI spec and gives you a documentation site, client libraries in ten languages, an MCP server, and monitoring for the API behind all of it. See octri.dev.

Node 20 or newer.

Install

bash
npm install -g @octri/clioctri --help

Start here

bash
octri auth loginoctri projects useoctri specs push ./openapi.yaml

auth login prompts for your email and password, and for your authenticator code if you have two-factor on. projects use with no argument opens a picker.

specs push waits for the pipeline, not the upload. Your spec parses in about a second, then the doc pages, search index and changelog get written behind it. The spinner names the stage it is on.

Build an SDK

bash
octri sdk audit                            # what is costing you, scoredoctri sdk build --lang go,typescript --download

In a terminal, sdk build draws a lane per language and repaints it through generating, verifying, packaging, installing, ready. Piped or under CI it prints append-only lines instead, and exits non-zero if any language fails, so it works as a build step with no extra flags.

sdk audit scores the spec and marks which findings the generator can fix on its own. octri sdk audit apply <key> writes one in.

For a look at real generator output without spending a build:

bash
octri sdk preview --lang gooctri sdk preview --lang go --show client.go

Publish docs

bash
octri docs versions publish <specId>octri docs versions label <specId> "Stable"octri docs domain set docs.example.com

docs domain prints the CNAME and TXT records to create, then docs domain verify checks them.

Monitoring

Reads and triage run on your session, so they need nothing but a login:

bash
octri monitoring summaryoctri monitoring issues --status unresolvedoctri monitoring issue <id>octri monitoring resolve <id>

monitoring issue prints the stack and marks which frames resolved against uploaded source maps. When none of them did, the release those errors came from has no symbols, and the CLI says so.

The two upload commands work differently. They talk to the monitoring service directly with an ingest token, because a CI job has one secret and no way to log in:

bash
# CIoctri monitoring sourcemaps upload ./dist \  --url "$MONITORING_URL" --token "$MONITORING_TOKEN" \  --environment "$MONITORING_ENVIRONMENT" --release "$GIT_SHA"
# your own machine, already signed inoctri monitoring sourcemaps upload ./dist

Run octri monitoring config for the three values to store as CI secrets. The release you upload under has to equal the release your SDK reports at runtime, or the service has nothing to pair a trace with.

Commands

GroupWhat
authlogin · logout · whoami · token · profiles
configlist · set <k> <v> · use <profile> · path
projectslist · show · create · use · current
specslist · push <file|-> · import <url> · status · delete
sdklanguages · operations · settings get|set · validate · audit · preview · build · builds · watch · artifacts · download · retry · publish · repos · stats
docspages [generate|regenerate|publish|title] · show <slug> · guides · nav · versions · domain · changelog
monitoringstatus · enable · summary · issues · issue <id> · resolve|ignore|reopen|comment · logs · traces · performance · releases · alerts · checks · sourcemaps upload · sources upload · config
orgslist · show · switch · usage · billing · invoices · members · invites
keyslist · create <name> · revoke <id>
githubstatus · connect <owner/repo> · sync · auto-sync <on|off>
jobslist · show <id>
mcptools · serve

Run octri <group> --help for one group on its own.

Global flags: --project <id>, --profile <name>, --api-url <url>, --json, --quiet, --plain, --no-color.

Output

ModeWhenWhat you get
InteractiveA terminalColour, spinners, live build lanes, tables
PlainPiped, or CI is setAppend-only lines, no escape sequences
--jsonYou ask for itOne JSON document on stdout, errors on stderr

--json is the one to script against:

bash
octri sdk builds --json | jq '.[0].status'octri monitoring issues --status unresolved --json | jq 'length'

NO_COLOR and FORCE_COLOR are both honoured.

Configuration

State lives in ~/.octri/config.json, mode 0600, since it holds session tokens. OCTRI_CONFIG_DIR moves it.

Profiles keep environments side by side:

bash
octri config use prod --api-url api.octri.devoctri config set defaultLanguages go,rust,swift

Every value resolves flag first, then environment, then the stored profile.

VariableEffect
OCTRI_PROFILEProfile to use
OCTRI_API_URLAPI root (local is shorthand for :3001)
OCTRI_TOKENBearer token, bypassing the stored session
OCTRI_API_KEYAPI key for the public routes
OCTRI_PROJECT_IDDefault project
OCTRI_CONFIG_DIRWhere config and the artifact cache live
OCTRI_DEBUGPrint stack traces on failure

Behind a proxy

The CLI and octri mcp serve read the standard proxy variables, in upper or lower case, with no extra Node flag. https:// requests use HTTPS_PROXY, or HTTP_PROXY when that is the only one set. Hosts listed in NO_PROXY, and their subdomains, connect directly; * turns the proxy off.

bash
export HTTPS_PROXY=http://user:[email protected]:3128export NO_PROXY=localhost,127.0.0.1,corp.exampleoctri specs push ./openapi.yaml

If the proxy inspects TLS with its own certificate authority, point Node at that CA with NODE_EXTRA_CA_CERTS=/path/to/ca.pem.

MCP clients usually start servers with a minimal environment, so set these in the server's env block rather than relying on your shell.

MCP server

bash
octri mcp serve

This speaks MCP over stdio and offers the same commands as typed tools. An assistant can push a spec, wait for the build, read the generated Go, and then read the production error that build caused.

To add it to Cursor or VS Code in one click, through npx so no global install is needed:

[Add to Cursor] [Install in VS Code]

The server uses the profile from octri auth login, so sign in first, or set OCTRI_API_KEY in its environment. Listed in the official MCP Registry as dev.octri/cli.

jsonc
// Claude Desktop / Cursor{  "mcpServers": {    "octri": {      "command": "octri",      "args": ["mcp", "serve"]    }  }}

Credentials come from your stored profile and the assistant never sees them. Reads are open. The two operations you cannot take back are refused unless you start the server with the flag for them:

bash
octri mcp serve --allow-publish   # publishing to package registriesoctri mcp serve --allow-delete    # deleting specs

Tool failures come back as tool results rather than protocol errors, so an assistant can read the message and correct itself.

Notes

  • Build progress is polled, not streamed. The /ws/sdk socket authenticates from a header or cookie, which Node's built-in WebSocket cannot set, and a WebSocket dependency would buy about a second of latency on a build that takes minutes.
  • Artifact archives are extracted by hand-rolled tar and zip readers, so neither binary needs to be installed. Both refuse entries that would write outside the destination directory.
  • @modelcontextprotocol/sdk is the only runtime dependency. Colour, spinners, progress bars, tables and prompts are all local.

The rest of Octri

ProductWhat it does
API StudioYour OpenAPI spec becomes a hosted documentation site with a live request playground, editable page by page.
SDK StudioThe same spec becomes client libraries for ten languages, versioned and released together.
MCPYour endpoints and docs become tools an AI assistant can call, generated from the same spec.
MonitoringErrors, traces, uptime and releases for the API, joined to the SDK calls that reached it.

Monitoring runtimes

Node · Python · Go · Ruby · Rust · PHP · Java · Kotlin · Swift · Dart

Documentation · Pricing · Changelog

MIT licensed.

來源:README.md,提交 4105da1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v1.0.6最新Oct 12, 2026
  2. v1.0.4Sep 27, 2026
  3. v1.0.3Sep 25, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分