{"_id":"@aio-host/cli","name":"@aio-host/cli","dist-tags":{"beta":"0.1.0-beta.1","latest":"0.1.0-beta.1"},"versions":{"0.1.0-beta.1":{"name":"@aio-host/cli","version":"0.1.0-beta.1","description":"AIO Host 官方命令行客户端，用于登录平台并执行微信文章 AI 排版。","author":{"name":"AIO Host"},"license":"UNLICENSED","homepage":"https://weixinhost.com/docs/cli","type":"module","bin":{"aio":"dist/index.js"},"scripts":{"clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","build":"pnpm clean && tsc -p tsconfig.json","test":"tsx --test src/*.test.ts","prepack":"pnpm build"},"devDependencies":{"@types/node":"^20","tsx":"^4.0.0","typescript":"^5"},"engines":{"node":">=20"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","tag":"beta"},"_id":"@aio-host/cli@0.1.0-beta.1","_integrity":"sha512-QvRfyx022J3APrvslISrkv+NEQuBWn+9QODf016WUQiQtFNWn/T65pRnvOvNLKVGB1b16H1SYU5paLeNV8mLlg==","_resolved":"D:\\hostcode\\aio.weixinhost.com\\aio-host\\tmp\\npm-publish-20260717-162615\\aio-host-cli-0.1.0-beta.1.tgz","_from":"file:tmp\\npm-publish-20260717-162615\\aio-host-cli-0.1.0-beta.1.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-QvRfyx022J3APrvslISrkv+NEQuBWn+9QODf016WUQiQtFNWn/T65pRnvOvNLKVGB1b16H1SYU5paLeNV8mLlg==","shasum":"719ff7eaca8afef34109e0d99131034809b0adde","tarball":"https://registry.npmjs.org/@aio-host/cli/-/cli-0.1.0-beta.1.tgz","fileCount":17,"unpackedSize":59030,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDtzrxR6Nqlb3twvm2EecT7fYqXoKgQwcsO+5dR0IHsTAiBbWsTCBhHUiMtrjZz12ilf5ArfCRc97X+7D6NhIDxnRQ=="}]},"_npmUser":{"name":"maizhensheng-aio","email":"maizhensheng@weixinhost.com"},"directories":{},"maintainers":[{"name":"maizhensheng-aio","email":"maizhensheng@weixinhost.com"},{"name":"flymm004","email":"fanliyang@weixinhost.com"},{"name":"xuyan1121","email":"xuyan@weixinhost.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0-beta.1_1784276867500_0.7714991869310366"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T08:27:47.360Z","0.1.0-beta.1":"2026-07-17T08:27:47.643Z","modified":"2026-07-17T08:27:47.861Z"},"maintainers":[{"name":"maizhensheng-aio","email":"maizhensheng@weixinhost.com"},{"name":"flymm004","email":"fanliyang@weixinhost.com"},{"name":"xuyan1121","email":"xuyan@weixinhost.com"}],"description":"AIO Host 官方命令行客户端，用于登录平台并执行微信文章 AI 排版。","homepage":"https://weixinhost.com/docs/cli","author":{"name":"AIO Host"},"license":"UNLICENSED","readme":"# @aio-host/cli\n\nAIO Host 官方命令行客户端。使用 AIO Host 账号登录后，可以在终端调用微信文章 AI 排版，并将结果保存为可直接打开和复制的 HTML 文件。\n\n## 环境要求\n\n- Node.js 20 或更高版本\n- 可访问 `https://weixinhost.com`\n- 有效的 AIO Host 账号和可用算力\n\n## 安装\n\n当前版本通过 `beta` 标签发布：\n\n```powershell\nnpm install --global @aio-host/cli@beta\n```\n\n确认安装成功：\n\n```powershell\naio --help\n```\n\n更新 beta 版本时重新执行安装命令。卸载命令：\n\n```powershell\nnpm uninstall --global @aio-host/cli\n```\n\n## 登录\n\n```powershell\naio auth login\naio auth status\naio auth logout\n```\n\n登录命令会打开浏览器，请使用已有的 AIO Host 账号确认授权。浏览器无法自动打开时使用：\n\n```powershell\naio auth login --no-browser\n```\n\nWindows 会使用当前系统用户的 DPAPI 加密登录凭据。凭据不能复制给其他 Windows 用户使用；多人共用设备使用完毕后请执行 `aio auth logout`。\n\nCI 或无人值守环境可以临时设置 `AIO_API_TOKEN`。不要把令牌写入源码、脚本仓库或日志：\n\n```powershell\n$env:AIO_API_TOKEN=\"aio_pat_xxx\"\n```\n\n## 微信文章 AI 排版\n\n最简单的用法：\n\n```powershell\naio wx layout ./article.txt --output ./article.html\n```\n\n指定完整样式：\n\n```powershell\naio wx layout ./article.txt --theme grace --font-family serif --font-size 16 --primary-color \"#6C5278\" --output ./article.html\n```\n\n从标准输入读取：\n\n```powershell\nGet-Content .\\article.txt -Raw | aio wx layout - -o .\\article.html\n```\n\n主要参数：\n\n- `--output`、`-o`：HTML 输出路径；不传时在输入文件旁生成同名 `.html`。\n- `--theme`、`-t`：排版主题。\n- `--font-family`：`sans`、`serif` 或 `mono`。\n- `--font-size`：`12`、`13`、`14`、`15`、`16` 或 `18`，可带 `px`。\n- `--primary-color`：`#RRGGBB` 格式的主题色，PowerShell 中请加引号。\n- `--force`：覆盖已存在的输出文件。\n- `--timeout`：等待任务完成的最长秒数。\n- `--json`：标准输出只返回最终 JSON，适合脚本处理。\n- `--idempotency-key`：连接中断后使用原幂等键安全重试。\n\n运行以下命令查看当前版本支持的完整参数和主题：\n\n```powershell\naio wx layout --help\n```\n\n## 许可\n\n本包是 AIO Host 商业平台的配套客户端，不以开源软件形式授权。\n","readmeFilename":"README.md","_rev":"1-0b4b93370e01856c6a23f783ec8cbf94"}