Read https://getctx.org/@biao29/umeng.ctx and follow the instructions to use @biao29/umengSend this to your Agent to use umeng
Works withClaude CodeCursorWindsurfClineand other AI coding agents
ctx install @biao29/umengInstalls umeng CLI and links skill to your agents
New to ctx? Install the CLI first
curl -fsSL https://getctx.org/install.sh | shirm https://getctx.org/install.ps1 | iexumeng-cli
友盟 (Umeng) 移动分析 Open API 命令行工具。
安装
一键安装:
curl -fsSL https://raw.githubusercontent.com/biao29/umeng-cli/main/scripts/install.sh | bash
或通过 Go:
go install github.com/biao29/umeng-cli/cmd/umeng@latest
或从 Releases 下载预编译二进制。
配置
umeng config set api_key <your-api-key>
umeng config set api_security <your-api-security>
或通过环境变量:
export UMENG_API_KEY=<your-api-key>
export UMENG_API_SECURITY=<your-api-security>
使用
# 查看所有应用
umeng apps
# 查看应用日统计
umeng daily <appkey>
# 查看留存率
umeng retention <appkey>
# 综合报告
umeng report <appkey>
# 按名称查找
umeng daily --app "句读_Android"
# JSON 输出
umeng apps --json
命令列表
| 命令 | 说明 |
|---|---|
umeng apps | 列出所有应用 |
umeng overview | 所有应用昨日/今日汇总 |
umeng daily | 日统计 (DAU, 新增, 启动) |
umeng active | 活跃用户趋势 |
umeng new-users | 新增用户趋势 |
umeng launches | 启动次数趋势 |
umeng retention | 留存率 (次日~7日) |
umeng duration | 使用时长分布 |
umeng channels | 渠道分布 |
umeng versions | 版本分布 |
umeng report | 综合报告 |
umeng config | 配置管理 |
umeng skill | AI Agent Skill 管理 |
umeng doctor | 健康检查 |
日期格式
支持 YYYY-MM-DD、today、yesterday、-7d、-30d。
输出格式
- 默认:终端彩色表格
--json:JSON envelope--quiet/--agent:纯数据 JSON--md:Markdown 表格--count:仅数量
AI Agent 集成
# 安装 Skill 到 Claude Code
umeng skill install
# 检查集成状态
umeng doctor
设置 --agent 或环境变量 CLAUDE_CODE=1 自动启用结构化 JSON 输出。
开发
make build # 编译
make test # 测试
make vet # 静态分析
License
MIT