calligraphy-composition
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCalligraphy Composition
书法合成
Retrieve running-script calligraphy for text or individual Chinese characters, inspect radicals and components, and synthesize missing glyphs when needed. For seal-script image recognition, use the separate skill.
seal-script-ocr检索文本或单个汉字的行书书法,分析偏旁部首与构件,并在需要时合成缺失字形。篆书图像识别请使用单独的 skill。
seal-script-ocrCommands
命令
bash
cyeam mo guwen "兰亭序" # Retrieve glyphs for text
cyeam mo guwen "兰亭序" --ai-compose # Synthesize missing glyphs only
cyeam mo char detail "之" # Original glyph candidates and sources
cyeam mo char composition "曦" # Radicals and components
cyeam mo char compose "曦" --out char.png # Force component-based synthesisbash
cyeam mo guwen "兰亭序" # Retrieve glyphs for text
cyeam mo guwen "兰亭序" --ai-compose # Synthesize missing glyphs only
cyeam mo char detail "之" # Original glyph candidates and sources
cyeam mo char composition "曦" # Radicals and components
cyeam mo char compose "曦" --out char.png # Force component-based synthesisGlyph selection rules
字形选择规则
When asked to write, return, or display a character, look up an original glyph first; do not default to .
char compose- For one character, run and use an original glyph when candidates exist.
cyeam mo char detail <char> - For a passage, run . By default, it returns only original glyphs from the library; missing glyphs are empty.
cyeam mo guwen <text> - Use synthesis only when original candidates are absent, the passage contains missing glyphs, or the user explicitly requests component-based synthesis. Use for text and
guwen --ai-composefor a single character.char compose
char composechar detail "无"char compose "无"当用户要求书写、返回或显示某个汉字时,必须先查找原始字形;不要默认使用 。
char compose- 对于单个汉字,运行 ;如果存在候选字形,则使用原始字形。
cyeam mo char detail <char> - 对于一段文本,运行 。默认情况下,它只返回字库中的原始字形;缺失字形为空。
cyeam mo guwen <text> - 仅当不存在原始候选字形、文本中包含缺失字形,或用户明确要求基于构件合成时,才使用合成功能。文本使用 ,单个汉字使用
guwen --ai-compose。char compose
char composechar detail "无"char compose "无"Image delivery
图片呈现
When the user wants to see a glyph or calligraphy image, embed the selected candidate's URL as a Markdown image and include its . Do not return only a URL.
imagesourcemd
「无」 — 王羲之《临锺繇千字文》
The URLs from point to original copybook images and can be embedded directly. Do not switch to just to obtain a displayable image. Use an image link as a fallback only when the client cannot render Markdown images.
char detailchar compose当用户希望查看某个字形或书法图像时,将所选候选字形的 URL 作为 Markdown 图片嵌入,并附上其 。不要只返回 URL。
imagesourcemd
「无」 — 王羲之《临锺繇千字文》
char detailchar composeOutput and scope
输出与适用范围
- ,
guwen, andchar detailwrite JSON to stdout.char composition - candidates include original glyph images and their sources.
char detail - writes a PNG to the required
char composepath. It always synthesizes components and does not represent an original copybook glyph.--out - This workflow covers running script (行书), not regular script (楷书) or clerical script (隶书).
- fills only missing glyphs; preserve existing original glyphs.
--ai-compose - No login is required.
- 、
guwen和char detail将 JSON 写入 stdout。char composition - 的候选结果包含原始字形图像及其来源。
char detail - 将 PNG 写入指定的
char compose路径。它始终合成构件,并不代表原始字帖字形。--out - 此工作流仅适用于行书,不适用于楷书或隶书。
- 仅填充缺失字形;保留已有的原始字形。
--ai-compose - 无需登录。
Installation
安装
Review the commands before installing. These examples pin v1.1.4, rather than latest, and download an executable archive.
Install only when the CLI is needed; do not reinstall for every command.
安装前请先检查这些命令。这些示例固定使用 v1.1.4,而非最新版本,并下载可执行文件归档。仅在需要 CLI 时安装;不要每次执行命令都重新安装。
macOS / Linux: verify and install in the user directory
macOS / Linux:在用户目录中验证并安装
Run in Bash or Zsh with , , , and either or .
The script selects macOS / Linux on arm64 or x86_64 and stops on other platforms.
curltarinstallshasumsha256sumbash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo 'Unsupported platform; see the pinned release.' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e prevents extraction or installation if download or verification fails.
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)This writes only to a temporary directory and (replacing an existing binary).
No administrator privileges are needed; system directories, services, and shell configuration are unchanged. For the current shell:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"For persistent access, add that line to your shell configuration.
Check the v1.1.4 release page and
checksums.txt
for checksums. When changing the pinned version, verify and replace both the version and its SHA-256 values.
Checksums confirm release-file consistency; they are not an independent signature or security audit.
在 Bash 或 Zsh 中运行,需要使用 、、,以及 或 中的任意一种。
curltarinstallshasumsha256sum该脚本会根据 arm64 或 x86_64 架构选择适用于 macOS / Linux 的版本,并在其他平台上停止运行。
bash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo 'Unsupported platform; see the pinned release.' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e prevents extraction or installation if download or verification fails.
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)这只会写入临时目录和 (替换已有二进制文件)。
无需管理员权限;不会更改系统目录、服务或 shell 配置。对于当前 shell:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"如需长期使用,将该行添加到 shell 配置中。
查看 v1.1.4 发布页面 和
checksums.txt
以获取校验和。更换固定版本时,必须同时验证并替换版本号及其 SHA-256 值。
校验和只能确认发布文件的一致性,不能替代独立签名或安全审计。
External requests and local state
外部请求与本地状态
- Installation: Downloads the selected archive from a pinned GitHub release, which may redirect to GitHub's asset CDN. Verifies the pinned SHA-256 before extracting only . Installation verification disables analytics and update checks.
cyeam - Calligraphy queries: and
mo guwensend the selected text, font, and synthesis options tomo char detail/composition/compose. Synthesized images are written tohttps://www.cyeam.com/mo/api/*, which may overwrite an existing file. Original images may come from Cloudinary or another image CDN; displaying them requests their URLs.--out - Analytics: By default, sends command names, CLI version, system information, and a random installation ID to . The server may infer location from the outgoing IP. Command arguments, image contents, and credentials are not included. The ID is stored in
https://us.i.posthog.com; disable with~/.cyeam/analytics-idor--no-analytics.CYEAM_CLI_NO_ANALYTICS=1 - Update notices: Checks GitHub for the latest release at most once every 24 hours and caches state in . Notices do not replace the executable. Set
~/.cyeam/update-state.jsonto disable. The explicitCYEAM_CLI_NO_UPDATE_NOTIFIER=1command downloads and verifies the latest release, replaces the executable, and then attempts to sync skills throughcyeam update. To remain on a pinned version, use the installation steps above instead.npx skills add
To keep only the network requests required for this skill in the current shell:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1- 安装: 从固定版本的 GitHub Release 下载所选归档,重定向后可能会指向 GitHub 的资源 CDN。解压前验证固定的 SHA-256,并且只提取 。用于安装验证的命令会禁用分析功能和更新检查。
cyeam - 书法查询: 和
mo guwen会将所选文本、字体及合成选项发送至mo char detail/composition/compose。合成图像会写入https://www.cyeam.com/mo/api/*,可能覆盖现有文件。原始图像可能来自 Cloudinary 或其他图像 CDN;显示它们会请求相应 URL。--out - 分析数据: 默认向 发送命令名称、CLI 版本、系统信息和随机安装 ID。服务器可能会根据出口 IP 推断位置。不会发送命令参数、图像内容和凭据。该 ID 存储在
https://us.i.posthog.com中;可使用~/.cyeam/analytics-id或--no-analytics禁用。CYEAM_CLI_NO_ANALYTICS=1 - 更新通知: 最多每 24 小时检查一次 GitHub 上的最新 Release,并将状态缓存到 。通知不会替换可执行文件。可通过
~/.cyeam/update-state.json禁用。显式的CYEAM_CLI_NO_UPDATE_NOTIFIER=1命令会下载并验证最新 Release,替换可执行文件,然后尝试通过cyeam update同步 skills。若要保持固定版本,请改用上述安装步骤。npx skills add
若要在当前 shell 中仅保留此 skill 所需的网络请求:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1