# README
Crypto CLI
Cryptocurrency command-line tool written in Go
Crypto is a simple, robust command-line application that displays the price of popular cryptocurrencies.
Install
Mac
Brew tap
brew install jasonBirchall/crypto-tap/crypto
Linux
Snap
sudo snap install crypto
Manual
These installation instructions are written for a Linux system. If you have a different kind of computer, please amend the steps appropriately.
Please substitute the latest release number. You can see the latest release number in the badge near the top of this page, and all available releases on this page.
export RELEASE=0.1.4
wget https://github.com/jasonbirchall/crypto/releases/download/${RELEASE}/crypto_${RELEASE}_linux_amd64.tar.gz
tar xzvf crypto_${RELEASE}_linux_amd64.tar.gz
mv crypto /usr/local/bin/
Usage
Crypto will eventually have a number of subcommands. Execute: crypto --help
in order to check them out.
Flags
A --watch
flag is available for a number of commands, including track and graph, this allows you to loop the same command every second.
Track
Track was initially intended for something like Polybar for i3 to display the price of certain coins and their rise/fall in the past five minutes. It is basically a go port of the polybar-crypto code base.
The track sub-command has a flag that needs to be set. The --coin
, or -c
for short, will allow you to specify which coins you wish to display.
crypto track --coin btc,eth
BTC £26332.21 | -2.57% ETH £905.26 | -0.8%
Graph
Graph uses the same data set to display a coin in an ascii graph in the terminal. This command utilises asciigraph, which does all the heavy lifting.
The graph sub-command requires you to specify a coin using the --coin
or -c
flag followed by a coin of your choice, for example:
crypto graph --coin btc -H 10
26673 ┤ ╭──╮
26369 ┤ │ ╰╮
26065 ┤ ╭╮ ╭╯ ╰──╮
25762 ┤ │╰╮ ╭─╯ │
25458 ┤ ╭╯ ╰─╯ ╰╮
25154 ┤ ╭╯ │
24850 ┤ │ │
24547 ┤ ╭╯ ╰─
24243 ┤ │
23939 ┼╮│
23636 ┤╰╯
The -H
or --height
flag allows you to specify the height of the graph displayed.
Develop
You will need Go installed (version 1.15 or greater).
Build locally
Run make
to create a crypto
binary.
Testing
Run make test
to run the unit tests.
Updating / Publishing
Update the pkg/version.go
with the tag version and then run make release
, which creates the release using GoReleaser.