@easysociable/cli

中文文档
0.1.47发布于 2026/11/13MITES Module近 30 天下载 3667

Agent-first CLI for EasySociable: Content Engine, Template, Slideshow, and MCP

原始使用文档
文档目录10 节
  1. Quick start
  2. Content Engine
  3. MCP Server Configuration
  4. Claude Desktop ( claude_desktop_config.json )
  5. Claude Code
  6. Cursor ( ~/.cursor/mcp.json )
  7. Authentication
  8. Building: production vs development
  9. Other commands
  10. License

EasySociable CLI

Agent-first CLI for EasySociable: local Content Engine, Template, Slideshow, and MCP.

npm i -g @easysociable/cli
# or
curl -fsSL https://easysociable.com/install.sh | bash

Requires Node.js 20+. Content Engine workbench also needs python3.

Quick start

# Default skill + MCP for Codex / Claude Code (slideshow).
# The curl installer already runs this; needed after an npm install.
easysociable install --yes

Default install does not include easysociable-content. Add it when you want the Content Engine pointer skill:

easysociable install --skills content,template,slideshow --yes

Preferred: clone the public core:

git clone https://github.com/murphywuwu/content-engine.git
cd content-engine
python3 workbench/build.py
python3 workbench/serve.py --no-open

See https://github.com/murphywuwu/content-engine (LAYOUT.md, migrate-split-vault.py).

Optional: easysociable engine init --root … --yes clones that repo into Content Engine/ (never overwrites an existing engine).

Then tell the Agent to follow CLAUDE.md. The core includes separate products/ (owned offers) and recommendations/ (third-party review subjects); neither is a substitute for needs/.

Lazy-auth guidance lives in the package at skills/ONBOARDING.md.

Content Engine

Core methodology lives in the public GitHub repo, not inside this CLI tarball. engine serve / build do not overwrite local workbench files unless you pass --sync-workbench (pulls from the public core checkout / CONTENT_ENGINE_CORE).

CommandPurpose
easysociable engine init [--root] [--yes] [--serve]Clone public core into Content Engine/ (no overwrite)
easysociable engine update [--engine] [--yes]Sync core rules from the public template; preview first, apply with --yes. Never touches vault data
easysociable engine serve [--engine] [--no-open] [--sync-workbench]Rebuild + start on :8765
easysociable engine build [--engine] [--sync-workbench]Rebuild workbench/index.html
easysociable engine detectFind engines under search roots
easysociable engine validate --root …Core marker completeness
easysociable engine validate --run …Run / pack checks before render

Optional engine.json field vault_root (default ".") points data at a separate vault; see the public LAYOUT.md.

The Workbench exposes Products and Recommendations as separate read-only indexes. Topics can cite either one without forcing a product connection.

Default --root / --engine parent is /workspace when that directory exists, otherwise the current working directory.

MCP Server Configuration

EasySociable exposes native Model Context Protocol (MCP) tools for Claude Desktop, Claude Code, Cursor, and any MCP-compatible agent host.

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "easysociable": {
      "command": "npx",
      "args": ["-y", "@easysociable/cli", "mcp", "serve", "--transport", "stdio"]
    }
  }
}

Claude Code

easysociable install --yes registers the server at user scope by running claude mcp add -s user easysociable -- easysociable mcp serve --transport stdio (removing any previous easysociable entry first, so re-running is safe). If the claude binary is not on PATH, it merges the same entry into the top-level mcpServers of ~/.claude.json and leaves every other key alone. Claude Code does not read ~/.claude/mcp.json; older installers wrote there, and that file can be deleted. To register by hand:

claude mcp add -s user easysociable -- easysociable mcp serve --transport stdio

The server starts without a stored key; until you run easysociable auth login, every tool returns an AUTH_REQUIRED result telling you to log in. Credentials are re-read on each tool call, so no host restart is needed after login (install warns when you are not logged in).

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "easysociable": {
      "command": "easysociable",
      "args": ["mcp", "serve", "--transport", "stdio"]
    }
  }
}

Authentication

easysociable auth login            # opens the browser; approve and the key is stored automatically
easysociable auth login --api-key <key>   # headless / CI
easysociable auth status
easysociable templates list --json
easysociable mcp serve --transport stdio

The gateway resolves in this order: EASYSOCIABLE_GATEWAY_URL (or legacy EASYSOCIABLE_API_URL) env → the baseUrl stored by auth login → the build default. The npm package is a production build (https://gateway.easysociable.com, site https://easysociable.com) and never uses a local gateway unless you export EASYSOCIABLE_GATEWAY_URL for that shell: it ignores a stored 127.0.0.1 / localhost baseUrl (e.g. http://127.0.0.1:8787 written by CLI ≤ 0.1.36, which recovers without re-login) and refuses auth login --gateway-url http://127.0.0.1:….

Building: production vs development

Environment defaults are baked at build time from build-envs.mjs; a bundle carries exactly one profile.

pnpm --filter @easysociable/cli build       # production (what prepack/npm publish ships)
pnpm --filter @easysociable/cli build:dev   # development: gateway 127.0.0.1:8787, site 127.0.0.1:5175
pnpm --filter @easysociable/cli dev         # development, watch mode
pnpm --filter @easysociable/cli check:dist  # fails unless dist is a production build (runs in prepack)

Other commands

CommandPurpose
easysociable install [--yes] [--skills list]Install Skills + MCP
easysociable update [--yes] [--skills list]Update Skills + MCP
easysociable templates …Page Template drafts / catalog (list --platform <p> --all for a full platform catalog)
easysociable brands …Workspace Brands
easysociable slideshows …Slideshow Runs
easysociable slideshows recommend --file contracts.json --seed <slug>Per-page template shortlist from Page Contracts (recent families demoted, gaps reported)
easysociable renders …Single-page final render jobs
easysociable mcp serve --transport stdioUnified MCP server

--skills accepts: content, template, slideshow (default: slideshow).

License

MIT. See LICENSE in this package.

版本与发布记录

@easysociable/cli 共发布 48 个版本,首次发布于 2026/08/20;过去 12 个月发布了 48 个版本。

版本发布日期距今
0.1.47latest2026/11/13今天
0.1.462026/11/13今天
0.1.452026/11/13今天
0.1.442026/11/085 天前
0.1.432026/10/2915 天前
0.1.422026/10/2816 天前

关于 @easysociable/cli 的常见问题

@easysociable/cli 是什么?

Agent-first CLI for EasySociable: Content Engine, Template, Slideshow, and MCP

如何安装 @easysociable/cli?

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

@easysociable/cli 支持 TypeScript 吗?

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

@easysociable/cli 支持 ESM 还是 CommonJS?

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

@easysociable/cli 需要什么版本的 Node.js?

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

@easysociable/cli 可以商用吗?

@easysociable/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@easysociable/cli 的下载量有多少?

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

@easysociable/cli 还在维护吗?

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