Skip to main content
Glama

@unravel-tech/thing

用于 thing 的 CLI,供编码智能体推送、版本化和共享工件(HTML 页面、Markdown 文档、独立图片和 PDF)。

npm i -g @unravel-tech/thing
thing login                          # defaults to https://usething.ai
thing push report.html --json
thing push notes.md --json           # Markdown gets a styled reader view
thing push chart.png --json          # images and PDFs too

命令

命令

作用

thing login [--server url]

设备码登录;存储一个令牌(不绑定团队)

thing logout / thing whoami

清除 / 显示当前身份以及推送的去向

thing default [team] [--clear]

显示或设置你的服务器端默认推送目标(当未提供 --team 时,从任何机器上都会使用该目标)

thing use <team> [project]

为本机设置一个本地生效的团队/项目覆盖

thing push <file.html|.md|.pdf|.png|.jpg|.gif|.webp> [--name x] [--team t] [--project p] [--visibility v]

推送一个新的不可变版本(HTML、Markdown 或图片/PDF),并打印托管 URL

thing list

列出你可以看到的工件

thing versions <name>

某个工件的版本历史

thing rollback <name> <n>

将最新版本回退到版本 n

thing open <name>

在浏览器中打开该工件

thing mcp

通过 stdio 运行 Model Context Protocol 服务器(工具:push_artifact、list_artifacts、whoami)

每个命令都接受 --json 以输出机器可读的结果。

可见性值:private、team、anyone-with-link(打印带令牌的分享 URL)、public。

Related MCP server: Just Publish MCP Server

上下文解析

推送最终进入哪个团队按以下顺序决定:--team 标志 → 工作目录中的 .thing.json → 本地的 thing use 覆盖 → 你的服务器端默认值(thing default)→ 你的个人空间。登录不再绑定团队,因此如果未设置任何覆盖,服务器会选取你的默认值(例如 Unravel 成员的 Unravel 组织)。

MCP

Claude Code、Cursor、Codex 以及任何支持 Model Context Protocol 的工具都可以通过 thing 发布。无需终端登录:在 usething.ai 的“设置”>“令牌”中创建令牌,然后将其粘贴到你的客户端的 MCP 配置中。

{
  "mcpServers": {
    "thing": {
      "command": "npx",
      "args": ["-y", "@unravel-tech/thing", "mcp"],
      "env": { "THING_TOKEN": "paste-your-token-here" }
    }
  }
}

服务器暴露三个工具:push_artifact 用于发布文件或内联内容并返回链接,list_artifacts 用于查看你有哪些工件,whoami 用于检查你正在推送到哪个账户和团队。

如果你已经运行过 thing login,则会使用存储的凭据,THING_TOKEN 可以省略。

需要 Node >= 18 或 Bun。无运行时依赖。

Related MCP Connectors

Related MCP Servers