Skip to content

Commit eeb9cc1

Browse files
committed
Update manpages, shell completion, and example bitcoin.conf
2 parents 8a0a4c3 + 271fd20 commit eeb9cc1

File tree

9 files changed

+957
-170
lines changed

9 files changed

+957
-170
lines changed

contrib/completions/bash/bitcoin-cli.bash

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
# bash programmable completion for bitcoin-cli(1)
2-
# Copyright (c) 2012-2022 The Bitcoin Core developers
1+
# Dynamic bash programmable completion for bitcoin-cli(1)
2+
# DO NOT EDIT THIS FILE BY HAND -- THIS WILL FAIL THE FUNCTIONAL TEST tool_cli_completion
3+
# This file is auto-generated by the functional test tool_cli_completion.
4+
# If you want to modify this file, modify test/functional/tool_cli_completion.py and re-autogenerate
5+
# this file via the --overwrite test flag.
6+
7+
# Copyright (c) 2012-2024 The Bitcoin Core developers
38
# Distributed under the MIT software license, see the accompanying
49
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
510

@@ -30,65 +35,63 @@ _bitcoin_cli() {
3035

3136
if ((cword > 5)); then
3237
case ${words[cword-5]} in
33-
sendtoaddress)
34-
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
38+
descriptorprocesspsbt)
39+
COMPREPLY=( $( compgen -W "false true" -- "$cur" ) )
3540
return 0
3641
;;
3742
esac
3843
fi
3944

4045
if ((cword > 4)); then
4146
case ${words[cword-4]} in
42-
importaddress|listtransactions|setban)
43-
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
47+
createpsbt|createrawtransaction|descriptorprocesspsbt|setban)
48+
COMPREPLY=( $( compgen -W "false true" -- "$cur" ) )
4449
return 0
4550
;;
46-
signrawtransactionwithkey|signrawtransactionwithwallet)
47-
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
51+
signrawtransactionwithkey)
52+
COMPREPLY=( $( compgen -W "ALL ALL|ANYONECANPAY NONE NONE|ANYONECANPAY SINGLE SINGLE|ANYONECANPAY" -- "$cur" ) )
4853
return 0
4954
;;
5055
esac
5156
fi
5257

5358
if ((cword > 3)); then
5459
case ${words[cword-3]} in
55-
addmultisigaddress)
56-
return 0
57-
;;
58-
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
59-
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
60+
addnode|converttopsbt|getdescriptoractivity|gettxout|gettxoutsetinfo)
61+
COMPREPLY=( $( compgen -W "false true" -- "$cur" ) )
6062
return 0
6163
;;
6264
esac
6365
fi
6466

6567
if ((cword > 2)); then
6668
case ${words[cword-2]} in
69+
converttopsbt|decoderawtransaction|finalizepsbt|getblockheader|getmempoolancestors|getmempooldescendants|getrawmempool|listmempooltransactions)
70+
COMPREPLY=( $( compgen -W "false true" -- "$cur" ) )
71+
return 0
72+
;;
6773
addnode)
68-
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
74+
COMPREPLY=( $( compgen -W "add onetry remove" -- "$cur" ) )
6975
return 0
7076
;;
7177
setban)
7278
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
7379
return 0
7480
;;
75-
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listreceivedbyaddress|sendrawtransaction)
76-
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
81+
estimatesmartfee)
82+
COMPREPLY=( $( compgen -W "CONSERVATIVE ECONOMICAL UNSET" -- "$cur" ) )
7783
return 0
7884
;;
7985
esac
8086
fi
8187

8288
case "$prev" in
83-
backupwallet|dumpwallet|importwallet)
89+
dumptxoutset|importmempool|loadtxoutset)
8490
_filedir
8591
return 0
8692
;;
87-
getaddednodeinfo|getrawmempool|lockunspent)
88-
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
89-
return 0
90-
;;
91-
getbalance|getnewaddress|listtransactions|sendmany)
93+
getrawmempool|setnetworkactive|setscriptthreadsenabled)
94+
COMPREPLY=( $( compgen -W "false true" -- "$cur" ) )
9295
return 0
9396
;;
9497
esac
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
#compdef bitcoin-cli
2+
# zsh completion for bitcoin-cli(1)
3+
# DO NOT EDIT THIS FILE BY HAND -- THIS WILL FAIL THE FUNCTIONAL TEST tool_cli_completion
4+
# This file is auto-generated by the functional test tool_cli_completion.
5+
# If you want to modify this file, modify test/functional/tool_cli_completion.py and re-autogenerate
6+
# this file via the --overwrite test flag.
7+
8+
# Copyright (c) 2012-2024 The Bitcoin Core developers
9+
# Distributed under the MIT software license, see the accompanying
10+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
11+
12+
# call bitcoin-cli for RPC
13+
_bitcoin_rpc() {
14+
# determine already specified args necessary for RPC
15+
local rpcargs=()
16+
local -a words_array
17+
words_array=(${(z)BUFFER})
18+
19+
for i in $words_array; do
20+
case "$i" in
21+
-conf=*|-datadir=*|-regtest|-rpc*|-testnet|-testnet4)
22+
rpcargs+=("$i")
23+
;;
24+
esac
25+
done
26+
27+
$bitcoin_cli "${rpcargs[@]}" "$@"
28+
}
29+
30+
_bitcoin-cli() {
31+
local context state line
32+
local bitcoin_cli="$words[1]"
33+
34+
if (( CURRENT > 6 )); then
35+
case ${words[CURRENT-5]} in
36+
descriptorprocesspsbt)
37+
_values 'arg' 'false' 'true'
38+
return 0
39+
;;
40+
esac
41+
fi
42+
43+
if (( CURRENT > 5 )); then
44+
case ${words[CURRENT-4]} in
45+
createpsbt|createrawtransaction|descriptorprocesspsbt|setban)
46+
_values 'arg' 'false' 'true'
47+
return 0
48+
;;
49+
signrawtransactionwithkey)
50+
_values 'arg' 'ALL' 'ALL|ANYONECANPAY' 'NONE' 'NONE|ANYONECANPAY' 'SINGLE' 'SINGLE|ANYONECANPAY'
51+
return 0
52+
;;
53+
esac
54+
fi
55+
56+
if (( CURRENT > 4 )); then
57+
case ${words[CURRENT-3]} in
58+
addnode|converttopsbt|getdescriptoractivity|gettxout|gettxoutsetinfo)
59+
_values 'arg' 'false' 'true'
60+
return 0
61+
;;
62+
esac
63+
fi
64+
65+
if (( CURRENT > 3 )); then
66+
case ${words[CURRENT-2]} in
67+
converttopsbt|decoderawtransaction|finalizepsbt|getblockheader|getmempoolancestors|getmempooldescendants|getrawmempool|listmempooltransactions)
68+
_values 'arg' 'false' 'true'
69+
return 0
70+
;;
71+
addnode)
72+
_values 'arg' 'add' 'onetry' 'remove'
73+
return 0
74+
;;
75+
setban)
76+
_values 'arg' 'add' 'remove'
77+
return 0
78+
;;
79+
estimatesmartfee)
80+
_values 'arg' 'CONSERVATIVE' 'ECONOMICAL' 'UNSET'
81+
return 0
82+
;;
83+
esac
84+
fi
85+
86+
# Handle previous word completions
87+
case "${words[CURRENT-1]}" in
88+
dumptxoutset|importmempool|loadtxoutset)
89+
_files
90+
return 0
91+
;;
92+
getrawmempool|setnetworkactive|setscriptthreadsenabled)
93+
_values 'arg' 'false' 'true'
94+
return 0
95+
;;
96+
esac
97+
# Handle current word completions
98+
case "$words[CURRENT]" in
99+
-conf=*)
100+
local conf_path=${words[CURRENT]#-conf=}
101+
_files -W ${conf_path:h} -g "*"
102+
return 0
103+
;;
104+
-datadir=*)
105+
local datadir_path=${words[CURRENT]#-datadir=}
106+
_files -/ -W ${datadir_path:h}
107+
return 0
108+
;;
109+
-*=*)
110+
# prevent nonsense completions
111+
return 0
112+
;;
113+
*)
114+
local helpopts commands
115+
local -a opts
116+
117+
# only parse -help if sensible (empty or starts with -)
118+
if [[ -z "$words[CURRENT]" || "$words[CURRENT]" == -* ]]; then
119+
helpopts="$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }')"
120+
opts+=(${(f)helpopts})
121+
fi
122+
123+
# only parse help if sensible (empty or starts with letter)
124+
if [[ -z "$words[CURRENT]" || "$words[CURRENT]" == [a-z]* ]]; then
125+
commands="$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')"
126+
opts+=(${(f)commands})
127+
fi
128+
129+
_describe 'bitcoin-cli options and commands' opts
130+
131+
return 0
132+
;;
133+
esac
134+
}
135+
136+
# Function is now defined and will be called by zsh completion system
137+
138+
# Local variables:
139+
# mode: shell-script
140+
# sh-basic-offset: 4
141+
# sh-indent-comment: t
142+
# indent-tabs-mode: nil
143+
# End:
144+
# ex: ts=4 sw=4 et filetype=sh

doc/man/bitcoin-cli.1

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH BITCOIN-CLI "1" "October 2025" "bitcoin-cli v29.2.0" "User Commands"
2+
.TH BITCOIN-CLI "1" "October 2025" "bitcoin-cli v29.2.0.knots20251010" "User Commands"
33
.SH NAME
4-
bitcoin-cli \- manual page for bitcoin-cli v29.2.0
4+
bitcoin-cli \- manual page for bitcoin-cli v29.2.0.knots20251010
55
.SH SYNOPSIS
66
.B bitcoin-cli
77
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR]
@@ -15,11 +15,11 @@ bitcoin-cli \- manual page for bitcoin-cli v29.2.0
1515
.B bitcoin-cli
1616
[\fI\,options\/\fR] \fI\,help <command>\/\fR
1717
.SH DESCRIPTION
18-
Bitcoin Core RPC client version v29.2.0
18+
Bitcoin Knots RPC client version v29.2.0.knots20251010
1919
.PP
20-
The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server.
20+
The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Knots RPC server.
2121
.PP
22-
It can be used to query network information, manage wallets, create or broadcast transactions, and control the Bitcoin Core server.
22+
It can be used to query network information, manage wallets, create or broadcast transactions, and control the Bitcoin Knots server.
2323
.PP
2424
Use the "help" command to list all commands. Use "help <command>" to show help for that command.
2525
The \fB\-named\fR option allows you to specify parameters using the key=value format, eliminating the need to pass unused positional parameters.
@@ -37,6 +37,12 @@ and OS is not WIN32), never. Only applies to the output of
3737
Specify configuration file. Relative paths will be prefixed by datadir
3838
location. (default: bitcoin.conf)
3939
.HP
40+
\fB\-confrw=\fR<file>
41+
.IP
42+
Specify read/write configuration file. Relative paths will be prefixed
43+
by the network\-specific datadir location. (default:
44+
bitcoin_rw.conf)
45+
.HP
4046
\fB\-datadir=\fR<dir>
4147
.IP
4248
Specify data directory
@@ -131,6 +137,12 @@ testnet4, signet, regtest
131137
Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network
132138
is defined by the \fB\-signetchallenge\fR parameter
133139
.HP
140+
\fB\-signetblocktime\fR
141+
.IP
142+
Difficulty adjustment will target a block time of the given amount in
143+
seconds (only for custom signet networks, must have
144+
\fB\-signetchallenge\fR set; defaults to 10 minutes)
145+
.HP
134146
\fB\-signetchallenge\fR
135147
.IP
136148
Blocks must satisfy the given script to be considered valid (only for
@@ -173,11 +185,12 @@ nblocks and maxtries arguments. Example: bitcoin\-cli \fB\-generate\fR 4
173185
.HP
174186
\fB\-getinfo\fR
175187
.IP
176-
Get general information from the remote server. Note that unlike
177-
server\-side RPC calls, the output of \fB\-getinfo\fR is the result of
178-
multiple non\-atomic requests. Some entries in the output may
179-
represent results from different states (e.g. wallet balance may
180-
be as of a different block from the chain state reported)
188+
Get general information from the remote server, including the total
189+
balance and the balances of each loaded wallet when in
190+
multiwallet mode. Note that \fB\-getinfo\fR is the combined result of
191+
several RPCs (getnetworkinfo, getblockchaininfo, getwalletinfo,
192+
getbalances, and in multiwallet mode, listwallets), each with
193+
potentially different state.
181194
.HP
182195
\fB\-netinfo\fR
183196
.IP
@@ -188,14 +201,15 @@ additional "outonly" (or "o") argument can be passed to see
188201
outbound peers only. Pass "help" (or "h") for detailed help
189202
documentation.
190203
.SH COPYRIGHT
204+
Copyright (C) 2009-2025 The Bitcoin Knots developers
191205
Copyright (C) 2009-2025 The Bitcoin Core developers
192206

193-
Please contribute if you find Bitcoin Core useful. Visit
194-
<https://bitcoincore.org/> for further information about the software.
195-
The source code is available from <https://github.com/bitcoin/bitcoin>.
207+
Please contribute if you find Bitcoin Knots useful. Visit
208+
<https://bitcoinknots.org/> for further information about the software.
209+
The source code is available from <https://github.com/bitcoinknots/bitcoin>.
196210

197211
This is experimental software.
198212
Distributed under the MIT software license, see the accompanying file COPYING
199213
or <https://opensource.org/licenses/MIT>
200214
.SH "SEE ALSO"
201-
bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1)
215+
bitcoind(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1)

0 commit comments

Comments
 (0)