mwarkentin / yuri

CLI tool to parse URIs into their components
MIT License
4 stars 3 forks source link
cli golang homebrew http json parser uri url utility

yuri

CLI tool to parse URIs into their components

Installation

Binaries

Binaries for linux and macs can be downloaded and installed from the Github Releases.

Source

If you want to install from source:

$ git clone git@github.com:mwarkentin/yuri.git
$ cd yuri
$ make install

Examples

CLI

$ yuri "https://username:password@stage.example.com:443/path+to+foo?query1=1&query2=2#FRAG" | jq
{
  "fragment": "FRAG",
  "host": "stage.example.com:443",
  "hostname": "stage.example.com",
  "port": "443",
  "opaque": "",
  "password": "password",
  "path": "/path+to+foo",
  "rawpath": "/path+to+foo",
  "rawquery": "query1=1&query2=2",
  "scheme": "https",
  "username": "username"
}

Available fields

Here are the JSON fields provided by yuri:

Developing yuri

Running tests

Run make test.

Updating dependencies

Run make vendor and check in updates.

Releasing

Binaries for multiple architectures (linux / darwin) will be built in Github Actions.