https://github.com/sectore/tick-tock-tui
Get latest Bitcoin data in your terminal: fees, blocks, ratio and prices including a price converter.
https://github.com/sectore/tick-tock-tui
bitcoin brick haskell tui
Last synced: 4 months ago
JSON representation
Get latest Bitcoin data in your terminal: fees, blocks, ratio and prices including a price converter.
- Host: GitHub
- URL: https://github.com/sectore/tick-tock-tui
- Owner: sectore
- License: mit
- Created: 2024-10-15T10:11:18.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-05-09T09:00:10.000Z (5 months ago)
- Last Synced: 2025-05-09T10:21:36.423Z (5 months ago)
- Topics: bitcoin, brick, haskell, tui
- Language: Haskell
- Homepage:
- Size: 1.68 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tick-tock-tui
> TICK TOCK NEXT ₿LOCK
Get the latest [Bitcoin](https://bitcoin.org) data in your terminal and more:
- Latest `block`
- Latest `fees`
- `price` converter
- `ratio` of any `BTC/Asset` pairSwitch between `BTC`, `sat` and up to 7 `Fiat` currencies.
# Table of Contents
- [Preview](./#preview)
- [CLI](./#cli)
- [Keybindings](./#keybindings)
- [Installation](./#installation)
- [Development](./#development)
- [FAQ](./#faq)
- [License](./#license)# Preview
_(theme depends on your terminal preferences btw)_
## Dashboard
## Latest fees
## Latest block
## Price converter
## Ratio `BTC/Asset`
## Menu
# CLI
```sh
tick-tock-tui --helpUsage: tick-tock-tui [-m|--mempool URL] [-r|--refresh SECONDS]
[-s|--storage DIRECTORY] [-i|--ignore]Get the latest Bitcoin data in your terminal: fees, blocks, ratio and prices
incl. a price converter. Most data is provided by Mempool. Connect to your own
Mempool instance if you like. Latest prices of other assets come from Krakens
Spot API.Available options:
-m,--mempool URL Mempool URL (default: "https://mempool.space")
-r,--refresh SECONDS Interval to auto-reload data in seconds
(default: 180)
-s,--storage DIRECTORY Folder to store application state
(default: "~/.local/state/tick-tock-tui")
-i,--ignore Ignore previous stored application state to use
default data instead.
-h,--help Show this help text
```# Keybindings
## Menu
| Key | Description |
| --- | --- |
| ↑ / ↓ or m | Toggle menu |## Screens
| Key | Description |
| --- | --- |
| 0 | Dashboard |
| 1 | Fees |
| 2 | Block |
| 3 | Price converter |
| 4 | Ratio |## Actions
| Key | Description |
| --- | --- |
| r | Reload data |
| s | Toggle BTC/sat |
| t | Toggle Fiat |
| e | Toggle extra information |
| a | Toggle animation |
| q | Quit |## Edit mode (converter + ratio only)
| Key | Description |
| --- | --- |
| Ctrl + e | Enter edit mode |
| ENTER | Apply changes (in edit mode only) |
| ESC | Skip changes (in edit mode only) |# Installation
## Cabal
Run following command from your project directory
```sh
cabal install
```## Nix
### NixOS
soon
### Home Manager
soon
# Development
## Requirements
### Nix (recommended):
Install [`Nix`](https://zero-to-nix.com/start/install). Enable [`flakes`](https://zero-to-nix.com/concepts/flakes).
`cd` into project directory to run `nix develop`. Check out available commands in a next chapter.
### Others:
Following needs to be installed:
- [Haskell](https://www.haskell.org)
- [cabal](https://cabal.readthedocs.io)
- [cabal-fmt](https://github.com/phadej/cabal-fmt)
- [fourmoulu](https://github.com/fourmolu/fourmolu)
- [just](https://just.systems)When everything is installed, check out all the commands available below.
### Commands to build etc.
```sh
just --listAvailable recipes:
build # build app
format # format files
format-check # check formats
lint # lint
run # run app
run-custom url sec # run app with custom args (mempool url + seconds to refresh data)
test # run tests
```### Build demos
Check instructions [here](./demos/README.md).
# FAQ
### Where all the data is coming from?
Most data is fetched from [Mempool REST API](https://mempool.space/docs/api/rest). Connect to your private Mempool instance if you like (see next question).
To calculate a `BTC/Asset` ratio [Kraken Spot Rest API](https://docs.kraken.com/api/docs/rest-api/get-ticker-information) is used to get latest prices for other assets.
### How to connect to a custom Mempool instance?
Start the app with `-m` parameter:
```sh
cabal run tick-tock-tui -- -m {custom-mempool-url}
```### Do I need an API key to get asset price data from Kraken's API?
Nope. Quote from [Kraken Support page](https://support.kraken.com/hc/en-us/articles/360000919966-How-to-create-an-API-key):
> "API keys are not required to call the market data (public) API endpoints, as the market data endpoints are not associated with any specific Kraken account."
### Is any data stored locally?
Yes, users settings are stored locally. That's needed to start the app with the latest user settings. Locations to persist data are defined by [`XdgState`](https://hackage.haskell.org/package/directory/docs/System-Directory.html#v:XdgState):
- non-Windows `~/.local/state/tick-tock-tui/data{version}.json`
- Windows: `%LOCALAPPDATA%` (e.g. `C:/Users//AppData/Local/tick-tock-tui/data{version}.json`)# License
[MIT License](./LICENSE)