Source Code
chirp
OpenClaw browser ๋๊ตฌ๋ก X/Twitter ์กฐ์ํ๊ธฐ. bird CLI์ browser ๊ธฐ๋ฐ ๋์.
Prerequisites
ํ๊ฒฝ ์๊ตฌ์ฌํญ
- OpenClaw with browser tool enabled
openclawbrowser profile- X/Twitter ๊ณ์ ๋ก๊ทธ์ธ ์๋ฃ
Headless ์๋ฒ์ธ ๊ฒฝ์ฐ
Xvfb ๊ฐ์ ๋์คํ๋ ์ด ํ์ (spool ์คํฌ์ Prerequisites ์ฐธ๊ณ )
๋ก๊ทธ์ธ (์ฒ์ ํ ๋ฒ๋ง)
browser action=start profile=openclaw
browser action=open profile=openclaw targetUrl="https://x.com/login"
# ์ฌ์ฉ์์๊ฒ ์๋ ๋ก๊ทธ์ธ ์์ฒญ
์ฌ์ฉ๋ฒ
1. ํ์๋ผ์ธ ์ฝ๊ธฐ
browser action=open profile=openclaw targetUrl="https://x.com/home"
browser action=snapshot profile=openclaw compact=true
๊ฐ article์์ ์์ฑ์, ๋ด์ฉ, ์ข์์/๋ฆฌํธ์/๋ต๊ธ ์ ํ์ธ ๊ฐ๋ฅ.
2. ํธ์ ์์ฑ
Step 1: ํ์์ ํ ์คํธ๋ฐ์ค ์ฐพ๊ธฐ
browser action=open profile=openclaw targetUrl="https://x.com/home"
browser action=snapshot profile=openclaw compact=true
โ textbox "Post text" ref ์ฐพ๊ธฐ
Step 2: ๋ด์ฉ ์ ๋ ฅ
browser action=act profile=openclaw request={"kind":"click","ref":"<textbox-ref>"}
browser action=act profile=openclaw request={"kind":"type","ref":"<textbox-ref>","text":"ํธ์ ๋ด์ฉ"}
Step 3: Post ๋ฒํผ ํด๋ฆญ
browser action=snapshot profile=openclaw compact=true
โ button "Post" ref ์ฐพ๊ธฐ (disabled ์๋ ๊ฒ)
browser action=act profile=openclaw request={"kind":"click","ref":"<post-ref>"}
3. ์ข์์ ๋๋ฅด๊ธฐ
ํ์๋ผ์ธ์์ article ๋ด button "Like" ๋๋ button "X Likes. Like" ref ์ฐพ์์:
browser action=act profile=openclaw request={"kind":"click","ref":"<like-ref>"}
4. ๋ฆฌํธ์
button "Repost" ๋๋ button "X reposts. Repost" ref ์ฐพ์์:
browser action=act profile=openclaw request={"kind":"click","ref":"<repost-ref>"}
browser action=snapshot profile=openclaw compact=true
# "Repost" ์ต์
์ ํ
browser action=act profile=openclaw request={"kind":"click","ref":"<repost-option-ref>"}
5. ๋ต๊ธ ๋ฌ๊ธฐ
๋ฐฉ๋ฒ 1: ํ์๋ผ์ธ์์
browser action=act profile=openclaw request={"kind":"click","ref":"<reply-button-ref>"}
browser action=snapshot profile=openclaw compact=true
# ๋ต๊ธ ์
๋ ฅ์ฐฝ์ ํ
์คํธ ์
๋ ฅ ํ Reply ๋ฒํผ ํด๋ฆญ
๋ฐฉ๋ฒ 2: ํธ์ ํ์ด์ง์์
browser action=open profile=openclaw targetUrl="https://x.com/username/status/1234567890"
browser action=snapshot profile=openclaw compact=true
# ๋ต๊ธ ์
๋ ฅ์ฐฝ ์ฐพ์์ ์
๋ ฅ
6. ํ๋กํ ๋ณด๊ธฐ
browser action=open profile=openclaw targetUrl="https://x.com/username"
browser action=snapshot profile=openclaw compact=true
7. ๊ฒ์
browser action=open profile=openclaw targetUrl="https://x.com/search?q=๊ฒ์์ด&src=typed_query"
browser action=snapshot profile=openclaw compact=true
8. ํ๋ก์ฐ
ํ๋กํ ํ์ด์ง์์ button "Follow" ref ์ฐพ์์:
browser action=act profile=openclaw request={"kind":"click","ref":"<follow-ref>"}
ํต์ฌ ํฌ์ธํธ
- snapshot ๋จผ์ - ๋ชจ๋ ์์ ์ ์ ํ์ฌ ์ํ ํ์ธ
- ref๋ ๋งค๋ฒ ๋ฌ๋ผ์ง - snapshot์์ ํญ์ ์๋ก ์ฐพ๊ธฐ
- compact=true - ํ ํฐ ์ ์ฝ
- article ๊ตฌ์กฐ - ๊ฐ ํธ์์ article ์์, ๋ด๋ถ์ ์์ฑ์/๋ด์ฉ/๋ฒํผ๋ค
- ํธ์ ์ ํ์ธ - ์ฌ์ฉ์์๊ฒ ๋ด์ฉ ํ์ธ๋ฐ๊ธฐ
ํธ๋ฌ๋ธ์ํ
| ๋ฌธ์ | ํด๊ฒฐ |
|---|---|
| browser ์ ๋จ | Xvfb ํ์ธ, DISPLAY=:99, Gateway ์ฌ์์ |
| ๋ก๊ทธ์ธ ์ ๋จ | /login์ผ๋ก ์ด๋ ํ ์๋ ๋ก๊ทธ์ธ |
| Post ๋ฒํผ disabled | ํ ์คํธ ์ ๋ ฅ ํ์ธ |
| Rate limit | ์ ์ ๋๊ธฐ ํ ์ฌ์๋ |
vs bird CLI
| ๊ธฐ๋ฅ | bird CLI | chirp (browser) |
|---|---|---|
| ์ค์น | brew ํ์ | Xvfb๋ง ์์ผ๋ฉด ๋จ |
| ์ธ์ฆ | ์ฟ ํค ์ถ์ถ | ๋ธ๋ผ์ฐ์ ์ธ์ |
| ์์ ์ฑ | API ๊ธฐ๋ฐ | UI ์์กด (๋ณ๊ฒฝ ๊ฐ๋ฅ) |
| ์๋ | ๋น ๋ฆ | ์ฝ๊ฐ ๋๋ฆผ |