shawnxixi-cli
v1.2.2
Published
肖嘻 CLI 工具 - OpenClaw 执行肢
Downloads
67
Readme
shawnxixi-cli
肖嘻 CLI 工具 - 日常业务与系统管理的命令行接口。
安装
# 从源码安装
git clone https://github.com/LyuShawn/shawnxixi-cli.git
cd shawnxixi-cli
npm install
npm run build
npm link
# 或全局安装
npm install -g shawnxixi-cli初始化配置
# 复制配置文件
cp .env.example .env
# 编辑配置(可选)
vim .env环境变量
| 变量 | 默认值 | 说明 |
|-----|-------|------|
| SHAWNXIXI_API_URL | http://localhost:8080/api/v1 | API 服务器地址 |
| SHAWNXIXI_API_TOKEN | - | API 认证 Token(可选) |
全局参数
| 参数 | 说明 |
|-----|------|
| --json | 输出 JSON 格式 |
| --quiet | 静默模式(只输出关键信息) |
| --dry-run | 预览模式(不实际调用 API) |
命令总览
shawnxixi <command>
日常业务命令:
biz todo 待办管理(对标滴答清单)
biz task 任务管理(对标系统任务)
biz record 记录管理
biz finance 财务管理(对标记账类 App)
biz item 物品管理
biz calendar 日程管理(对标日历 App)
biz health 健康数据管理(对标 Apple Health)
系统命令:
sys health 健康检查biz todo(待办管理)
对标滴答清单的待办管理功能。
子命令
| 命令 | 说明 |
|-----|------|
| add <title> | 创建待办 |
| list | 列出待办 |
| edit <id> | 编辑待办 |
| done <id> | 标记待办完成 |
| delete <id> | 删除待办 |
选项
| 选项 | 说明 |
|-----|------|
| --due <date> | 截止日期(YYYY-MM-DD) |
| --priority <level> | 优先级(low/medium/high) |
| --status <status> | 状态过滤(pending/done) |
| --tags <tags> | 标签(逗号分隔) |
示例
# 创建待办
shawnxixi biz todo add "完成项目报告" --due 2026-04-15 --priority high --tags work,important
# 列出所有待办
shawnxixi biz todo list
# 按状态筛选
shawnxixi biz todo list --status pending --priority high
# 编辑待办
shawnxixi biz todo edit 123 --title "新标题" --priority low
# 标记完成
shawnxixi biz todo done 123
# 删除待办
shawnxixi biz todo delete 123biz task(任务管理)
对标系统任务的功能,支持 OpenClaw 等来源。
子命令
| 命令 | 说明 |
|-----|------|
| list | 列出任务 |
| create <title> | 创建任务 |
| update <id> | 更新任务 |
| delete <id> | 删除任务 |
选项
| 选项 | 说明 |
|-----|------|
| --status <status> | 状态过滤(pending/running/done) |
| --source <source> | 来源过滤(openclaw/cli) |
| --openclaw-id <id> | OpenClaw ID |
| --priority <level> | 优先级(low/medium/high) |
示例
# 列出运行中的任务
shawnxixi biz task list --status running --source openclaw
# 创建任务
shawnxixi biz task create "修复登录 bug" --source openclaw --openclaw-id 456
# 更新任务状态
shawnxixi biz task update 123 --status done
# 删除任务
shawnxixi biz task delete 123biz finance(财务管理)
对标记账类 App 的财务管理功能。
子命令
| 命令 | 说明 |
|-----|------|
| add <amount> | 新增账单 |
| list | 列出账单 |
| stats | 账单统计 |
选项
| 选项 | 说明 |
|-----|------|
| --type <type> | 类型(income/expense) |
| --category <cat> | 分类 |
| --note <text> | 备注 |
| --month <month> | 月份过滤(YYYY-MM) |
示例
# 记一笔支出
shawnxixi biz finance add 100 --type expense --category 餐饮 --note 午饭
# 记一笔收入
shawnxixi biz finance add 5000 --type income --category 工资 --note 月薪
# 按月份查看支出
shawnxixi biz finance list --type expense --month 2026-04
# 查看月度统计
shawnxixi biz finance stats --month 2026-04biz health(健康数据)
对标 Apple Health 的健康数据管理。
子命令
| 命令 | 说明 |
|-----|------|
| log | 记录健康数据 |
| list | 查询健康数据 |
| sync | 同步健康数据 |
选项
| 选项 | 说明 |
|-----|------|
| --type <type> | 数据类型(heart_rate/steps/weight/...) |
| --value <value> | 数值 |
| --unit <unit> | 单位(bpm/kg/steps/...) |
| --date <date> | 日期(YYYY-MM-DD) |
| --from <date> | 开始日期 |
| --to <date> | 结束日期 |
示例
# 记录心率
shawnxixi biz health log --type heart_rate --value 72 --unit bpm --date 2026-04-12
# 记录步数
shawnxixi biz health log --type steps --value 8000 --unit steps --date 2026-04-12
# 查询心率历史
shawnxixi biz health list --type heart_rate --from 2026-04-01 --to 2026-04-12
# 查询体重
shawnxixi biz health list --type weight --from 2026-04-01 --to 2026-04-12biz calendar(日程管理)
对标日历 App 的日程管理功能。
子命令
| 命令 | 说明 |
|-----|------|
| add <title> | 创建日程 |
| list | 列出日程 |
选项
| 选项 | 说明 |
|-----|------|
| --from <datetime> | 开始时间(必需) |
| --to <datetime> | 结束时间(必需) |
| --location <loc> | 地点 |
| --color <color> | 颜色(HEX 如 #ff0000) |
| --desc <text> | 描述 |
示例
# 创建日程
shawnxixi biz calendar add "团队周会" --from "2026-04-15 10:00" --to "2026-04-15 11:00" --location 会议室A --color #4285f4
# 查看本月日程
shawnxixi biz calendar list --from 2026-04-01 --to 2026-04-30biz record(记录管理)
通用记录管理(日记/宠物/笔记/灵感)。
子命令
| 命令 | 说明 |
|-----|------|
| create <title> | 创建记录 |
| list | 列出记录 |
选项
| 选项 | 说明 |
|-----|------|
| --content <text> | 内容 |
| --type <type> | 类型(diary/pet/note/idea) |
| --tags <tags> | 标签(逗号分隔) |
示例
# 写日记
shawnxixi biz record create "今日感想" --content "完成了一个重要功能" --type diary --tags work,daily
# 创建灵感
shawnxixi biz record create "新功能创意" --content "做一个 AI 助手" --type idea --tags ai,innovation
# 列出所有笔记
shawnxixi biz record list --type notebiz item(物品管理)
物品收纳管理功能。
子命令
| 命令 | 说明 |
|-----|------|
| create <name> | 添加物品 |
| list | 列出物品 |
选项
| 选项 | 说明 |
|-----|------|
| --location <loc> | 存放位置 |
| --expire <date> | 过期日期(YYYY-MM-DD) |
| --category <cat> | 分类 |
示例
# 添加物品
shawnxixi biz item create "牛奶" --location 冰箱 --expire 2026-04-20 --category 食品
# 列出物品
shawnxixi biz item list --category 食品sys(系统命令)
sys health
健康检查。
shawnxixi sys health
# 输出: { status: 'ok', timestamp: '2026-04-12T00:00:00.000Z' }使用示例
完整工作流
# 1. 创建待办
shawnxixi biz todo add "准备周五会议" --due 2026-04-18 --priority high --tags work
# 2. 记录一笔支出
shawnxixi biz finance add 50 --type expense --category 交通 --note打车费
# 3. 记录今日心率
shawnxixi biz health log --type heart_rate --value 75 --unit bpm
# 4. 创建会议日程
shawnxixi biz calendar add "产品评审会" --from "2026-04-15 14:00" --to "2026-04-15 16:00" --location 线上
# 5. 查看所有待办
shawnxixi biz todo list --status pending全局参数使用
# JSON 输出
shawnxixi biz todo list --json
# 静默模式
shawnxixi biz todo add "测试" --quiet
# 预览模式(不实际调用 API)
shawnxixi biz todo add "测试待办" --due 2026-04-20 --dry-run故障排查
API 连接失败
- 检查
.env中的SHAWNXIXI_API_URL是否正确 - 确认服务器已启动
- 检查网络连接
命令不存在
# 重新链接
npm link
# 或使用 npx
npx shawnxixi biz todo list开发
# 安装依赖
npm install
# 开发模式(监听文件变化)
npm run build
# 运行测试
npm test
# 链接到全局
npm linkLicense
ISC
