Browser
spool
Threads CLI - Read, post, reply, and search on Meta's Threads using OpenClaw.
---
name: spool
description: "Threads CLI - Read, post, reply, and search on Meta's Threads using OpenClaw browser tool. Use when the user wants to interact with Threads: posting, reading timeline, viewing profiles, replying to threads, or searching."
homepage: https://github.com/zizi-cat/spool
metadata: {"clawdhub":{"emoji":"๐งต"}}
---
# spool
OpenClaw browser ๋๊ตฌ๋ก Threads (threads.net) ์กฐ์ํ๊ธฐ.
## Prerequisites
### ํ๊ฒฝ ์๊ตฌ์ฌํญ
- OpenClaw with browser tool enabled
- `openclaw` browser profile
- Threads ๊ณ์ ๋ก๊ทธ์ธ ์๋ฃ
### Headless ์๋ฒ์ธ ๊ฒฝ์ฐ (GUI ์์)
Xvfb ๊ฐ์ ๋์คํ๋ ์ด ํ์:
```bash
# 1. Xvfb ์ค์น ๋ฐ ์๋น์ค ๋ฑ๋ก
sudo apt install -y xvfb
sudo tee /etc/systemd/system/xvfb.service << 'EOF'
[Unit]
Description=X Virtual Frame Buffer
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/Xvfb :99 -screen 0 1920x1080x24
Restart=always
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable --now xvfb
# 2. OpenClaw Gateway์ DISPLAY ํ๊ฒฝ๋ณ์ ์ถ๊ฐ
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
echo -e '[Service]\nEnvironment=DISPLAY=:99' > ~/.config/systemd/user/openclaw-gateway.service.d/display.conf
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway
```
### ๋ก๊ทธ์ธ (์ฒ์ ํ ๋ฒ๋ง)
```
browser action=start profile=openclaw
browser action=open profile=openclaw targetUrl="https://www.threads.net/login"
# ์ฌ์ฉ์์๊ฒ ์๋ ๋ก๊ทธ์ธ ์์ฒญ
```
---
## ์ฌ์ฉ๋ฒ
### 1. ํ์๋ผ์ธ ์ฝ๊ธฐ
```
browser action=open profile=openclaw targetUrl="https://www.threads.net"
browser action=snapshot profile=openclaw compact=true
```
๊ฒฐ๊ณผ์์ ๊ฐ ๊ฒ์๋ฌผ์ ์์ฑ์, ๋ด์ฉ, ์ข์์/๋๊ธ ์ ํ์ธ ๊ฐ๋ฅ.
### 2. ํฌ์คํ
(์ ์ฒด ํ๋ก์ฐ)
**Step 1: ํ์ผ๋ก ์ด๋**
```
browser action=open profile=openclaw targetUrl="https://www.threads.net"
browser action=snapshot profile=openclaw compact=true
```
**Step 2: "What's new?" ๋ฒํผ ์ฐพ์์ ํด๋ฆญ**
snapshot์์ `"What's new?"` ๋๋ `"Empty text field"` ํฌํจ๋ button์ ref ์ฐพ๊ธฐ
```
browser action=act profile=openclaw request={"kind":"click","ref":"e14"}
```
(ref๋ snapshot๋ง๋ค ๋ค๋ฆ! ๋ฐ๋์ snapshot์์ ํ์ธ)
**Step 3: ๋ค์ด์ผ๋ก๊ทธ์์ ํ
์คํธ ์
๋ ฅ**
```
browser action=snapshot profile=openclaw compact=true
```
`textbox` ref ์ฐพ์์:
```
browser action=act profile=openclaw request={"kind":"type","ref":"e14","text":"ํฌ์คํ
๋ด์ฉ"}
```
**Step 4: Post ๋ฒํผ ํด๋ฆญ**
```
browser action=act profile=openclaw request={"kind":"click","ref":"e22"}
```
(Post ๋ฒํผ ref๋ snapshot์์ ํ์ธ)
**Step 5: ํ์ธ**
```
browser action=snapshot profile=openclaw compact=true
```
โ "Posted" ํ
์คํธ์ "View" ๋งํฌ๊ฐ ๋ณด์ด๋ฉด ์ฑ๊ณต!
### 3. ํ๋กํ ๋ณด๊ธฐ
```
browser action=open profile=openclaw targetUrl="https://www.threads.net/@username"
browser action=snapshot profile=openclaw compact=true
```
### 4. ๊ฒ์
```
browser action=open profile=openclaw targetUrl="https://www.threads.net/search?q=๊ฒ์์ด"
browser action=snapshot profile=openclaw compact=true
```
### 5. ๋ต๊ธ ๋ฌ๊ธฐ
```
# ๊ฒ์๋ฌผ ์ด๊ธฐ
browser action=open profile=openclaw targetUrl="https://www.threads.net/@user/post/POSTID"
browser action=snapshot profile=openclaw compact=true
# Reply ๋ฒํผ ํด๋ฆญ (ref ํ์ธ ํ)
browser action=act profile=openclaw request={"kind":"click","ref":"<reply-ref>"}
# ํ
์คํธ ์
๋ ฅ ๋ฐ ๊ฒ์ (ํฌ์คํ
๊ณผ ๋์ผ)
```
---
## ํต์ฌ ํฌ์ธํธ
1. **snapshot ๋จผ์ !** - ๋ชจ๋ ์์
์ ์ snapshot์ผ๋ก ํ์ฌ ํ์ด์ง ์ํ์ ref ํ์ธ
2. **ref๋ ๋งค๋ฒ ๋ฌ๋ผ์ง** - snapshot ๊ฒฐ๊ณผ์์ ํญ์ ์๋ก ์ฐพ๊ธฐ
3. **compact=true** - ํ ํฐ ์ ์ฝ์ ์ํด ํญ์ ์ฌ์ฉ
4. **targetId ์ ์ง** - ๊ฐ์ ํญ์์ ์์
ํ๋ ค๋ฉด targetId ํ๋ผ๋ฏธํฐ ์ฌ์ฉ
5. **ํฌ์คํ
์ ํ์ธ** - ์ฌ์ฉ์์๊ฒ ๋ด์ฉ ํ์ธ๋ฐ๊ณ ํฌ์คํ
---
## ํธ๋ฌ๋ธ์ํ
| ๋ฌธ์ | ํด๊ฒฐ |
|------|------|
| browser ๋๊ตฌ ์ ๋จ | Xvfb ์คํ ํ์ธ, DISPLAY=:99 ์ค์ ํ์ธ, Gateway ์ฌ์์ |
| ๋ก๊ทธ์ธ ์ ๋จ | `/login` ํ์ด์ง๋ก ์ด๋ ํ ์๋ ๋ก๊ทธ์ธ ์์ฒญ |
| ref ๋ชป ์ฐพ์ | snapshot ๋ค์ ์ฐ๊ณ ๋น์ทํ ํ
์คํธ/๋ฒํผ ์ฐพ๊ธฐ |
| ํฌ์คํ
์ ๋จ | Post ๋ฒํผ์ด disabled์ธ์ง ํ์ธ (ํ
์คํธ ์
๋ ฅ ํ์) |
browser
By
Comments
Sign in to leave a comment