Skip to main content

wurl

wurl is a command-line HTTP client for making requests, it comes with Rich syntax highlighting and formatting.

Features

  • Syntax highlighting for JSON, HTML, XML, CSS, JavaScript, and more.
  • Rich formatting for HTTP requests and responses.
  • Image rendering in the terminal for image responses.

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 -o or -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

Metadata

Release files for wurl-cli 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wurl-cli 0.2.5
File Size Uploaded
wurl_cli-0.2.5.tar.gz 41.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wurl-cli 0.2.5
File Interpreter ABI Platform
wurl_cli-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 61.4 kB

Release files / wurl_cli-0.2.5.tar.gz

Download URL wurl_cli-0.2.5.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8d8c1e2e2689d949258854fa7cc3c93c7a072a3c5bb0a43793fdaa1ca83c10c5
BLAKE2b-256 checksum
How to use checksums
2e0ec0af4e9d3014419dfa5c3a416c09061947fd0c8af5808b45d171ddd47bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

Release files / wurl_cli-0.2.5-py3-none-any.whl

Download URL wurl_cli-0.2.5-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3abde73b86a9c3ecf8e05fff78d920420489fd8000beca3da3c728eab983614
BLAKE2b-256 checksum
How to use checksums
99b5e74777ecb66ef97cae21dcb665154b8f808c77867a0f448eebba7cd78397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page