Kurly is a free open source, simple but effective, cross-platform alternative to the popular curl command-line tool. It is written in Go programming language and works in the same way as curl but only aims to offer common usage options and procedures, with emphasis on the HTTP(S) operations.
In this tutorial we will learn how to install and use kurly program – an alternative to most widely used curl command in Linux.
Requirements:
How to Install Kurly (Curl Alternative) in Linux
Once you have installed Golang on your Linux machine, you can proceed to install kurly by cloning its git repository as shown.
$ go get github.com/davidjpeacock/kurly
Alternatively, you can install it via snapd – a package manager for snaps, on a number of Linux distributions. To use snapd, you need to install it on your system as shown.
$ sudo apt update && sudo apt install snapd [On Debian/Ubuntu] $ sudo dnf update && sudo dnf install snapd [On Fedora 22+]
Then install kurly snap using the following command.
$ sudo snap install kurly
On Arch Linux, you can install from AUR, as follows.
$ sudo pacaur -S kurly OR $ sudo yaourt -S kurly
On CentOS/RHEL, you can download and install its RPM package using package manager as shown.
# wget -c https://github.com/davidjpeacock/kurly/releases/download/v1.2.1/kurly-1.2.1-0.x86_64.rpm # yum install kurly-1.2.1-0.x86_64.rpm
How to Use Kurly (Curl Alternative) in Linux
Kurly focuses on the HTTP(S) realm, we will use Httpbin, a HTTP request and response service to partly demonstrate how kurly operates.
The following command will return the user agent, as defined in the http://www.httpbin.org/user-agent endpoint.
$ kurly http://httpbin.org/user-agent
Next, you can use kurly to download a file (for example Tomb-2.5.tar.gz encryption tool source code), preserving remote filename while saving output using -O
flag.
$ kurly -O https://files.dyne.org/tomb/Tomb-2.5.tar.gz
To preserve remote timestamp and follow 3xx redirects, use the -R
and -L
flags respectively, as follows.
$ kurly -R -O -L https://files.dyne.org/tomb/Tomb-2.5.tar.gz
You can set a new name for the downloaded file, using the -o
flag as shown.
$ kurly -R -o tomb.tar.gz -L https://files.dyne.org/tomb/Tomb-2.5.tar.gz
This example shows how to upload a file, where the -T
flag is used to specify the location of a file to upload. Under the http://httpbin.org/put endpoint, this command will return the PUT data as shown in the screenshot.
$ kurly -T ~/Pictures/kali.jpg https://httpbin.org/put
To view headers only from a URL use the -I
or --head
flag.
$ kurly -I https://google.com
To run it quietly, use the -s
switch, this way, kurly will not produce any output.
$ kurly -s -R -O -L https://files.dyne.org/tomb/Tomb-2.5.tar.gz
Last but not least, you can set the maximum time to wait for an operation to complete in seconds, with the -m
flag.
$ kurly -s -m 20 -R -O -L https://files.dyne.org/tomb/Tomb-2.5.tar.gz
To get a list of all kurly usage flags, consult its command-line help message.
$ kurly -h
For more information visit Kurly Github Repository: https://github.com/davidjpeacock/kurly
Kurly is a curl-like tool, but with a few commonly used features under the HTTP(S) realm. Many of the curl-like features are yet to be added to it. Try it out and share your experience with us, via the comment form below.
And this is a good addition to existing tools exactly how? Does it do anything that curl and wget, already existing, thoroughly debugged, opens source tools , cannot do? Why would one want to use kurly instead? Because it is there? This seems to be little more than somebody’s desire to reinvent a wheel that has already been invented many times, or to show that Go can get things done. In short, yet another application that fills a much-needed gap.
@RWR
This is a good concern, well thought out. Although kurly simple ships in with features already existing in curl, i believe it is still in its infancy, may be new features not present in curl will be added to it in the future. Many thanks for sharing your thoughts with us.