mirror of https://github.com/openclaw/openclaw.git
skills: fmt
This commit is contained in:
parent
da844d6411
commit
8db5e77ffa
|
|
@ -37,22 +37,27 @@ metadata:
|
|||
## Installation
|
||||
|
||||
### Homebrew (macOS)
|
||||
|
||||
```bash
|
||||
brew install --cask xdevplatform/tap/xurl
|
||||
```
|
||||
|
||||
### npm
|
||||
|
||||
```bash
|
||||
npm install -g @xdevplatform/xurl
|
||||
```
|
||||
|
||||
### Shell script
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/xdevplatform/xurl/main/install.sh | bash
|
||||
```
|
||||
|
||||
Installs to `~/.local/bin`. If it's not in your PATH, the script will tell you what to add.
|
||||
|
||||
### Go
|
||||
|
||||
```bash
|
||||
go install github.com/xdevplatform/xurl@latest
|
||||
```
|
||||
|
|
@ -74,6 +79,7 @@ xurl auth oauth2
|
|||
```
|
||||
|
||||
You can register multiple apps and switch between them:
|
||||
|
||||
```bash
|
||||
xurl auth apps add prod-app --client-id PROD_ID --client-secret PROD_SECRET
|
||||
xurl auth apps add dev-app --client-id DEV_ID --client-secret DEV_SECRET
|
||||
|
|
@ -101,7 +107,7 @@ Tokens are persisted to `~/.xurl` in YAML format. Each app has its own isolated
|
|||
## Quick Reference
|
||||
|
||||
| Action | Command |
|
||||
|---|---|
|
||||
| ------------------------- | ------------------------------------------------------------ |
|
||||
| Post | `xurl post "Hello world!"` |
|
||||
| Reply | `xurl reply POST_ID "Nice post!"` |
|
||||
| Quote | `xurl quote POST_ID "My take"` |
|
||||
|
|
@ -294,7 +300,7 @@ xurl post "lol" --media-id MEDIA_ID
|
|||
These flags work on every command:
|
||||
|
||||
| Flag | Short | Description |
|
||||
|---|---|---|
|
||||
| ------------ | ----- | ------------------------------------------------------------------ |
|
||||
| `--app` | | Use a specific registered app for this request (overrides default) |
|
||||
| `--auth` | | Force auth type: `oauth1`, `oauth2`, or `app` |
|
||||
| `--username` | `-u` | Which OAuth2 account to use (if you have multiple) |
|
||||
|
|
@ -332,11 +338,13 @@ xurl https://api.x.com/2/users/me
|
|||
## Streaming
|
||||
|
||||
Streaming endpoints are auto‑detected. Known streaming endpoints include:
|
||||
|
||||
- `/2/tweets/search/stream`
|
||||
- `/2/tweets/sample/stream`
|
||||
- `/2/tweets/sample10/stream`
|
||||
|
||||
You can force streaming on any endpoint with `-s`:
|
||||
|
||||
```bash
|
||||
xurl -s /2/some/endpoint
|
||||
```
|
||||
|
|
@ -357,6 +365,7 @@ All commands return **JSON** to stdout, pretty‑printed with syntax highlightin
|
|||
```
|
||||
|
||||
Errors are also returned as JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"errors": [
|
||||
|
|
@ -373,6 +382,7 @@ Errors are also returned as JSON:
|
|||
## Common Workflows
|
||||
|
||||
### Post with an image
|
||||
|
||||
```bash
|
||||
# 1. Upload the image
|
||||
xurl media upload photo.jpg
|
||||
|
|
@ -381,6 +391,7 @@ xurl post "Check out this photo!" --media-id MEDIA_ID
|
|||
```
|
||||
|
||||
### Reply to a conversation
|
||||
|
||||
```bash
|
||||
# 1. Read the post to understand context
|
||||
xurl read https://x.com/user/status/1234567890
|
||||
|
|
@ -389,6 +400,7 @@ xurl reply 1234567890 "Here are my thoughts..."
|
|||
```
|
||||
|
||||
### Search and engage
|
||||
|
||||
```bash
|
||||
# 1. Search for relevant posts
|
||||
xurl search "topic of interest" -n 10
|
||||
|
|
@ -399,6 +411,7 @@ xurl reply POST_ID_FROM_RESULTS "Great point!"
|
|||
```
|
||||
|
||||
### Check your activity
|
||||
|
||||
```bash
|
||||
# See who you are
|
||||
xurl whoami
|
||||
|
|
@ -409,6 +422,7 @@ xurl timeline -n 20
|
|||
```
|
||||
|
||||
### Set up multiple apps
|
||||
|
||||
```bash
|
||||
# Register two apps
|
||||
xurl auth apps add prod --client-id PROD_ID --client-secret PROD_SECRET
|
||||
|
|
|
|||
Loading…
Reference in New Issue