Skip to content

Linus-Shyu/ClawX

Repository files navigation

ClawX

OpenClaw 在本机定时发 X 的示例:agent 写文案,通过受控浏览器真正点「发帖」。

本目录里是脱敏示例,方便你自己改时间、改 prompt、对照补全本机 ~/.openclaw/ 配置。

行为说明

  • 通过 setup-cron.sh 会往 OpenClaw 里加 5 条每日 cron(时区 America/New_York)。
  • 每条任务:英文、约 260 字内1~3 个标签;遇到登录/验证码/要人工确认则停手。
  • Prompt 里默认浏览器 profile 名为 openclaw,若你实际不叫这个名字,改 setup-cron.shjobs.example.json 里的文案。

文件一览

文件 用途
setup-cron.sh 执行 openclaw cron add会写入真实定时任务;跑前请通读。
jobs.example.json 5 条任务的 JSON 结构参考(时间、文案、session-key)。
openclaw.example.json 全局配置样例,对照合并进 ~/.openclaw/openclaw.json
auth-profiles.example.json agent 认证样例,对照 ~/.openclaw/agents/main/agent/auth-profiles.json

环境要求

  1. 已安装 OpenClaw,且 openclaw status 正常。
  2. Gateway 可用,cron 能调度。
  3. X 已在对应浏览器 profile 登录。
  4. 模型与 API 按你本机配置可用。
  5. 到点执行时机器在线(长期休眠/关机则不会发帖)。

使用步骤

1. 自检

openclaw status
openclaw cron status
openclaw browser status

2. 本机配置
把两个 *.example.json 里的占位符换成你的值,写入 ~/.openclaw/ 对应文件(不要直接覆盖前建议先备份)。

3. 创建定时任务

chmod +x setup-cron.sh
./setup-cron.sh
openclaw cron list

4. 立刻验证一条(不必等到第二天)

openclaw cron run --id <job-id>
openclaw tasks list

排错提要

  • 发不出去:未登录 X、profile 名不一致、模型限流、Gateway 未起、超时、机器休眠。
  • 没有推送通知:示例未接 Telegram 等 channel,需在本机配置里自行加。

注意

示例 JSON 不含真实 token;真密钥只放 ~/.openclaw/,勿提交进 Git。

授权以仓库根目录 LICENSE 为准。

About

This is an automatic Clawdbot script for publishing X posts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages