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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wurl_cli-0.2.4.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wurl_cli-0.2.4-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file wurl_cli-0.2.4.tar.gz.

File metadata

  • Download URL: wurl_cli-0.2.4.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for wurl_cli-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a3a264df2bf01a72ba809b538a6e0499e3237ed29caa1a672f8ff4fe46eddfc6
MD5 72937cfed44ad3c5d6a39977d890889a
BLAKE2b-256 e0b95f652c217f21be2be3fc7118ffd3589b085a53ea59ce79d4e2c360ec2fef

See more details on using hashes here.

File details

Details for the file wurl_cli-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: wurl_cli-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for wurl_cli-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0a73a2a54ef7c45023228c7e69b8607ea0c3ff63f60d01a8bb298844e4df78ce
MD5 0b18c125a3d7aeea4639ca9814b8c76c
BLAKE2b-256 225b8142fcee9f674fec729607d73370ba3ac7603c26509362e9f5fd1e485ca1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.5

2 files

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page