How xdevplatform/xurl works
xurl is a curl-like CLI for X API operations, multi-app authentication, media uploads, webhooks, shortcuts, and encrypted XChat. The main workflow starts in the CLI, selects credentials and request options, then sends requests to X; authentication commands acquire and persist tokens for later requests. Chat has a separate encrypted messaging workflow with locally stored keys. Several CLI capabilities are represented from the README and SOURCE INDEX, since their implementation was not excerpted; those links are documented or left unverified accordingly.
Main entry points: root.go Command router · client.go HTTP API client · main.go Application startup · chat.go XChat commands
Components 16
CLI workflows
- Application startup
main.go - Command router
cli/root.go - Auth commands
cli/auth.go
Identity and configuration
- Auth protocols
auth/auth.go - Runtime config
config/config.go - App token store
store/tokens.go
X API operations
- Media upload
api/media.go - API shortcuts
cli/shortcuts.go - Webhook server
cli/webhook.go - MCP interface
cli/mcp.go - HTTP API client
api/client.go
Encrypted chat
- XChat commands
cli/chat.go - Chat key store
store/chatkeys.go - Chat crypto SDK
Other components
- CLI user
- X API
Connections 22
- CLI user → Application startup: runs
main.go - Application startup → Runtime config: creates
main.go - Application startup → Auth protocols: creates
main.go - Application startup → Command router: executes
main.go - Command router → Auth commands: routes auth
- Auth commands → Auth protocols: starts login
cli/auth.go - Auth commands → App token store: saves credentials
cli/auth.go - Auth protocols → App token store: loads tokens
auth/auth.go - Runtime config → App token store: resolves app
config/config.go - HTTP API client → Auth protocols: gets auth header
api/client.go - HTTP API client → Runtime config: uses endpoints
api/client.go - HTTP API client → X API: sends requests
README.md - Command router → HTTP API client: issues requests
- Media upload → HTTP API client: uploads chunks
api/media.go - Command router → Media upload: offers uploads
- Command router → API shortcuts: offers shortcuts
- Command router → Webhook server: offers webhooks
- Command router → MCP interface: offers MCP
- CLI user → XChat commands: invokes chat
README.md - XChat commands → Chat key store: loads keys
cli/chat.go - XChat commands → HTTP API client: calls chat API
cli/chat.go - XChat commands → Chat crypto SDK: uses crypto