Twitter Automation技能使用说明
2026-04-01
新闻来源:网淘吧
围观:15
电脑广告
手机广告
Twitter/X自动化
通过以下方式自动化Twitter/Xinference.sh命令行界面。

快速开始
# Install CLI
curl -fsSL https://cli.inference.sh | sh && infsh login
# Post a tweet
infsh app run x/post-tweet --input '{"text": "Hello from inference.sh!"}'
安装说明:该安装脚本仅检测您的操作系统/架构,从
dist.inference.sh下载匹配的二进制文件,并验证其SHA-256校验和。无需提升权限或后台进程。手动安装与验证可用。
可用应用
| 应用 | 应用ID | 描述 |
|---|---|---|
| 发布推文 | x/post-tweet | 发布文本推文 |
| 创建帖子 | x/post-create | 发布带媒体的帖子 |
| 点赞帖子 | x/帖子点赞 | 点赞一条推文 |
| 转推 | x/帖子转推 | 转推一条帖子 |
| 删除帖子 | x/帖子删除 | 删除一条推文 |
| 获取帖子 | x/帖子获取 | 通过ID获取推文 |
| 发送私信 | x/私信发送 | 发送直接消息 |
| 关注用户 | x/用户关注 | 关注一位用户 |
| 获取用户 | x/用户获取 | 获取用户个人资料 |
示例
发布一条推文
infsh app run x/post-tweet --input '{"text": "Just shipped a new feature! 🚀"}'
发布带媒体的帖子
infsh app sample x/post-create --save input.json
# Edit input.json:
# {
# "text": "Check out this AI-generated image!",
# "media_url": "https://your-image-url.jpg"
# }
infsh app run x/post-create --input input.json
点赞一条推文
infsh app run x/post-like --input '{"tweet_id": "1234567890"}'
转推
infsh app run x/post-retweet --input '{"tweet_id": "1234567890"}'
发送一条私信
infsh app run x/dm-send --input '{
"recipient_id": "user_id_here",
"text": "Hey! Thanks for the follow."
}'
关注用户
infsh app run x/user-follow --input '{"username": "elonmusk"}'
获取用户资料
infsh app run x/user-get --input '{"username": "OpenAI"}'
获取推文详情
infsh app run x/post-get --input '{"tweet_id": "1234567890"}'
删除推文
infsh app run x/post-delete --input '{"tweet_id": "1234567890"}'
工作流程:生成AI图像并发布
# 1. Generate image
infsh app run falai/flux-dev-lora --input '{"prompt": "sunset over mountains"}' > image.json
# 2. Post to Twitter with the image URL
infsh app run x/post-create --input '{
"text": "AI-generated art of a sunset 🌅",
"media_url": "<image-url-from-step-1>"
}'
工作流程:生成并发布视频
# 1. Generate video
infsh app run google/veo-3-1-fast --input '{"prompt": "waves on a beach"}' > video.json
# 2. Post to Twitter
infsh app run x/post-create --input '{
"text": "AI-generated video 🎬",
"media_url": "<video-url-from-step-1>"
}'
相关技能
# Full platform skill (all 150+ apps)
npx skills add inference-sh/skills@inference-sh
# Image generation (create images to post)
npx skills add inference-sh/skills@ai-image-generation
# Video generation (create videos to post)
npx skills add inference-sh/skills@ai-video-generation
# AI avatars (create presenter videos)
npx skills add inference-sh/skills@ai-avatar-video
浏览所有应用:infsh应用列表
文档
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~