{"id":22437052,"url":"https://github.com/blockfrost/blockfrost-cardano-cli","last_synced_at":"2025-08-01T15:32:02.649Z","repository":{"id":42624645,"uuid":"421006611","full_name":"blockfrost/blockfrost-cardano-cli","owner":"blockfrost","description":"Blockfrost Cardano CLI","archived":false,"fork":false,"pushed_at":"2022-08-31T19:55:09.000Z","size":113703,"stargazers_count":25,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-29T06:24:05.010Z","etag":null,"topics":["blockchain","blockfrost","cardano","cli"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockfrost.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-10-25T12:04:02.000Z","updated_at":"2025-07-17T10:53:20.000Z","dependencies_parsed_at":"2022-09-08T01:20:34.722Z","dependency_job_id":null,"html_url":"https://github.com/blockfrost/blockfrost-cardano-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/blockfrost/blockfrost-cardano-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-cardano-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-cardano-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-cardano-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-cardano-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockfrost","download_url":"https://codeload.github.com/blockfrost/blockfrost-cardano-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-cardano-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268250647,"owners_count":24219892,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","blockfrost","cardano","cli"],"created_at":"2024-12-06T00:11:27.402Z","updated_at":"2025-08-01T15:31:59.357Z","avatar_url":"https://github.com/blockfrost.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![master build ci](https://github.com/blockfrost/blockfrost-cardano-cli/actions/workflows/build.yml/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-cardano-cli.svg)](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-cardano-cli) ![downloads](https://img.shields.io/npm/dy/@blockfrost/blockfrost-cardano-cli) \u003cimg src=\"https://github.com/blockfrost/blockfrost-cardano-cli/blob/master/docs/badge-coverage.svg\" /\u003e \u003ca href=\"https://fivebinaries.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\n\u003cimg src=\"https://blockfrost.io/images/logo.svg\" width=\"250\" align=\"right\" height=\"90\" style=\"margin-bottom: -50px\"\u003e\n\n# Blockfrost Cardano CLI\n\n\u003cbr\u003e\n\u003cp align=\"center\"\u003eDrop-in(ish) replacement for cardano-cli.\u003cbr /\u003eQuery the blockchain without the need to spin up your own Cardano node. All powered by \u003ca href=\"https://blockfrost.io\"\u003eBlockfrost API\u003c/a\u003e.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#setup\"\u003eSetup\u003c/a\u003e •\n  \u003ca href=\"#commands\"\u003eCommands\u003c/a\u003e •\n  \u003ca href=\"#cardano-cli-compatibility\"\u003eCardano CLI compatibility\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n## Installation\n\n### npm\n\nIf you have Node.js installed the fastest way to install the CLI is directly with npm. For instructions for installing Node.js please see [nodejs.org](https://nodejs.org/en/download/). Although the CLI should run on Node.js v14 just fine, we recommend v16 which is active LTS.\n\n```console\nnpm install -g @blockfrost/blockfrost-cardano-cli\n```\n\nAfter the installation is completed new commands `blockfrost-cardano-cli` and its shorter alias `bcc` should be available.\n\n### Docker\n\nBuild the docker container by running following command within the repository:\n\n```console\ndocker build . -t blockfrost-cardano-cli --no-cache\n```\n\nThen run `docker run` with `--env` flag to pass environment variables into a docker container:\n\n```console\ndocker run --env BLOCKFROST_PROJECT_ID_MAINNET=\u003cPROJECT_ID\u003e blockfrost-cardano-cli --help\n```\n\n## Setup\n\nIn order to use Blockfrost Cardano CLI you first need generate project token(s) on [Blockfrost.io](https://blockfrost.io).\n\nThen set following environment variables:\n\n- `BLOCKFROST_PROJECT_ID_MAINNET` - Mainnet token that will be used if you don't specify `--testnet` flag\n- `BLOCKFROST_PROJECT_ID_TESTNET` - Testnet token that will be used when `--testnet` or `--testnet-magic 1097911063` flag is specified (legacy Cardano Testnet network)\n- `BLOCKFROST_PROJECT_ID_PREPROD` - Testnet token that will be used when `--testnet-magic 1` flag is specified (Cardano Preprod network)\n- `BLOCKFROST_PROJECT_ID_PREVIEW` - Testnet token that will be used when `--testnet-magic 2` flag is specified (Cardano Preview network)\n\nWe recommend setting both of these variables as it allows you to seamlessly switch between mainnet and testnet network while using the CLI.\n\n## Usage\n\n```console\n$ bcc \u003cCOMMAND\u003e [--testnet | --testnet-magic 1 | --testnet-magic 2 | --testnet-magic 1097911063] [--out-file FILE] [--help]\n```\n\n### Commands\n\nIf you have `cardano-cli` in `PATH` environment variable it will be automatically detected and commands that are not directly supported by blockfrost-cardano-cli will be passed to cardano-cli.\n\n#### `bcc query tip`\n\nGet the current tip\n\n```console\n$ bcc query tip --testnet\n\n{\n    \"epoch\": 171,\n    \"hash\": \"d91bbfb72158eed4949663abbc20ce70dcc1a5c4d8855b6db46f6cd9c061dce5\",\n    \"slot\": 43922944,\n    \"block\": 3115492,\n    \"era\": \"Alonzo\",\n    \"syncProgress\": \"100.00\"\n}\n```\n\n#### `bcc query utxo --address`\n\nGet the current UTXO set filtered by an address.\n\n```console\n$ bcc query utxo --address addr1q9cn7sh5tgxj5xazsnj7pqfn2nrltnqzh268arnp5a273av8q0pkxxvsh4v5jc4lwz5ccdxh892g73ns65xj5vvqsa3s93g77p\n\n TxHash                                                           TxIx   Amount\n ──────────────────────────────────────────────────────────────── ────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n 61d47e568b1502064906e977aae848c7aec9a76f97e7d11ad5d752e95c438011 0      1379280 lovelace + 1 e5a2bcc51466942a9db1da62471a1b682bde3abcebafee2c7fb1e378.415254494643544d4f4f4e32353437\n ac1d8802a4e100d90ce59fb4e4573f1c7884a65197ff39810a88eb0b07de3aa6 0      30000000 lovelace\n 69818d49963ffafe8a287ec270d05ba89493de33ddf7b5b9bcb07e97802a0f28 1      5573009 lovelace\n fba1526c49684722199b102bffd5b4a66ea1d490605532753fa24e12af925722 0      5000000 lovelace\n```\n\n#### `bcc query stake-address-info --address`\n\nGet the current delegations and reward balance filtered by stake address.\n\n```console\n$ bcc query stake-address-info --address stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692 --testnet\n\n[\n    {\n        \"address\": \"stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692\",\n        \"rewardAccountBalance\": 0,\n        \"delegation\": null\n    }\n]\n```\n\n#### `bcc transaction submit --tx-file FILE`\n\n```console\n$ bcc transaction submit --tx-file /tmp/mytx --testnet\n\nTransaction successfully submitted.\n```\n\n#### `bcc query pool-params --stake-pool-id POOLID`\n\nList parameters of specified pool\n\n```console\n$ bcc query pool-params --stake-pool-id pool1y6chk7x7fup4ms9leesdr57r4qy9cwxuee0msan72x976a6u0nc --testnet\n\n{\n    \"poolParams\": {\n        \"publicKey\": \"26b17b78de4f035dc0bfce60d1d3c3a8085c38dcce5fb8767e518bed\",\n        \"cost\": 340000000,\n        \"metadata\": {\n            \"hash\": \"514e56dacc4f556ebc1d307473d0cf15d4cf0dc27169870e46a811625f09262e\",\n            \"url\": \"https://stakenuts.com/testnet.json\"\n        },\n        \"vrf\": \"db61b20aeb616dbc39ca36194e7a54d5cef5464c6e6d0d420cfa551f7dc43d64\",\n        \"owners\": [\n            \"13cf55d175ea848b87deb3e914febd7e028e2bf6534475d52fb9c3d0\"\n        ],\n        \"pledge\": 100000000000,\n        \"rewardAccount\": {\n            \"network\": \"Testnet\",\n            \"credential\": {\n                \"key hash\": \"13cf55d175ea848b87deb3e914febd7e028e2bf6534475d52fb9c3d0\"\n            }\n        },\n        \"margin\": 0.05,\n        \"relays\": [\n            {\n                \"single host name\": {\n                    \"port\": 3001,\n                    \"dnsName\": \"relays.testnet.stakenuts.com\"\n                }\n            }\n        ]\n    },\n    \"futurePoolParams\": null,\n    \"retiring\": null\n}\n```\n\n#### `bcc query protocol-parameters`\n\n```console\n$ bcc query protocol-parameters --testnet\n\n{\n    \"txFeePerByte\": 44,\n    \"minUTxOValue\": 34482,\n    \"decentralization\": 0,\n    \"utxoCostPerWord\": 34482,\n    \"stakePoolDeposit\": 500000000,\n    \"poolRetireMaxEpoch\": 18,\n    \"extraPraosEntropy\": null,\n    \"collateralPercentage\": 150,\n    \"stakePoolTargetNum\": 500,\n    \"maxBlockBodySize\": 73728,\n    \"minPoolCost\": 340000000,\n    \"maxTxSize\": 16384,\n    \"treasuryCut\": 0.2,\n    \"maxBlockExecutionUnits\": {\n        \"memory\": 50000000,\n        \"steps\": 40000000000\n    },\n    \"maxCollateralInputs\": 3,\n    \"maxValueSize\": 5000,\n    \"maxBlockHeaderSize\": 1100,\n    \"maxTxExecutionUnits\": {\n        \"memory\": 11250000,\n        \"steps\": 10000000000\n    },\n    \"costModels\": {},\n    \"protocolVersion\": {\n        \"minor\": 0,\n        \"major\": 6\n    },\n    \"txFeeFixed\": 155381,\n    \"stakeAddressDeposit\": 2000000,\n    \"monetaryExpansion\": 0.003,\n    \"poolPledgeInfluence\": 0.3,\n    \"executionUnitPrices\": {\n        \"priceSteps\": 0.0000721,\n        \"priceMemory\": 0.0577\n    }\n}\n```\n\n#### `bcc query stake-distribution`\n\nGet aggregated stake distribution sorted by pool ID (in hex).\n\n```console\n$ bcc query stake-distribution --testnet\n\n PoolId                                                   Stake frac\n ──────────────────────────────────────────────────────── ──────────\n pool1qqyjr9pcrv97gwrueunug829fs5znw6p2wxft3fvqkgu5f4qlrg 6.246e-3\n pool1qqfnw2fwajdnam7xsqhhrje5cgd8jcltzfrx655rd23eqlxjfef 2.983e-6\n pool1qquwwu6680fr72y4779r2kpc7mxtch8rp2uhuqcc7v9p6q4f7ph 2.178e-7\n pool1qptl80vq84xm28pt3t2lhpfzqag28csjhktxz5k6a74n260clmt 9.643e-8\n pool1qzlk4mdgauljhk9eq4m6jmxtjyyeyjgjj0wk7vfmvwxrx22ljgs 6.213e-3\n pool1qrfa3jrqptfj0kg5pef7fup6ta70pdf7e7vjcgpxtrtsvxxf7ze 2.957e-10\n pool1qrazx9r2jtepdefa7h830az933vexudt9rpn0t2vky95k5k97my 1.245e-4\n ...\n```\n\n## Cardano CLI compatibility\n\nWe have ported just those calls for which you would need to run your own `cardano-node`. Other calls, which do not require the `cardano-node`, such as key generation and signing etc., have not been ported. For these calls, you still need `cardano-cli` installed.\n\nIf you have `cardano-cli` in `PATH` environment variable it will be automatically detected and commands that are not directly supported by blockfrost-cardano-cli will be passed to cardano-cli.\n\nOutput of following commands should be compatible with `cardano-cli` (1.31.0) for all practical purposes. It is possible we have missed few things. If you encounter any problem while replacing cardano-cli with blockfrost-cardano-cli please open an issue.\n\n- `bcc query`\n  - `pool-params --stake-pool-id`\n  - `protocol-parameters`\n  - `tip`\n  - `stake-distribution`\n  - `stake-address-info --address`\n  - `utxo --address`\n- `bcc transaction`\n  - `submit --tx-file`\n\nAdditionally, all commands support `--out-file FILE`, `--mainnet`, `--testnet` or `--testnet-magic \u003c1097911063 | 1 | 2\u003e`.\n\n## Development\n\n`bcc` command won't work correctly while running from within repository. During development use the following\n\n```console\n$ ./bin/dev\n```\n\nor\n\n```console\n$ yarn dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfrost%2Fblockfrost-cardano-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockfrost%2Fblockfrost-cardano-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfrost%2Fblockfrost-cardano-cli/lists"}