Kurly – An Alternative to Most Widely Used Curl Program

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:

  1. GoLang (Go Programming Language) 1.7.4 or higher.

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
Check User Agent
Check 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
Download File Using Kurly
Download File Using Kurly

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  
Rename File While Downloading
Rename File While Downloading

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
Upload File Using Kurly
Upload File Using Kurly

To view headers only from a URL use the -I or --head flag.

$ kurly -I https://google.com
View Website Headers from Terminal
View Website Headers from Terminal

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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

2 Comments

Leave a Reply
  1. 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.

    Reply
    • @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.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.