wurl
wurl is a command-line HTTP client for making requests, it comes with Rich syntax highlighting and formatting.
Requirements
- Python 3.12 or newer
- uv
Installation
Install from pypi:
uv tool install wurl-cli
# or
pipx install wurl-cli
and use with
wurl <url>
Clone the repository and install its dependencies:
git clone https://github.com/Kartik-2239/wurl.git
uv sync
The CLI is exposed as wurl, so it can be run with:
uv run wurl <url>
for convenience, install it as a tool:
uv tool install -e .
# and use with just wurl
wurl --help
Examples
# Fetch and display a response
uv run wurl https://example.com
# Send a JSON request body (wurl uses POST when --data is supplied)
uv run wurl https://api.example.com/items \
-H 'Content-Type: application/json' \
-d '{"name":"demo"}'
# Saving a response body to a file
uv run wurl https://example.com/file.zip -o file.zip
# Use plain text output without colors or formatting
uv run wurl https://example.com --use-plain-text
# For installation scripts
uv run wurl https://example.com/install.sh --use-plain-text | bash
Command-line options
The required positional argument is:
| Argument | Description |
|---|---|
url |
URL to fetch. |
CLI flags
| Option | Description |
|---|---|
-X METHOD |
Request method: GET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS. |
-d, --data DATA |
Send data in the request body. If no method is supplied, the method defaults to POST. |
-H HEADER |
Add a request header in Key: Value form. May be used more than once. |
-A, --user-agent VALUE |
Set the User-Agent header. |
-b FILE |
Read cookies from a file containing one Key=Value pair per line. |
-c FILE |
Save cookies received in the response to a file. |
-o FILE |
Write response to a file with a specific name |
-O |
Write response to a file |
-i, --include |
Include HTTP status, headers, and response body |
-I, --info |
Make a HEAD request and print response information only |
-v, --verbose |
Print request and response details |
-s, --silent |
Disable the progress meter and errors |
-S, --show-error |
With --silent, show errors before exiting |
-f, --fail |
Raise an error for HTTP 4xx and 5xx responses |
-L, --location |
Follow redirects |
-k, --insecure |
Disable TLS certificate verification |
-up, --use-plain-text |
Disable colors and Rich formatting |
Response formatting
- Languages are syntax highlighted and formatted.
- Binary data can be saved using
-oor-O. - All the formatting and syntax highlighting can be suppressed with
--use-plain-text.
Configuration and customization
Wurl creates a config file ~/.wurl.
This file is used for customizing wurl.
You can read this file and customize it accordingly.
[theme]# wurl configuration file
# Styles accept any Rich style string: https://rich.readthedocs.io/en/stable/style.html
[theme]
# Pygments theme for syntax highlighting (e.g. one-dark, dracula, monokai, nord)
syntax = "one-dark"
# Rich color system: "standard", "256", "truecolor", or "windows"
color_system = "standard"
[colors]
error = "red"
request = "bold green"
response = "bold blue"
header = "bold"
[syntax]
indent_guides = false
word_wrap = true
background_color = "default"
[format]
json_indent = 2
html_indent = 3
[table]
# Box drawing style: ASCII, ASCII2, SQUARE, ROUNDED, HEAVY, DOUBLE,
# MINIMAL, SIMPLE, HEAVY_HEAD, SQUARE_DOUBLE_HEAD, NONE ...
box = "ROUNDED"
show_edge = true
show_lines = true
[http]
timeout = 10.0
user_agent = "wurl/1.0"
follow_redirects = false
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wurl_cli-0.2.1.tar.gz.
File metadata
- Download URL: wurl_cli-0.2.1.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25e890736fd311a4239af5167140ae4f761eda284020314028722ab174911520
|
|
| MD5 |
b0d60b140c0386f579d21188bbfa56ef
|
|
| BLAKE2b-256 |
89f8d42640e26c24600e28d65bf9ffdd1d2a5c2bef6f683496b7f3d090cbc1c1
|
File details
Details for the file wurl_cli-0.2.1-py3-none-any.whl.
File metadata
- Download URL: wurl_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3240ea69c66afd0969c7de668840e796d78414f12d06a7449361fae48ff4b3c0
|
|
| MD5 |
26f02ca697e2d05df10609f29c77adcc
|
|
| BLAKE2b-256 |
1b3a27f30097f1cf3dc7c4c7b334827b264158a205c1e3802a8b62bd231cb885
|