{"id":22173132,"url":"https://github.com/knutkirkhorn/btc-value-cli","last_synced_at":"2025-07-26T15:31:13.909Z","repository":{"id":52004085,"uuid":"113611356","full_name":"knutkirkhorn/btc-value-cli","owner":"knutkirkhorn","description":"💸💻 Get the current Bitcoin value CLI","archived":false,"fork":false,"pushed_at":"2023-03-10T17:11:12.000Z","size":480,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-07T02:36:06.603Z","etag":null,"topics":["bitcoin","btc","cli","cli-app","command-line","cryptocurrency","nodejs","terminal","value"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knutkirkhorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-08T19:46:34.000Z","updated_at":"2022-12-20T13:52:17.000Z","dependencies_parsed_at":"2023-01-21T23:46:19.434Z","dependency_job_id":null,"html_url":"https://github.com/knutkirkhorn/btc-value-cli","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knutkirkhorn%2Fbtc-value-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knutkirkhorn%2Fbtc-value-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knutkirkhorn%2Fbtc-value-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knutkirkhorn%2Fbtc-value-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knutkirkhorn","download_url":"https://codeload.github.com/knutkirkhorn/btc-value-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227689965,"owners_count":17804815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","btc","cli","cli-app","command-line","cryptocurrency","nodejs","terminal","value"],"created_at":"2024-12-02T07:30:36.000Z","updated_at":"2024-12-02T07:31:17.703Z","avatar_url":"https://github.com/knutkirkhorn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg width=\"360\" src=\"https://raw.githubusercontent.com/knutkirkhorn/btc-value-cli/main/media/logo.svg\" alt=\"btc-value-cli\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\n\n\u003e Get the current Bitcoin value in command line\n\n[![Downloads](https://img.shields.io/npm/dm/btc-value-cli.svg)](https://www.npmjs.com/package/btc-value-cli)\n\n## Installation\n\n```\nnpm install --global btc-value-cli\n```\n\n## Usage\n\n```\n$ btc-value --help\n\n  Usage\n    $ btc-value\n\n  Options\n    --key -k                      Set the API key (Obtain key at: https://coinmarketcap.com/api/)\n    --decimal -d                  Print value as decimal\n    --save -s [code]              Set the currency that will be used by default\n    --currency -c [code]          Print the value in another currency\n    --list -l                     Print a list of all supported currencies\n    --quantity -q [number]        Print the value of the given quantity\n    --autorefresh -a [seconds]    Automatic refresh printing every x seconds\n    --percentage -p [h|d|w]       Print the percentage change (h = hour, d = day, w = week)\n    --reset -r                    Reset the configuration to the default\n    --provider [cmc|coingecko]    Set the currency provider to retrieve Bitcoin values from\n\n  Examples\n    $ btc-value\n    $ btc-value -k \u003cexample-API-key\u003e\n    $ btc-value -d\n    $ btc-value -s NOK\n    $ btc-value -c NOK\n    $ btc-value -q 2.2\n    $ btc-value -p h\n    $ btc-value --provider coingecko\n```\n\n## Options\n\n### `--decimal`, `-d`\n\nPrint the value as a decimal number.\n\n### `--save`, `-s [code]`\n\nSet the currency that will be used by default. It will save the new default currency code and symbol in the [config.json](config.json) file. Next time ```btc-value``` is run in command line it will print the value of the new default currency.\n\n### `--currency`, `-c [code]`\n\nPrint the value in another currency. It will print out the value of the currency code. A list of all currency codes can be shown with the use of the `-l` flag.\n\n### `--list`, `-l`\n\nPrint a list of all supported currencies for the selected currency provider.\n\n### `--quantity`, `-q [number]`\n\nPrint the value of the given quantity. Input quantity can be either ```decimal``` or ```integer```.\nIf the input quantity is set to a number, the given quantity is saved locally in the [config.json](config.json) file.\nThe `-q` flag can be used with and without a number input.\n\n### `--autorefresh`, `-a [seconds]`\n\nSet a timeout that print the value every `seconds` seconds. The timeout restarts after every use. If `seconds` is not set, the default timeout is used (15 seconds). This is stored in the [config.json](config.json) file. The reason a timeout is used instead of a interval, is that it might not finish before the next starts (if bad network connection) and this can use more memory than needed.\n\n### `--percentage`, `-p [h|d|w]`\n\nPrint the percentage change the last hour, day and week. If the flag is set to `h` then percentage change last hour is printed. It is the same for `d` and days, and `w` and week.\nIf the percentage is negative it is printed in bright red otherwise it is printed in green.\n\n### `--reset`, `-r`\n\nReset the configuration to the default:\n\n```js\n{\n    default: 'USD',\n    quantity: 1,\n    autorefresh: 15,\n    apiKey: '',\n    provider: 'coingecko'\n}\n```\n\n### `--provider [cmc|coingecko]`\n\nSet the currency provider to retrieve Bitcoin values from. By default it uses the data from CoinGecko.\n\n### `--key`, `-k`\n\nSet the API key. This key is optional and only required if using data from the CoinMarketCap API. To obtain an API key go to the [Cryptocurrency Market Capitalizations API](https://coinmarketcap.com/api/).\n\n## Related\n\n- [btc-value](https://github.com/knutkirkhorn/btc-value) - API for this module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknutkirkhorn%2Fbtc-value-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknutkirkhorn%2Fbtc-value-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknutkirkhorn%2Fbtc-value-cli/lists"}