hinge-liker
使用 Android 模拟器 + Gemini 视觉 AI 自动铰链约会个人资料喜欢者。滚动浏览完整的个人资料,使用人工智能分析吸引力,喜欢最好的照片/带有诙谐评论的提示,跳过其他内容。每次会话后发送详细的文本报告。当要求运行 Hinge 点赞、设置 Hinge 自动化、检查 Hinge 状态或管理日常约会应用程序刷卡时使用。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~mattttman-hinge-likercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~mattttman-hinge-liker/file -o mattttman-hinge-liker.md# Hinge Auto-Liker Automates Hinge swiping on an Android emulator. Uses Gemini vision to evaluate profiles, pick the best photo/prompt, and send witty comments. ## Requirements - Android emulator (AVD) with Hinge installed and logged in - `adb` in PATH - `GEMINI_API_KEY` environment variable (Gemini 2.5 Flash recommended) - Python 3.8+ - Java (for Android emulator) ## Setup (First Time) 1. Install Android command line tools (via Homebrew: `brew install --cask android-commandlinetools`) 2. Create an AVD: `avdmanager create avd -n HingePhone -k "system-images;android-34;google_apis;arm64-v8a" -d pixel_6` 3. Boot the emulator with a window, install Hinge from Play Store, and log in manually 4. Set `GEMINI_API_KEY` in environment ## Running ```bash # Set environment export PATH="<android-tools-path>/platform-tools:<android-tools-path>/emulator:$PATH" export GEMINI_API_KEY="your-key-here" # Boot emulator (windowed for video, add -no-window for headless) emulator -avd HingePhone -no-audio -no-metrics -gpu swiftshader_indirect & # Wait for boot adb wait-for-device while [ "$(adb shell getprop sys.boot_completed 2>/dev/null | tr -d '\r')" != "1" ]; do sleep 2; done # Launch Hinge adb shell am start -a android.intent.action.MAIN -n co.hinge.app/.ui.AppActivity sleep 10 # Optional: start screen recording adb shell screenrecord --time-limit 300 /sdcard/hinge_session.mp4 & # Run the liker python3 scripts/hinge_android.py --likes 8 --user-desc "a 25yo tech guy in SF who's fit and active" # Pull recording + kill emulator adb shell pkill -INT screenrecord; sleep 3 adb pull /sdcard/hinge_session.mp4 ./recordings/session.mp4 adb emu kill ``` ## Script Options | Flag | Default | Description | |------|---------|-------------| | `--likes` | 8 | Max likes per session | | `--adb` | `adb` | Path to adb binary | | `--user-desc` | generic | Description of the user for AI matching | ## Environment Variables | Variable | Required | Description | |----------|----------|-------------| | `GEMINI_API_KEY` | Yes | Google Gemini API key | | `GEMINI_MODEL` | No | Model name (default: `gemini-2.5-flash`) | | `ADB_PATH` | No | Full path to adb binary | | `HINGE_WORK_DIR` | No | Working directory for screenshots/logs | ## Output The script prints a **session report** to stdout with: - Total profiles seen, liked, skipped - For each profile: who they are, why it liked/skipped, the comment sent, which content was liked JSON logs are saved to `logs/` directory. ## Scheduling as a Daily Cron Set up via OpenClaw cron for daily automated runs. Key notes: - **Hardcode GEMINI_API_KEY in the cron payload** — cron shells don't source ~/.zshrc - Use `am start` to launch Hinge, not `monkey` (more reliable) - Compress videos before sending via iMessage (16MB limit): `ffmpeg -i input.mp4 -vcodec libx264 -crf 28 -preset fast -vf scale=720:-2 output.mp4` ## After Each Session Send the user a text report including: 1. How many profiles seen / liked / skipped 2. For each liked profile: who she is, why the AI liked her, what comment was sent 3. For each skipped profile: brief reason why 4. Any errors (paywall, API failures, etc.) 5. Video recording if available (compressed for messaging) ## Troubleshooting - **Paywall/out of likes**: Free likes reset ~24h after last batch. Schedule runs accordingly. - **Gemini empty responses**: Increase `maxOutputTokens`, check API key/quota. - **Can't find buttons**: Hinge UI changes periodically — check `find_all_hearts()` and `find_skip_button()` patterns. - **Emulator crashes**: Check disk space (`df -h`), try `-gpu swiftshader_indirect`. --- ## 中文说明 # Hinge Auto-Liker 在 Android 模拟器上自动化 Hinge 刷卡。使用 Gemini 视觉来评估个人资料、挑选最佳照片/提示,并发送诙谐的评论。 ## 要求 - 已安装并登录 Hinge 的 Android 模拟器 (AVD) - PATH 中的 `adb` - `GEMINI_API_KEY` 环境变量(推荐 Gemini 2.5 Flash) - Python 3.8+ - Java(用于 Android 模拟器) ## 设置(首次) 1. 安装 Android 命令行工具(通过 Homebrew:`brew install --cask android-commandlinetools`) 2. 创建一个 AVD:`avdmanager create avd -n HingePhone -k "system-images;android-34;google_apis;arm64-v8a" -d pixel_6` 3. 以带窗口方式启动模拟器,从 Play Store 安装 Hinge,并手动登录 4. 在环境中设置 `GEMINI_API_KEY` ## 运行 ```bash # Set environment export PATH="<android-tools-path>/platform-tools:<android-tools-path>/emulator:$PATH" export GEMINI_API_KEY="your-key-here" # Boot emulator (windowed for video, add -no-window for headless) emulator -avd HingePhone -no-audio -no-metrics -gpu swiftshader_indirect & # Wait for boot adb wait-for-device while [ "$(adb shell getprop sys.boot_completed 2>/dev/null | tr -d '\r')" != "1" ]; do sleep 2; done # Launch Hinge adb shell am start -a android.intent.action.MAIN -n co.hinge.app/.ui.AppActivity sleep 10 # Optional: start screen recording adb shell screenrecord --time-limit 300 /sdcard/hinge_session.mp4 & # Run the liker python3 scripts/hinge_android.py --likes 8 --user-desc "a 25yo tech guy in SF who's fit and active" # Pull recording + kill emulator adb shell pkill -INT screenrecord; sleep 3 adb pull /sdcard/hinge_session.mp4 ./recordings/session.mp4 adb emu kill ``` ## 脚本选项 | 标志 | 默认值 | 说明 | |------|---------|-------------| | `--likes` | 8 | 每次会话的最大点赞数 | | `--adb` | `adb` | adb 二进制文件的路径 | | `--user-desc` | generic | 用于 AI 匹配的用户描述 | ## 环境变量 | 变量 | 必需 | 说明 | |----------|----------|-------------| | `GEMINI_API_KEY` | 是 | Google Gemini API 密钥 | | `GEMINI_MODEL` | 否 | 模型名称(默认:`gemini-2.5-flash`) | | `ADB_PATH` | 否 | adb 二进制文件的完整路径 | | `HINGE_WORK_DIR` | 否 | 截图/日志的工作目录 | ## 输出 脚本会向 stdout 打印一份 **会话报告**,内容包括: - 看到、点赞、跳过的个人资料总数 - 对于每个个人资料:对方是谁、为何点赞/跳过、发送的评论、点赞了哪个内容 JSON 日志保存到 `logs/` 目录。 ## 作为每日 Cron 进行调度 通过 OpenClaw cron 设置每日自动运行。要点: - **在 cron 载荷中硬编码 GEMINI_API_KEY** — cron shell 不会加载 ~/.zshrc - 使用 `am start` 启动 Hinge,而不是 `monkey`(更可靠) - 通过 iMessage 发送前先压缩视频(16MB 限制):`ffmpeg -i input.mp4 -vcodec libx264 -crf 28 -preset fast -vf scale=720:-2 output.mp4` ## 每次会话后 向用户发送一份文本报告,包括: 1. 看到 / 点赞 / 跳过了多少个人资料 2. 对于每个被点赞的个人资料:她是谁、AI 为何点赞她、发送了什么评论 3. 对于每个被跳过的个人资料:简要说明原因 4. 任何错误(付费墙、API 失败等) 5. 视频录制(如有,已为消息发送进行压缩) ## 故障排查 - **付费墙/点赞用尽**:免费点赞在上一批之后约 24 小时重置。请据此安排运行计划。 - **Gemini 空响应**:增大 `maxOutputTokens`,检查 API 密钥/配额。 - **找不到按钮**:Hinge UI 会定期变化 — 检查 `find_all_hearts()` 和 `find_skip_button()` 模式。 - **模拟器崩溃**:检查磁盘空间(`df -h`),尝试 `-gpu swiftshader_indirect`。