Communityライティング&編集github.com

steipete/xurl

xurl X API CLI: インストール、認証、アプリ選択、ショートカット、Rawエンドポイント。

xurl とは?

xurl は X API の公式 CLI であり、X プラットフォーム上での投稿、タイムラインの読み取り、検索、ダイレクトメッセージ、メディアアップロードなどの操作をコマンドラインから直接実行できるようにするツールです。Homebrew、npm、Go、シェルスクリプトなど複数のインストール方法に対応し、OAuth 1.0a/2.0 による安全な認証をサポートしています。また、Raw エンドポイントモードを使用することで、任意の X API エンドポイントに対して GET/POST リクエストを送信することも可能です。このスキルは AI エージェント(Claude Code、Cursor など)で使用するために設計されており、認証情報の取り扱いに関する安全規則が明示されており、機密情報をエージェントのコンテキストに露出しないよう注意が促されています。

対応~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に質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

xurl は何をしますか?

X API の公式 CLI。

主な上流リポジトリ: https://github.com/xdevplatform/xurl

インストール

Homebrew:

brew install --cask xdevplatform/tap/xurl

npm:

npm install -g @xdevplatform/xurl

シェルスクリプト:

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

Go:

go install github.com/xdevplatform/xurl@latest

安全性

  • ~/.xurl を LLM コンテキストに読み込んだり、表示、要約、アップロード、貼り付けたりしないでください。
  • クライアントシークレット、ベアラートークン、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 でも構いません。

Raw エンドポイントモード

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.

関連スキル