2018-05-02 01:18:01 +00:00
< p align = "center" >
< img alt = "" src = "https://user-images.githubusercontent.com/168240/39500738-80853e1e-4d6b-11e8-9a7b-2c2921c24447.png" width = "600" / >
< / p >
2018-03-29 22:02:24 +00:00
# cointop
> Coin tracking for hackers
2018-04-03 08:30:15 +00:00
[![License ](http://img.shields.io/badge/license-MIT-blue.svg )](https://raw.githubusercontent.com/miguelmota/cointop/master/LICENSE.md) [![Build Status ](https://travis-ci.org/miguelmota/cointop.svg?branch=master )](https://travis-ci.org/miguelmota/cointop) [![Go Report Card ](https://goreportcard.com/badge/github.com/miguelmota/cointop? )](https://goreportcard.com/report/github.com/miguelmota/cointop) [![GoDoc ](https://godoc.org/github.com/miguelmota/cointop?status.svg )](https://godoc.org/github.com/miguelmota/cointop)
2018-03-30 18:42:09 +00:00
2018-04-26 17:16:34 +00:00
[`cointop` ](https://github.com/miguelmota/cointop ) is a fast and lightweight interactive terminal based UI application for tracking and monitoring cryptocurrency coin stats in real-time.
2018-03-31 08:25:55 +00:00
2018-04-26 17:17:11 +00:00
The interface is inspired by [`htop` ](https://en.wikipedia.org/wiki/Htop ) and shortcut keys are inspired by [`vim` ](https://en.wikipedia.org/wiki/Vim_(text_editor )).
2018-04-26 17:13:04 +00:00
2018-05-02 01:16:21 +00:00
< img alt = "" src = "https://user-images.githubusercontent.com/168240/39320731-e99b928a-4939-11e8-8a62-ff3951353d92.png" width = "880" / >
2018-04-26 17:15:23 +00:00
2018-05-02 01:16:21 +00:00
< img alt = "" src = "https://user-images.githubusercontent.com/168240/39320886-44a2142e-493a-11e8-82f7-561043512783.png" width = "880" / >
2018-04-26 17:13:04 +00:00
2018-04-28 20:23:55 +00:00
In action
2018-04-26 17:15:23 +00:00
2018-05-02 01:16:21 +00:00
< img alt = "" src = "https://user-images.githubusercontent.com/168240/39274530-2392ac42-4897-11e8-947a-a31bc45bd511.gif" width = "880" / >
2018-04-26 17:14:03 +00:00
2018-04-08 01:01:58 +00:00
## Table of Contents
- [Features ](#features )
2018-04-08 01:04:39 +00:00
- [Installing ](#install )
2018-04-08 01:01:58 +00:00
- [Updating ](#updating )
- [Usage ](#usage )
- [Shortcuts ](#shortcuts )
- [Config ](#config )
- [FAQ ](#faq )
2018-04-26 22:53:15 +00:00
- [Development ](#development )
2018-04-08 01:01:58 +00:00
- [License ](#license )
2018-04-02 16:59:49 +00:00
## Features
- Quick sort shortcuts
2018-04-18 02:18:44 +00:00
- Custom key bindings config
2018-04-25 21:15:12 +00:00
- Vim inspired shortcut keys
2018-04-18 02:18:44 +00:00
- Fast pagination
2018-04-24 19:45:27 +00:00
- Charts for coins and global market graphs
2018-04-18 04:25:39 +00:00
- Fuzzy searching for finding coins
2018-04-18 02:18:44 +00:00
- Save and view favorite coins
2018-04-25 20:55:19 +00:00
- Color support
- Help menu
2018-04-26 22:53:15 +00:00
- Offline cache
2018-04-08 01:05:04 +00:00
- Works on macOS, Linux, and Windows
2018-04-02 16:59:49 +00:00
2018-04-08 01:04:39 +00:00
## Installing
2018-03-29 22:04:28 +00:00
2018-04-26 08:15:26 +00:00
Make sure to have [go ](https://golang.org/ ) (1.9+) installed, then do:
2018-03-29 22:04:28 +00:00
```bash
2018-04-01 05:25:51 +00:00
go get -u github.com/miguelmota/cointop
2018-03-29 22:04:28 +00:00
```
2018-04-26 23:19:19 +00:00
### Homebrew (macOS)
2018-04-18 18:36:45 +00:00
2018-04-26 23:19:19 +00:00
cointop is available via [Homebrew ](https://brew.sh/ ) for macOS:
2018-04-18 18:36:45 +00:00
2018-04-26 23:19:19 +00:00
```bash
brew tap cointop/cointop https://github.com/miguelmota/cointop
brew install cointop
```
### Snap (Linux)
2018-04-08 01:21:41 +00:00
2018-05-01 19:47:43 +00:00
cointop is available as a [snap ](https://snapcraft.io/cointop ) for Linux users.
2018-04-08 01:21:41 +00:00
```bash
2018-04-20 09:12:50 +00:00
sudo snap install cointop --stable
```
Running snap:
```bash
2018-04-20 18:46:59 +00:00
sudo snap run cointop
2018-04-08 01:21:41 +00:00
```
2018-04-20 18:46:59 +00:00
Note: snaps don't work in Windows WSL. See this [issue thread ](https://forum.snapcraft.io/t/windows-subsystem-for-linux/216 ).
2018-04-20 18:45:57 +00:00
2018-04-26 23:19:19 +00:00
### Windows WSL (Windows)
2018-05-01 19:47:43 +00:00
Recommended to install using Go (instructions above).
2018-04-26 23:19:19 +00:00
You'll need additional font support for Windows WSL. Please see the [wiki ](https://github.com/miguelmota/cointop/wiki/Windows-Command-Prompt-and-WSL-Font-Support ) for instructions.
2018-04-08 01:12:33 +00:00
## Updating
2018-04-05 18:00:32 +00:00
2018-05-01 19:47:43 +00:00
To update make sure to use the `-u` flag if installed via Go.
2018-04-05 18:00:32 +00:00
```bash
go get -u github.com/miguelmota/cointop
```
2018-05-01 19:47:43 +00:00
### Homebrew (macOS)
2018-04-09 03:14:29 +00:00
```bash
2018-05-01 19:47:43 +00:00
brew uninstall cointop & & brew install cointop
2018-04-09 03:14:29 +00:00
```
2018-05-01 19:47:43 +00:00
### Snap (Linux)
Use the `refresh` command to update snap.
2018-04-26 23:19:19 +00:00
```bash
2018-05-01 19:47:43 +00:00
sudo snap refresh cointop --stable
2018-04-26 23:19:19 +00:00
```
2018-04-01 05:46:08 +00:00
<!--
2018-03-31 09:02:53 +00:00
#### Alternatively (without go)
2018-03-31 08:18:53 +00:00
```
2018-03-31 11:01:08 +00:00
sudo curl -s "https://raw.githubusercontent.com/miguelmota/cointop/master/install.sh?$(date +%s)" | bash
2018-03-31 08:18:53 +00:00
```
2018-04-01 05:46:08 +00:00
-->
2018-03-31 08:18:53 +00:00
2018-03-30 19:08:53 +00:00
## Usage
2018-04-08 01:01:58 +00:00
Just run the `cointop` command to get started:
2018-03-30 23:36:20 +00:00
```bash
$ cointop
```
2018-04-08 01:01:58 +00:00
## Shortcuts
2018-03-30 19:08:53 +00:00
2018-04-07 23:00:10 +00:00
List of default shortcut keys:
2018-03-30 19:08:53 +00:00
2018-04-03 23:17:19 +00:00
Key|Action
2018-04-05 17:43:37 +00:00
----|------|
2018-04-05 17:56:12 +00:00
< kbd > ↑< / kbd > |Move up
< kbd > ↓< / kbd > |Move down
< kbd > →< / kbd > |Go to next page
< kbd > ←< / kbd > |Go to previous page
< kbd > Page Up< / kbd > |Jump page up
< kbd > Page Down< / kbd > |Jump page down
< kbd > Home< / kbd > |Go to first line of page
< kbd > End< / kbd > |Go to last line of page
2018-04-18 02:18:44 +00:00
< kbd > Enter< / kbd > |Toggle [c]hart for highlighted coin
< kbd > Esc< / kbd > |Quit
< kbd > Space< / kbd > |Toggle coin as favorite
2018-04-05 17:56:12 +00:00
< kbd > Ctrl< / kbd > +< kbd > c< / kbd > |Alias to quit
2018-04-25 21:15:12 +00:00
< kbd > Ctrl< / kbd > +< kbd > d< / kbd > |Jump page down (vim inspired)
2018-04-28 20:23:55 +00:00
< kbd > Ctrl< / kbd > +< kbd > f< / kbd > |Search
2018-04-10 05:11:03 +00:00
< kbd > Ctrl< / kbd > +< kbd > n< / kbd > |Go to next page
< kbd > Ctrl< / kbd > +< kbd > p< / kbd > |Go to previous page
2018-04-25 20:55:19 +00:00
< kbd > Ctrl< / kbd > +< kbd > r< / kbd > |Force refresh data
2018-04-18 02:18:44 +00:00
< kbd > Ctrl< / kbd > +< kbd > s< / kbd > |Save config
2018-04-25 21:15:12 +00:00
< kbd > Ctrl< / kbd > +< kbd > u< / kbd > |Jump page up (vim inspired)
2018-04-05 20:27:28 +00:00
< kbd > Alt< / kbd > +< kbd > ↑< / kbd > |Sort current column in ascending order
< kbd > Alt< / kbd > +< kbd > ↓< / kbd > |Sort current column in descending order
2018-04-05 20:20:24 +00:00
< kbd > Alt< / kbd > +< kbd > ←< / kbd > |Sort column to the left
< kbd > Alt< / kbd > +< kbd > →< / kbd > |Sort column to the right
2018-04-05 20:18:51 +00:00
< kbd > F1< / kbd > |Show help|
2018-04-25 20:55:19 +00:00
< kbd > F5< / kbd > |Force refresh data|
2018-04-25 21:15:12 +00:00
< kbd > 0< / kbd > |Go to first page (vim inspired)
2018-04-05 17:56:12 +00:00
< kbd > 1</ kbd > |Sort table by *[1] hour change*
< kbd > 2</ kbd > |Sort table by *[2]4 hour change*
< kbd > 7</ kbd > |Sort table by *[7] day change*
< kbd > a</ kbd > |Sort table by *[a]vailable supply*
2018-04-06 03:58:56 +00:00
< kbd > c< / kbd > |Toggle [c]hart for highlighted coin
2018-04-18 02:18:44 +00:00
< kbd > f< / kbd > |Toggle show favorites
2018-04-30 22:40:33 +00:00
< kbd > F< / kbd > |Toggle show favorites
2018-04-25 21:15:12 +00:00
< kbd > g< / kbd > |Go to first line of page (vim inspired)
< kbd > G< / kbd > |Go to last line of page (vim inspired)
< kbd > h< / kbd > |Go to previous page (vim inspired)
< kbd > H< / kbd > |Go to top of table window (vim inspired)
< kbd > j< / kbd > |Move down (vim inspired)
< kbd > k< / kbd > |Move up (vim inspired)
< kbd > l< / kbd > |Go to next page (vim inspired)
< kbd > L< / kbd > |Go to last line of visible table window (vim inspired)
2018-04-05 17:56:12 +00:00
< kbd > m</ kbd > |Sort table by *[m]arket cap*
2018-04-25 21:15:12 +00:00
< kbd > M< / kbd > |Go to middle of visible table window (vim inspired)
2018-04-05 17:56:12 +00:00
< kbd > n</ kbd > |Sort table by *[n]ame*
2018-04-18 02:18:44 +00:00
< kbd > o</ kbd > |[o]pen link to highlighted coin on [CoinMarketCap ](https://coinmarketcap.com/ )
2018-04-05 17:56:12 +00:00
< kbd > p</ kbd > |Sort table by *[p]rice*
< kbd > r</ kbd > |Sort table by *[r]ank*
< kbd > s</ kbd > |Sort table by *[s]ymbol*
< kbd > t</ kbd > |Sort table by *[t]otal supply*
< kbd > u</ kbd > |Sort table by *last [u]pdated*
< kbd > v</ kbd > |Sort table by *24 hour [v]olume*
2018-04-03 23:25:34 +00:00
< kbd > q< / kbd > |[q]uit
2018-04-25 21:15:12 +00:00
< kbd > $< / kbd > |Go to last page (vim inspired)
2018-04-05 20:18:51 +00:00
< kbd > ?< / kbd > |Show help|
2018-04-25 21:15:12 +00:00
< kbd > /< / kbd > |Search (vim inspired)|
2018-03-30 19:08:53 +00:00
2018-04-08 01:01:58 +00:00
## Config
The first time you run cointop, it'll create a config file in:
```
~/.cointop/config
```
You can then configure the actions you want for each key:
(default `~/.cointop/config` )
```toml
[shortcuts]
"$" = "last_page"
0 = "first_page"
1 = "sort_column_1h_change"
2 = "sort_column_24h_change"
7 = "sort_column_7d_change"
"?" = "help"
2018-04-09 02:59:20 +00:00
"/" = "open_search"
2018-04-08 01:01:58 +00:00
G = "move_to_page_last_row"
H = "move_to_page_visible_first_row"
L = "move_to_page_visible_last_row"
M = "move_to_page_visible_middle_row"
a = "sort_column_available_supply"
2018-04-08 01:08:31 +00:00
"alt+down" = "sort_column_desc"
"alt+left" = "sort_left_column"
"alt+right" = "sort_right_column"
"alt+up" = "sort_column_asc"
down = "move_down"
left = "previous_page"
right = "next_page"
up = "move_up"
2018-04-08 01:01:58 +00:00
c = "toggle_row_chart"
"ctrl+c" = "quit"
"ctrl+d" = "page_down"
2018-04-28 20:23:55 +00:00
"ctrl+f" = "open_search"
2018-04-08 01:01:58 +00:00
"ctrl+n" = "next_page"
"ctrl+p" = "previous_page"
"ctrl+r" = "refresh"
2018-04-18 02:18:44 +00:00
"ctrl+s" = "save"
2018-04-08 01:01:58 +00:00
"ctrl+u" = "page_up"
end = "move_to_page_last_row"
2018-04-18 02:18:44 +00:00
enter = "toggle_row_chart"
2018-04-08 01:01:58 +00:00
esc = "quit"
2018-04-18 02:18:44 +00:00
f = "toggle_show_favorites"
2018-04-30 22:40:33 +00:00
F = "toggle_show_favorites"
2018-04-08 01:08:31 +00:00
F1 = "help"
2018-04-08 01:01:58 +00:00
g = "move_to_page_first_row"
h = "previous_page"
home = "move_to_page_first_row"
j = "move_down"
k = "move_up"
l = "next_page"
m = "sort_column_market_cap"
n = "sort_column_name"
o = "open_link"
p = "sort_column_price"
pagedown = "page_down"
pageup = "page_up"
q = "quit"
r = "sort_column_rank"
s = "sort_column_symbol"
2018-04-18 02:18:44 +00:00
space = "toggle_favorite"
2018-04-08 01:01:58 +00:00
t = "sort_column_total_supply"
u = "sort_column_last_updated"
v = "sort_column_24h_volume"
```
## List of actions
2018-05-01 19:47:43 +00:00
This are the action keywords you may use in the config file to change what the shortcut keys do.
2018-04-08 01:01:58 +00:00
Action|Description
----|------|
`first_page` |Go to first page
`help` |Show help
`last_page` |Go to last page
`move_to_page_first_row` |Move to first row on page
`move_to_page_last_row` |Move to last row on page
`move_to_page_visible_first_row` |Move to first visible row on page
`move_to_page_visible_last_row` |Move to last visible row on page
`move_to_page_visible_middle_row` |Move to middle visible row on page
`move_up` |Move one row up
`move_down` |Move one row down
`next_page` |Go to next page
`open_link` |Open row link
2018-04-09 02:59:20 +00:00
`open_search` |Open search field
2018-04-08 01:01:58 +00:00
`page_down` |Move one row down
`page_up` |Scroll one page up
`previous_page` |Go to previous page
`quit` |Quit application
`refresh` |Do a manual refresh on the data
`sort_column_1h_change` |Sort table by column *1 hour change*
`sort_column_24h_change` |Sort table by column *24 hour change*
`sort_column_24h_volume` |Sort table by column *24 hour volume*
`sort_column_7d_change` |Sort table by column *7 day change*
`sort_column_asc` |Sort highlighted column by ascending order
`sort_column_available_supply` |Sort table by column *available supply*
`sort_column_desc` |Sort highlighted column by descending order
`sort_column_last_updated` |Sort table by column *last updated*
`sort_column_market_cap` |Sort table by column *market cap*
`sort_column_name` |Sort table by column *name*
`sort_column_price` |Sort table by column *price*
`sort_column_rank` |Sort table by column *rank*
`sort_column_symbol` |Sort table by column *symbol*
`sort_column_total_supply` |Sort table by column *total supply*
`sort_left_column` |Sort the column to the left of the highlighted column
`sort_right_column` |Sort the column to the right of the highlighted column
`toggle_row_chart` |Toggle the chart for the highlighted row
2018-04-18 02:18:44 +00:00
`toggle_favorite` |Toggle coin as favorite
`toggle_show_favorites` |Toggle show favorites
`save` |Save config
2018-04-08 01:01:58 +00:00
2018-03-30 19:08:53 +00:00
## FAQ
- Q: Where is the data from?
- A: The data is from [Coin Market Cap ](https://coinmarketcap.com/ ).
- Q: What coins does this support?
- A: This supports any coin listed on [Coin Market Cap ](https://coinmarketcap.com/ ).
- Q: How often is the data polled?
2018-04-16 02:42:07 +00:00
- A: Data gets polled once every minute by default. You can press < kbd > Ctrl</ kbd > +< kbd > r</ kbd > to force refresh.
2018-03-30 19:08:53 +00:00
- Q: I installed cointop without errors but the command is not found.
- A: Make sure your `GOPATH` and `PATH` is set correctly.
2018-04-18 18:36:45 +00:00
2018-03-30 19:08:53 +00:00
```bash
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
```
2018-04-01 04:42:10 +00:00
- Q: What is the size of the binary?
- A: The executable is only ~1.9MB in size.
2018-04-09 02:59:20 +00:00
- Q: How do I search?
- A: The default key to open search is < kbd > /</ kbd > . Type the search query after the `/` in the field and hit < kbd > Enter</ kbd > .
2018-04-16 02:42:07 +00:00
- Q: Does this work on the Raspberry Pi?
2018-04-17 00:17:17 +00:00
- A: Yes, cointop works on the Rasperry Pi including the RPi Zero.
2018-04-16 02:42:07 +00:00
2018-04-18 02:55:09 +00:00
- Q: How do I add/remove a favorite?
- A: Press the < kbd > space</ kbd > key to toggle a coin as a favorite.
- Q: How do I view all my favorites?
- A: Press < kbd > f</ kbd > to toggle view all your favorites.
- Q: How do I save my favorites?
- A: Press < kbd > ctrl</ kbd > +< kbd > s</ kbd > to save your favorites.
2018-04-18 18:23:13 +00:00
- Q: I'm getting question marks or weird symbols instead of the correct characters.
- A: Make sure that your terminal has the encoding set to UTF-8 and that your terminal font supports UTF-8.
You can also try running cointop with the following environment variables:
2018-04-18 18:36:45 +00:00
2018-04-18 18:23:13 +00:00
```bash
LANG=en_US.utf8 TERM=xterm-256color cointop
```
2018-04-18 18:36:45 +00:00
If you're on Windows WSL, please see the [wiki ](https://github.com/miguelmota/cointop/wiki/Windows-Command-Prompt-and-WSL-Font-Support ) for font support instructions.
2018-04-19 06:51:53 +00:00
- Q: How do I install Go on Ubuntu?
2018-04-19 06:52:40 +00:00
- A: There's instructions on installing Go on Ubuntu in the [wiki ](https://github.com/miguelmota/cointop/wiki/Installing-Go-on-Ubuntu ).
2018-04-19 06:51:53 +00:00
2018-04-20 18:45:57 +00:00
- Q: I'm getting errors installing the snap in Windows WSL.
2018-04-20 18:46:59 +00:00
- A: Unfortunately Windows WSL doesn't support `snapd` which is required for snaps to run. See this [issue thread ](https://forum.snapcraft.io/t/windows-subsystem-for-linux/216 ).
2018-04-18 18:36:45 +00:00
2018-04-24 19:45:27 +00:00
- Q: How do I show the help menu?
2018-04-25 20:55:19 +00:00
- A: Press < kbd > ?</ kbd > to toggle the help menu. Press < kbd > q</ kbd > to close help menu.
2018-04-24 19:45:27 +00:00
2018-04-28 20:10:17 +00:00
- Q: I'm getting the error: `new gocui: termbox: error while reading terminfo data: EOF` when trying to run.
- A: Try setting the environment variable `TERM=screen-256color`
2018-04-28 20:23:55 +00:00
- Q: Does cointop work inside an emacs shell?
- A: Yes, but it's slightly buggy.
2018-04-26 22:53:15 +00:00
## Development
2018-05-01 19:47:43 +00:00
### Go
Running cointop from source
```
make run
```
2018-04-26 23:19:19 +00:00
### Snap
Building snap
2018-04-26 22:53:15 +00:00
```bash
2018-05-01 19:47:43 +00:00
make snap/build
2018-04-26 22:53:15 +00:00
```
2018-04-26 23:19:19 +00:00
### Homebrew
Installing from source
```bash
make brew/build
```
2018-03-29 22:02:24 +00:00
## License
2018-04-25 21:18:48 +00:00
Released under the [Apache 2.0 ](./LICENSE.md ) license.