BITCOIN-CLI(1)
π BITCOIN-CLI(1) β the manual page for bitcoin-cli v0.21.2.0 π
okay bestie, so you know how your terminal is like the main character and sometimes it just needs to talk to Bitcoin Core directly? that's literally what bitcoin-cli is for. it's the RPC client version v0.21.2.0 and it's giving "i'm the bridge between you and your node" energy. periodt.
β¨ SYNOPSIS β¨
like, here's every way you can slide into its DMs:
bitcoin-cli [options] <command> [params] Send command to Bitcoin Core
bitcoin-cli [options] -named <command> [name=value]... Send command to
Bitcoin Core (with named arguments)
bitcoin-cli [options] help List commands
bitcoin-cli [options] help <command> Get help for a command
πΈ DESCRIPTION πΈ
Bitcoin Core RPC client version v0.21.2.0. that's it. that's the vibe. it's the little client that could, and it's highkey iconic for it π
π OPTIONS π
-?β prints this help message and dips. simple. effective. we love a low-effort icon.-conf=<file>β tells it where your config file lives. relative paths get prefixed by the datadir location, so no need to spell out the whole path like a try-hard. (default:bitcoin.conf)-datadir=<dir>β where all your data lives. you know, the whole "home is where the blockchain is" situation.-generateβ generates blocks immediately, which is equivalent to RPCgeneratenewaddressfollowed by RPCgeneratetoaddress. you can optionally pass positional integer arguments: number of blocks to generate (default:1) and maximum iterations to try (default:1000000). this is literally equivalent to the RPCgeneratetoaddressnblocksandmaxtriesarguments. example, bestie:
bitcoin-cli -generate 4 1000
-getinfoβ grabs general information from the remote server. but okay, heads up: unlike server-side RPC calls, the results of-getinfoare the result of multiple non-atomic requests. so some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported). it's giving "slightly chaotic screenshot of the vibes" energy, not a perfectly synced moment in time. ngl, still super useful tho.-namedβ passes named instead of positional arguments (default:false). it's the difference between "hey you, do the thing" and "hey you, do the thing wherename=value." so much more readable.-netinfoβ gets network peer connection information from the remote server. an optional integer argument from0to4can be passed for different peers listings (default:0). yes queen, give us those tiers of tea.-rpcclienttimeout=<n>β timeout in seconds during HTTP requests, or0for no timeout at all. no timeout is giving "i have all the time in the world" energy, but maybe don't. (default:900)-rpcconnect=<ip>β sends commands to the node running on<ip>(default:127.0.0.1). it's the "sending a text to your bestie who's literally right next to you" of network configs.-rpccookiefile=<loc>β location of the auth cookie. relative paths will be prefixed by a net-specific datadir location. (default: data dir). it's the secret snack that proves you belong. πͺ-rpcpassword=<pw>β password for JSON-RPC connections. keep it cute, keep it secret, keep it safe.-rpcport=<port>β connects to JSON-RPC on<port>. the defaults are:8332, testnet:18332, signet:38332, regtest:18443. pick your portal, bestie.-rpcuser=<user>β username for JSON-RPC connections. you're not just anybody, you're somebody.-rpcwaitβ waits for the RPC server to start. it's the "i'll wait for you to be ready, no pressure" friend. π«Ά-rpcwallet=<walletname>β sends RPC for a non-default wallet on the RPC server. this needs to exactly match the corresponding-walletoption passed tobitcoind. it changes the RPC endpoint used, e.g.http://127.0.0.1:8332/wallet/<walletname>. so yes, spelling matters, this is not a drill. π¨-stdinβ reads extra arguments from standard input, one per line untilEOF/Ctrl-D. highly recommended for sensitive information such as passphrases (so they don't end up in your shell history like a lil gossip). when combined with-stdinrpcpass, the first line from standard input is used for the RPC password.-stdinrpcpassβ reads the RPC password from standard input as a single line. when combined with-stdin, the first line from standard input is used for the RPC password. when combined with-stdinwalletpassphrase,-stdinrpcpassconsumes the first line, and-stdinwalletpassphraseconsumes the second. it's giving "line up, besties, one at a time."-stdinwalletpassphraseβ reads the wallet passphrase from standard input as a single line. when combined with-stdin, the first line from standard input is used for the wallet passphrase. no cap, this is the safe way to do it.-versionβ prints the version and exits. it's the "who am i? where am i? what year is it?" but make it software.
π§ Debugging/Testing options
(literally no extra options listed under this heading in the original, so we're not gonna invent any. the audacity of this section to be empty, icl. but we respect it. π)
βοΈ Chain selection options βοΈ
-chain=<chain>β uses the chain<chain>(default:main). allowed values:main,test,signet,regtest. choose your fighter.-signetβ uses the signet chain. equivalent to-chain=signet. note that the network is defined by the-signetchallengeparameter. it's a whole separate vibe and it's lowkey exclusive.-signetchallengeβ blocks must satisfy the given script to be considered valid (only for signet networks; defaults to the global default signet test network challenge). it's the bouncer at the club checking IDs. no valid script, no entry.-signetseednodeβ specifies a seed node for the signet network, inhostname[:port]format, e.g.sig.net:1234. may be used multiple times to specify multiple seed nodes (defaults to the global default signet test network seed node(s)). it's the "mutuals" of the signet world.-testnetβ uses the test chain. equivalent to-chain=test. it's main character energy but, like, rehearsal main character energy.
π COPYRIGHT π
Copyright (C) 2009-2020 The Bitcoin Core developers. besties have been grinding on this for a minute.
please contribute if you find Bitcoin Core useful. visit <https://bitcoincore.org/> for further information about the software. the source code is available from <https://github.com/bitcoin/bitcoin>. get in, we're going contributing. π«Ά
β οΈ this is experimental software. distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT>. so like, it's amazing, but also, it's experimental, so maybe don't base your entire life savings on it without reading the fine print. slay responsibly. π
that's the whole thing, bestie! go forth and talk to your node. you got this. β¨
bitcoin-cli v0.21.2.0 β August 2021 β BITCOIN-CLI(1) π¦ mwah, ily, now go run some RPCs.
π¦ where this page comes from
- nixpkgs unstable: vertcoin 0.18.0
- nixpkgs unstable: vertcoind 0.18.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms