kurl-cli

Crates.iokurl-cli
lib.rskurl-cli
version0.1.0
created_at2025-07-29 16:31:00.980091+00
updated_at2025-07-29 16:31:00.980091+00
descriptionA curl clone with detailed debugging info, written in Rust.
homepage
repositoryhttps://github.com/worktools/kurl-cli
max_upload_size
id1772519
size57,956
题叶 (tiye)

documentation

README

kurl-cli

kurl is a command-line tool inspired by curl, written in Rust. It aims to be compatible with curl's most common flags while providing enhanced, easy-to-read debugging information.

Features

  • GET, POST, HEAD requests
  • Custom headers (-H)
  • POST data (-d)
  • Include response headers in output (-i)
  • Fetch headers only (-I)
  • Verbose logging for debugging (-v, -v -v, -v -v -v)

Installation

cargo install --path .

Usage

kurl [FLAGS] [OPTIONS] <URL>

Examples

Simple GET request:

kurl https://httpbin.org/get

Include response headers:

kurl -i https://httpbin.org/get

Fetch headers only (HEAD request):

kurl -I https://httpbin.org/get

POST request with data:

kurl -X POST -d "name=kurl&lang=rust" https://httpbin.org/post

Send custom headers:

kurl -H "X-Custom: Hello" https://httpbin.org/headers

Verbose output for debugging:

Use -v for info, -v -v for debug, and -v -v -v for trace-level output, which includes detailed request and response headers similar to curl -v.

# Level 1: Info
kurl -v https://tiye.me

# Level 2: Debug
kurl -v -v https://tiye.me

# Level 3: Trace (with > < header details)
kurl -v -v -v https://tiye.me

Design

The core logic is built with:

  • Argument Parsing: argh
  • HTTP Client: reqwest
  • Logging: log + env_logger

License

MIT. Code mostly rendered by Gemini.

Commit count: 0

cargo fmt