xurls is a command-line utility for working with URLs.
- Extract URLs from text
- Decompose URLs into granular component
- Cross-Platform (Windows, Linux, and macOS)
Visit the releases page and find the appropriate archive for your operating system and architecture. Download the archive from your browser or copy its URL and retrieve it with wget or curl:
-
...with
wget:wget https://github.com/hueristiq/xurls/releases/download/v<version>/xurls-<version>-linux-amd64.tar.gz
-
...or, with
curl:curl -OL https://github.com/hueristiq/xurls/releases/download/v<version>/xurls-<version>-linux-amd64.tar.gz
...then, extract the binary:
tar xf xurls-<version>-linux-amd64.tar.gzTip
The above steps, download and extract, can be combined into a single step with this onliner
curl -sL https://github.com/hueristiq/xurls/releases/download/v<version>/xurls-<version>-linux-amd64.tar.gz | tar -xzvNote
On Windows systems, you should be able to double-click the zip archive to extract the xurls executable.
...move the xurls binary to somewhere in your PATH. For example, on GNU/Linux and OS X systems:
sudo mv xurls /usr/local/bin/Note
Windows users can follow How to: Add Tool Locations to the PATH Environment Variable in order to add xurls to their PATH.
Before you install from source, you need to make sure that Go is installed on your system. You can install Go by following the official instructions for your operating system. For this, we will assume that Go is already installed.
go install -v github.com/hueristiq/xurls/cmd/xurls@latest-
Clone the repository
git clone https://github.com/hueristiq/xurls.git
-
Build the utility
cd xurls/cmd/xurls && \ go build .
-
Move the
xurlsbinary to somewhere in yourPATH. For example, on GNU/Linux and OS X systems:sudo mv xurls /usr/local/bin/
Windows users can follow How to: Add Tool Locations to the PATH Environment Variable in order to add
xurlsto theirPATH.
Caution
While the development version is a good way to take a peek at xurls's latest features before they get released, be aware that it may have bugs. Officially released versions will generally be more stable.
To display help message for xurls use the -h flag:
xurls -hhelp message:
_
__ ___ _ _ __| |___
\ \/ / | | | '__| / __|
> <| |_| | | | \__ \
/_/\_\\__,_|_| |_|___/
v0.0.0
Usage:
xurls [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
discover Command for extracting URLs from text
dissect Command for pulling out bits of URLs
help Help about any command
Flags:
-h, --help help for xurls
--monochrome display no color output
-s, --silent stdout values only output
-v, --verbose stdout verbose output
Use "xurls [command] --help" for more information about a command.
Contributions are welcome and encouraged! Feel free to submit Pull Requests or report Issues. For more details, check out the contribution guidelines.
A big thank you to all the contributors for your ongoing support!
This package is licensed under the MIT license. You are free to use, modify, and distribute it, as long as you follow the terms of the license. You can find the full license text in the repository - Full MIT license text.