复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-xurl-7e29d56a0ab3 ,按照其中的说明把「xurl」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Official CLI for the X API.
Primary upstream: https://github.com/xdevplatform/xurl
Homebrew:
brew install --cask xdevplatform/tap/xurl
npm:
npm install -g @xdevplatform/xurl
Shell script:
curl -fsSL https://raw.githubusercontent.com/xdevplatform/xurl/main/install.sh | bash
Go:
go install github.com/xdevplatform/xurl@latest
~/.xurl into LLM context.--verbose in agent runs; it can expose auth headers.Check current state:
xurl auth status
If an app is already registered, complete OAuth 2.0:
xurl auth oauth2
Multi-app:
xurl auth apps list
xurl auth default my-app
xurl auth default my-app alice
xurl --app dev-app /2/users/me
Notes:
xurl stores app config and tokens in ~/.xurl.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 can also be a full X status URL.
GET:
xurl /2/users/me
POST JSON:
xurl -X POST /2/tweets -d '{"text":"Hello world!"}'
Headers:
xurl -H "Content-Type: application/json" /2/tweets
Choose auth type:
xurl --auth oauth2 /2/users/me
xurl --auth oauth1 /2/tweets
xurl --auth app /2/users/me
Choose OAuth2 account:
xurl --username alice /2/users/me
Streaming:
xurl /2/tweets/search/stream
xurl -s /2/users/me
Install:
xurl version
Auth:
xurl auth status
Live request after auth:
xurl whoami