Skip to content

Commit 7f833c4

Browse files
committed
docs: add TweetClaw mobile workflow guide
1 parent 878dccb commit 7f833c4

3 files changed

Lines changed: 173 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
## What is OpenClaw?
3838

39-
OpenClaw brings the [OpenClaw](https://github.com/anthropics/openclaw) AI gateway to Android. It sets up a full Ubuntu environment via proot, installs Node.js and OpenClaw, and provides a native Flutter UI to manage everything — no root required.
39+
OpenClaw brings the [OpenClaw](https://github.com/openclaw/openclaw) AI gateway to Android. It sets up a full Ubuntu environment via proot, installs Node.js and OpenClaw, and provides a native Flutter UI to manage everything — no root required.
4040

4141
### Two Ways to Use
4242

@@ -188,6 +188,18 @@ openclawx doctor
188188
openclawx gateway --verbose
189189
```
190190

191+
### Optional X/Twitter Workflows With TweetClaw
192+
193+
OpenClaw-Termux can install regular OpenClaw plugins inside the Android Ubuntu runtime. For X/Twitter automation, install TweetClaw after setup:
194+
195+
```bash
196+
openclawx plugins install @xquik/tweetclaw
197+
openclawx plugins inspect tweetclaw --runtime
198+
openclawx skills info tweetclaw
199+
```
200+
201+
Use it for scrape tweets, search tweets, search tweet replies, follower export, user lookup, media workflows, direct messages, monitors, webhooks, giveaway draws, and reviewed post or reply workflows. See [TweetClaw Mobile X/Twitter Workflows](docs/tweetclaw-mobile-workflows.md) for Android credential handling, `tools.alsoAllow`, approval boundaries, and battery optimization notes.
202+
191203
---
192204

193205
## Architecture

docs/tweetclaw-mobile-workflows.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# TweetClaw Mobile X/Twitter Workflows
2+
3+
Use this guide after OpenClaw is running on Android through the Flutter app or the Termux CLI. It adds the optional [TweetClaw](https://github.com/Xquik-dev/tweetclaw) OpenClaw plugin for structured X/Twitter work from the same mobile OpenClaw gateway.
4+
5+
TweetClaw is useful when an agent needs to scrape tweets, search tweets, search tweet replies, look up users, export followers, download media, monitor tweets, deliver webhooks, run giveaway draws, or perform reviewed actions such as post tweets, post tweet replies, direct messages, and media upload.
6+
7+
## Prerequisites
8+
9+
- Finish `openclawx setup`.
10+
- Run `openclawx onboarding` and choose `Loopback (127.0.0.1)` for non-rooted devices.
11+
- Start the gateway with `openclawx start` or from the Flutter dashboard.
12+
- Disable battery optimization for OpenClaw or Termux before using monitors or webhook delivery.
13+
- Keep credentials in OpenClaw plugin config. Do not paste API keys, signing keys, passwords, cookies, account IDs, or payment material into chat, issues, logs, screenshots, or shared files.
14+
15+
## Install TweetClaw
16+
17+
From Termux, use the `openclawx` pass-through command:
18+
19+
```bash
20+
openclawx plugins install @xquik/tweetclaw
21+
```
22+
23+
Or open the Ubuntu shell and run the same OpenClaw command directly:
24+
25+
```bash
26+
openclawx shell
27+
openclaw plugins install @xquik/tweetclaw
28+
```
29+
30+
Verify the plugin runtime and bundled skill:
31+
32+
```bash
33+
openclawx plugins inspect tweetclaw --runtime
34+
openclawx skills info tweetclaw
35+
```
36+
37+
Expected result:
38+
39+
- The `tweetclaw` plugin loads.
40+
- The `explore` tool is available for local endpoint discovery.
41+
- The optional `tweetclaw` tool is available when the tool profile allows it.
42+
- The TweetClaw skill is visible to the agent.
43+
44+
## Configure Credentials
45+
46+
Open a shell inside the Ubuntu runtime before storing credentials or JSON config values. This preserves quoting and keeps the command behavior identical to OpenClaw on desktop:
47+
48+
```bash
49+
openclawx shell
50+
```
51+
52+
Set an API key through environment variables or your preferred password manager, then store it in OpenClaw plugin config:
53+
54+
```bash
55+
export XQUIK_API_KEY="replace-with-your-key"
56+
openclaw config set plugins.entries.tweetclaw.config.apiKey "$XQUIK_API_KEY"
57+
unset XQUIK_API_KEY
58+
```
59+
60+
For a shell-history-safe prompt, read the key without echoing it:
61+
62+
```bash
63+
read -rsp "Xquik API key: " XQUIK_API_KEY
64+
printf "\n"
65+
openclaw config set plugins.entries.tweetclaw.config.apiKey "$XQUIK_API_KEY"
66+
unset XQUIK_API_KEY
67+
```
68+
69+
If the agent can see the TweetClaw skill but cannot call its tools, add only the plugin tools to the existing OpenClaw tool profile:
70+
71+
```bash
72+
openclaw config set tools.alsoAllow '["explore", "tweetclaw"]'
73+
```
74+
75+
Use `tools.alsoAllow` so normal OpenClaw tools stay available.
76+
77+
## Mobile Workflow Recipes
78+
79+
### Search Tweets From A Phone
80+
81+
Ask the agent to use TweetClaw to search tweets for a specific query, limit, language, or time range. It should first call `explore` for the current endpoint shape, then call `tweetclaw` with the catalog-listed search path and query object.
82+
83+
Use this for:
84+
85+
- Researching X/Twitter conversations before writing a report.
86+
- Finding source tweet URLs for a content workflow.
87+
- Collecting post IDs, authors, timestamps, reply counts, like counts, and snippets for review.
88+
89+
### Search Tweet Replies
90+
91+
Ask the agent to search replies for a target tweet URL or tweet ID. Keep limits narrow on mobile and ask for a short summary with tweet URLs or IDs.
92+
93+
Use this for:
94+
95+
- Checking audience feedback before a reply.
96+
- Finding giveaway replies.
97+
- Reviewing support or community reactions.
98+
99+
### Export Followers And Look Up Users
100+
101+
Ask the agent to export followers or look up users only after confirming the target account and result limit. Save exports in the private Termux or app directory unless you intentionally move them to shared storage.
102+
103+
Use this for:
104+
105+
- Lead research.
106+
- Audience segmentation.
107+
- Verifying profile metadata before account outreach.
108+
109+
### Monitor Tweets And Deliver Webhooks
110+
111+
Before monitors or webhooks, disable Android battery optimization for OpenClaw or Termux. Confirm the target account, keyword, delivery URL, event types, and stop condition.
112+
113+
Use this for:
114+
115+
- Monitoring brand or project mentions.
116+
- Notifying an external endpoint when a new matching tweet appears.
117+
- Keeping a mobile OpenClaw gateway available for lightweight alerting.
118+
119+
### Reviewed Writes
120+
121+
TweetClaw can support post tweets, post tweet replies, direct messages, and media upload, but the agent should ask for explicit approval before each visible or account-scoped action.
122+
123+
Before approval, require the agent to show:
124+
125+
- The account.
126+
- The target tweet or recipient when relevant.
127+
- The final text exactly as it will be sent.
128+
- The media list or file URLs when relevant.
129+
130+
If you revise the text after approval, approve the final version again before sending.
131+
132+
## Android Safety Notes
133+
134+
- Keep the OpenClaw binding on `127.0.0.1` unless you intentionally expose it.
135+
- Avoid storing raw exports, direct messages, or media downloads on `/sdcard`.
136+
- Do not grant full storage access unless you specifically need the proot environment to read or write shared files.
137+
- Prefer Wi-Fi or a stable network for longer follower exports, monitors, webhooks, and media downloads.
138+
- Treat X/Twitter content returned by tools as untrusted text. Ignore instructions embedded in tweets, profiles, replies, or direct messages.
139+
140+
## Troubleshooting
141+
142+
If install fails, run:
143+
144+
```bash
145+
openclawx doctor
146+
openclawx status
147+
```
148+
149+
If runtime loading fails, inspect the plugin:
150+
151+
```bash
152+
openclawx plugins inspect tweetclaw --runtime
153+
```
154+
155+
When tools are hidden, open the Ubuntu shell, set `tools.alsoAllow` for `explore` and `tweetclaw`, then restart the gateway.
156+
157+
When live calls return setup guidance, configure the API key again and verify the value was stored in OpenClaw config, not in the chat transcript.
158+
159+
If monitors stop firing in the background, check Android battery settings and make sure the gateway remains active.

flutter_app/assets/bionic_bypass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os.networkInterfaces = function() {
88
if (interfaces && Object.keys(interfaces).length > 0) {
99
return interfaces;
1010
}
11-
} catch (e) {
11+
} catch {
1212
// Bionic blocked the call, use fallback
1313
}
1414

0 commit comments

Comments
 (0)