@xquik/tweetclaw 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Xquik
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # TweetClaw
2
+
3
+ X/Twitter automation for [OpenClaw](https://github.com/nicepkg/openclaw). Search tweets, post, extract data, run giveaways, monitor accounts - all from your chat.
4
+
5
+ Powered by [Xquik](https://xquik.com), the all-in-one X automation platform.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ openclaw plugins install @xquik/tweetclaw
11
+ ```
12
+
13
+ ## Configure
14
+
15
+ 1. Get an API key at [xquik.com/account-manager](https://xquik.com/account-manager)
16
+ 2. Set it in OpenClaw:
17
+
18
+ ```bash
19
+ openclaw config set plugins.entries.tweetclaw.config.apiKey 'xq_YOUR_KEY'
20
+ ```
21
+
22
+ Optional settings:
23
+
24
+ ```bash
25
+ openclaw config set plugins.entries.tweetclaw.config.pollingEnabled true
26
+ openclaw config set plugins.entries.tweetclaw.config.pollingInterval 60
27
+ ```
28
+
29
+ ## Tools
30
+
31
+ TweetClaw uses the [Cloudflare Code Mode pattern](https://github.com/cloudflare/mcp) - just 2 tools that cover the entire API:
32
+
33
+ ### `explore` (free, no network)
34
+
35
+ Search the API spec to find endpoints. No API calls are made.
36
+
37
+ ```
38
+ You: "What endpoints are available for tweet composition?"
39
+
40
+ AI uses explore → filters spec by category "composition"
41
+ → Returns matching endpoints with parameters and response shapes
42
+ ```
43
+
44
+ ### `tweetclaw` (execute API calls)
45
+
46
+ Execute authenticated API calls. Auth is injected automatically - the LLM never sees your API key.
47
+
48
+ ```
49
+ You: "Search tweets about AI agents"
50
+
51
+ AI uses explore → finds /api/v1/x/tweets/search
52
+ AI uses tweetclaw → calls the endpoint with auth
53
+ → Returns tweet results
54
+ ```
55
+
56
+ ```
57
+ You: "Post a tweet saying 'Hello from TweetClaw!'"
58
+
59
+ AI uses tweetclaw → finds connected account, posts tweet
60
+ → Returns { tweetId, success: true }
61
+ ```
62
+
63
+ ## Commands
64
+
65
+ Instant responses, no LLM needed:
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `/xstatus` | Account info, subscription status, usage |
70
+ | `/xtrends` | Trending topics from curated sources |
71
+ | `/xtrends tech` | Trending topics filtered by category |
72
+
73
+ ## Event Notifications
74
+
75
+ When polling is enabled (default), TweetClaw checks for new events every 60 seconds and delivers them to your chat:
76
+
77
+ - **Monitor alerts**: New tweets, replies, quotes, retweets from monitored accounts
78
+ - **Follower changes**: Gained or lost followers on monitored accounts
79
+
80
+ Set up a monitor first:
81
+
82
+ ```
83
+ You: "Monitor @elonmusk for new tweets and follower changes"
84
+ ```
85
+
86
+ ## API Coverage
87
+
88
+ 40+ endpoints across these categories:
89
+
90
+ | Category | Examples |
91
+ |----------|---------|
92
+ | **Composition** | Compose, refine, score tweets; manage drafts; analyze writing styles |
93
+ | **Twitter** | Search tweets, look up users, check follow relationships |
94
+ | **Extraction** | Run extraction jobs (reply-extractor, community-explorer, etc.) |
95
+ | **Draws** | Run giveaway draws on tweets, export results |
96
+ | **Monitoring** | Create monitors, view events, manage webhooks |
97
+ | **Media** | Download tweet media, upload media via URL |
98
+ | **Write Actions** | Post tweets, like, retweet, follow, DM, update profile |
99
+ | **Account** | Manage API keys, subscription, connected X accounts |
100
+ | **Trends** | X trending topics, curated radar from multiple sources |
101
+
102
+ ## Pricing
103
+
104
+ **Free tier** (no subscription needed):
105
+ - Tweet composition, style analysis, drafts
106
+ - Curated trending radar
107
+ - Account management, API keys
108
+ - Integrations management
109
+
110
+ **Subscription ($20/month)** for full access:
111
+ - Tweet search, user lookup, media download
112
+ - Extractions, giveaway draws
113
+ - Account monitors, events, webhooks
114
+ - Write actions (post, like, retweet, follow, DM)
115
+ - X trending topics
116
+
117
+ When a paid endpoint returns 402, TweetClaw automatically provides a checkout URL.
118
+
119
+ ## License
120
+
121
+ MIT
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "tweetclaw",
3
+ "name": "TweetClaw",
4
+ "version": "1.0.0",
5
+ "description": "X/Twitter automation powered by Xquik - search tweets, post, extract data, run giveaways, monitor accounts, compose with AI",
6
+ "author": "Xquik",
7
+ "license": "MIT",
8
+ "configSchema": {
9
+ "type": "object",
10
+ "properties": {
11
+ "apiKey": { "type": "string", "description": "Xquik API key (get one at xquik.com/account-manager)" },
12
+ "baseUrl": { "type": "string", "default": "https://xquik.com" },
13
+ "pollingInterval": { "type": "number", "default": 60, "description": "Event polling interval in seconds" },
14
+ "pollingEnabled": { "type": "boolean", "default": true }
15
+ },
16
+ "required": ["apiKey"]
17
+ },
18
+ "uiHints": {
19
+ "apiKey": { "label": "Xquik API Key", "sensitive": true, "placeholder": "xq_..." },
20
+ "baseUrl": { "label": "API Base URL", "placeholder": "https://xquik.com" },
21
+ "pollingInterval": { "label": "Event Poll Interval (seconds)" },
22
+ "pollingEnabled": { "label": "Enable Event Notifications" }
23
+ }
24
+ }
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@xquik/tweetclaw",
3
+ "version": "1.0.0",
4
+ "description": "X/Twitter automation for OpenClaw - search, post, extract, draw, monitor via Xquik",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "openclaw": {
8
+ "extensions": [
9
+ "./src/index.ts"
10
+ ]
11
+ },
12
+ "files": [
13
+ "src/",
14
+ "openclaw.plugin.json"
15
+ ],
16
+ "keywords": [
17
+ "openclaw-plugin",
18
+ "twitter",
19
+ "x",
20
+ "automation",
21
+ "tweetclaw",
22
+ "xquik"
23
+ ],
24
+ "scripts": {
25
+ "typecheck": "tsc --noEmit",
26
+ "lint": "eslint .",
27
+ "test": "vitest run",
28
+ "test:coverage": "vitest run --coverage",
29
+ "knip": "knip --strict --include-libs --treat-config-hints-as-errors",
30
+ "cpd": "jscpd .",
31
+ "check-suppressions": "tsx check-suppressions.ts",
32
+ "check-em-dash": "tsx check-em-dash.ts",
33
+ "check:all": "npm run typecheck && npm run lint && npm run cpd && npm run knip && npm run check-suppressions && npm run check-em-dash && npm run test:coverage"
34
+ },
35
+ "peerDependencies": {
36
+ "openclaw": ">=2026.2.0"
37
+ },
38
+ "devDependencies": {
39
+ "@eslint/js": "^10.0.1",
40
+ "@sinclair/typebox": "^0.34.0",
41
+ "@types/node": "^25.5.0",
42
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
43
+ "@typescript-eslint/parser": "^8.57.0",
44
+ "@vitest/coverage-v8": "^3.2.4",
45
+ "@vitest/eslint-plugin": "^1.6.11",
46
+ "eslint": "^10.0.3",
47
+ "eslint-config-prettier": "^10.1.8",
48
+ "eslint-import-resolver-typescript": "^4.4.4",
49
+ "eslint-plugin-import-x": "^4.16.2",
50
+ "eslint-plugin-n": "^17.24.0",
51
+ "eslint-plugin-no-secrets": "^2.3.3",
52
+ "eslint-plugin-promise": "^7.2.1",
53
+ "eslint-plugin-regexp": "^3.1.0",
54
+ "eslint-plugin-security": "^4.0.0",
55
+ "eslint-plugin-sonarjs": "^4.0.2",
56
+ "eslint-plugin-unicorn": "^63.0.0",
57
+ "globals": "^17.4.0",
58
+ "jscpd": "^4.0.8",
59
+ "knip": "^5.86.0",
60
+ "tsx": "^4.21.0",
61
+ "typescript": "^5.8.0",
62
+ "vitest": "^3.1.0"
63
+ }
64
+ }