Community寫作與編輯github.com

steipete/xurl

xurl X API CLI:安裝、認證、應用程式選擇、快捷指令與原始端點。

xurl 是什麼?

xurl 是一款官方 X API 命令列工具,支援多種安裝方式(Homebrew、npm、Shell 腳本、Go),並提供完整的 OAuth 1.0a、OAuth 2.0 及應用程式專用令牌認證流程。使用者可透過簡潔子命令執行發文、回覆、引用、刪除、搜尋、追蹤、傳送私訊等常見操作,也能以原始端點模式直接呼叫 GET/POST 請求,甚至支援串流回應。工具會將應用程式配置與令牌儲存在 `~/.xurl`,且強調安全規範——禁止在 LLM 上下文中顯示 `~/.xurl` 內容,也禁止在代理對話中貼入客戶端密碼或 Bearer 令牌。使用者須在代理對話外的本機環境手動註冊應用程式憑證,以降低認證資料外洩風險。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/xurl

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

xurl 是做什麼的?

X API 官方命令列工具。

主要上游:https://github.com/xdevplatform/xurl

安裝

Homebrew:

brew install --cask xdevplatform/tap/xurl

npm:

npm install -g @xdevplatform/xurl

Shell 腳本:

curl -fsSL https://raw.githubusercontent.com/xdevplatform/xurl/main/install.sh | bash

Go:

go install github.com/xdevplatform/xurl@latest

安全

  • 切勿讀取、列印、摘要、上傳或將 ~/.xurl 內容貼入 LLM 上下文。
  • 切勿要求使用者將客戶端密碼、Bearer 令牌或 OAuth 令牌貼入對話。
  • 在代理運行中切勿使用 --verbose;它可能暴露認證標頭。
  • 不要在代理對話中使用內嵌密碼參數執行認證命令。
  • 使用者必須在代理對話之外的本機機器上手動註冊應用程式憑證。

認證

檢查目前狀態:

xurl auth status

若應用程式已註冊,完成 OAuth 2.0:

xurl auth oauth2

多應用程式:

xurl auth apps list
xurl auth default my-app
xurl auth default my-app alice
xurl --app dev-app /2/users/me

注意事項:

  • xurl 將應用程式配置和令牌儲存在 ~/.xurl。
  • X 開發者入口網站中的 OAuth 2.0 重新導向 URI 應設為 http://localhost:8080/callback。
  • 此處刻意省略內嵌密碼的應用程式註冊範例。請在代理對話之外執行該操作。

常用快捷指令

xurl post "Hello world!"
xurl reply 1234567890 "Nice post"
xurl quote 1234567890 "My take"
xurl delete 1234567890

xurl read 1234567890
xurl search "from:elonmusk" -n 10
xurl whoami
xurl user @XDevelopers
xurl timeline -n 20
xurl mentions -n 10

xurl like 1234567890
xurl unlike 1234567890
xurl repost 1234567890
xurl unrepost 1234567890

xurl bookmark 1234567890
xurl unbookmark 1234567890
xurl bookmarks -n 10
xurl likes -n 10

xurl follow @handle
xurl unfollow @handle
xurl following -n 20
xurl followers -n 20

xurl dm @handle "message"
xurl dms -n 10

xurl media upload path/to/file.mp4
xurl media status MEDIA_ID

POST_ID 也可以是完整的 X 狀態 URL。

原始端點模式

GET:

xurl /2/users/me

POST JSON:

xurl -X POST /2/tweets -d '{"text":"Hello world!"}'

標頭:

xurl -H "Content-Type: application/json" /2/tweets

選擇認證類型:

xurl --auth oauth2 /2/users/me
xurl --auth oauth1 /2/tweets
xurl --auth app /2/users/me

選擇 OAuth2 帳號:

xurl --username alice /2/users/me

串流:

xurl /2/tweets/search/stream
xurl -s /2/users/me

快速檢查

安裝:

xurl version

認證:

xurl auth status

認證後的即時請求:

xurl whoami

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

相關技能