diff --git a/docs/404.html b/docs/404.html
index 285a7053a..d7554115d 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -32,7 +32,7 @@
-
+
@@ -295,7 +295,7 @@
-
+
diff --git a/docs/cli/index.html b/docs/cli/index.html
index 880591af8..5c7dee6a9 100644
--- a/docs/cli/index.html
+++ b/docs/cli/index.html
@@ -32,7 +32,7 @@
-
+
@@ -2482,7 +2482,7 @@ Returns:
-
+
diff --git a/docs/index.html b/docs/index.html
index 3a27aad61..87e403ec6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -32,7 +32,7 @@
-
+
@@ -2218,7 +2218,7 @@ Returns:
-
+
diff --git a/scripts/docs_build/cli.md b/scripts/docs_build/cli.md
new file mode 100644
index 000000000..b329f5617
--- /dev/null
+++ b/scripts/docs_build/cli.md
@@ -0,0 +1,1467 @@
+# LBRY JSON-RPC API Documentation
+
+## blob_announce
+
+```text
+Announce blobs to the DHT
+
+Usage:
+ blob_announce [--announce_all] [ | --blob_hash=]
+ [ | --stream_hash=]
+ [ | --sd_hash=]
+
+
+Options:
+ --announce_all= : (bool) announce all the blobs possessed by user
+ --blob_hash= : (str) announce a blob, specified by blob_hash
+ --stream_hash= : (str) announce all blobs associated with
+ stream_hash
+ --sd_hash= : (str) announce all blobs associated with
+ sd_hash and the sd_hash itself
+
+Returns:
+ (bool) true if successful
+```
+
+## blob_availability
+
+```text
+Get blob availability
+
+Usage:
+ blob_availability () [ | --search_timeout=]
+ [ | --blob_timeout=]
+
+
+Options:
+ --blob_hash= : (str) check availability for this blob hash
+ --search_timeout= : (int) how long to search for peers for the blob
+ in the dht
+ --blob_timeout= : (int) how long to try downloading from a peer
+
+Returns:
+ (dict) {
+ "is_available":
+ "reachable_peers": [":"],
+ "unreachable_peers": [":"]
+ }
+```
+
+## blob_delete
+
+```text
+Delete a blob
+
+Usage:
+ blob_delete ( | --blob_hash= : (str) blob hash of the blob to delete
+
+Returns:
+ (str) Success/fail message
+```
+
+## blob_get
+
+```text
+Download and return a blob
+
+Usage:
+ blob_get ( | --blob_hash=) [--timeout=]
+ [--encoding=] [--payment_rate_manager=]
+
+
+Options:
+ --blob_hash= : (str) blob hash of the blob to get
+ --timeout= : (int) timeout in number of seconds
+ --encoding= : (str) by default no attempt at decoding
+ is made, can be set to one of the
+ following decoders:
+ 'json'
+ --payment_rate_manager= : (str) if not given the default payment rate
+ manager will be used.
+ supported alternative rate managers:
+ 'only-free'
+
+Returns:
+ (str) Success/Fail message or (dict) decoded data
+```
+
+## blob_list
+
+```text
+Returns blob hashes. If not given filters, returns all blobs known by the blob manager
+
+Usage:
+ blob_list [--needed] [--finished] [ | --uri=]
+ [ | --stream_hash=]
+ [ | --sd_hash=]
+ [ | --page_size=]
+ [ | --page=]
+
+
+Options:
+ --needed : (bool) only return needed blobs
+ --finished : (bool) only return finished blobs
+ --uri= : (str) filter blobs by stream in a uri
+ --stream_hash= : (str) filter blobs by stream hash
+ --sd_hash= : (str) filter blobs by sd hash
+ --page_size= : (int) results page size
+ --page= : (int) page of results to return
+
+Returns:
+ (list) List of blob hashes
+```
+
+## blob_reflect_all
+
+```text
+Reflects all saved blobs
+
+Usage:
+ blob_reflect_all
+
+
+Options:
+ None
+
+Returns:
+ (bool) true if successful
+```
+
+## block_show
+
+```text
+Get contents of a block
+
+Usage:
+ block_show ( | --blockhash=) | ( | --height=)
+
+
+Options:
+ --blockhash= : (str) hash of the block to look up
+ --height= : (int) height of the block to look up
+
+Returns:
+ (dict) Requested block
+```
+
+## channel_export
+
+```text
+Export serialized channel signing information for a given certificate claim id
+
+Usage:
+ channel_export ( | --claim_id=)
+
+
+Options:
+ --claim_id= : (str) Claim ID to export information about
+
+Returns:
+ (str) Serialized certificate information
+```
+
+## channel_import
+
+```text
+Import serialized channel signing information (to allow signing new claims to the channel)
+
+Usage:
+ channel_import ( |
+ --serialized_certificate_info=)
+
+
+Options:
+ --serialized_certificate_info= : (str) certificate info
+
+Returns:
+ (dict) Result dictionary
+```
+
+## channel_list
+
+```text
+Get certificate claim infos for channels that can be published to
+
+Usage:
+ channel_list
+
+
+Options:
+ None
+
+Returns:
+ (list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim
+ is in the wallet.
+```
+
+## channel_new
+
+```text
+Generate a publisher key and create a new '@' prefixed certificate claim
+
+Usage:
+ channel_new ( | --channel_name=)
+ ( | --amount=)
+
+
+Options:
+ --channel_name= : (str) name of the channel prefixed with '@'
+ --amount= : (float) bid amount on the channel
+
+Returns:
+ (dict) Dictionary containing result of the claim
+ {
+ 'tx' : (str) hex encoded transaction
+ 'txid' : (str) txid of resulting claim
+ 'nout' : (int) nout of the resulting claim
+ 'fee' : (float) fee paid for the claim transaction
+ 'claim_id' : (str) claim ID of the resulting claim
+ }
+```
+
+## claim_abandon
+
+```text
+Abandon a name and reclaim credits from the claim
+
+Usage:
+ claim_abandon [ | --claim_id=]
+ [ | --txid=] [ | --nout=]
+
+
+Options:
+ --claim_id= : (str) claim_id of the claim to abandon
+ --txid= : (str) txid of the claim to abandon
+ --nout= : (int) nout of the claim to abandon
+
+Returns:
+ (dict) Dictionary containing result of the claim
+ {
+ txid : (str) txid of resulting transaction
+ fee : (float) fee paid for the transaction
+ }
+```
+
+## claim_list
+
+```text
+List current claims and information about them for a given name
+
+Usage:
+ claim_list ( | --name=)
+
+
+Options:
+ --name= : (str) name of the claim to list info about
+
+Returns:
+ (dict) State of claims assigned for the name
+ {
+ 'claims': (list) list of claims for the name
+ [
+ {
+ 'amount': (float) amount assigned to the claim
+ 'effective_amount': (float) total amount assigned to the claim,
+ including supports
+ 'claim_id': (str) claim ID of the claim
+ 'height': (int) height of block containing the claim
+ 'txid': (str) txid of the claim
+ 'nout': (int) nout of the claim
+ 'permanent_url': (str) permanent url of the claim,
+ 'supports': (list) a list of supports attached to the claim
+ 'value': (str) the value of the claim
+ },
+ ]
+ 'supports_without_claims': (list) supports without any claims attached to them
+ 'last_takeover_height': (int) the height of last takeover for the name
+ }
+```
+
+## claim_list_by_channel
+
+```text
+Get paginated claims in a channel specified by a channel uri
+
+Usage:
+ claim_list_by_channel ( | --uri=) [...] [--page=]
+ [--page_size=]
+
+
+Options:
+ --uri= : (str) uri of the channel
+ --uris= : (list) uris of the channel
+ --page= : (int) which page of results to return where page 1 is the first
+ page, defaults to no pages
+ --page_size= : (int) number of results in a page, default of 10
+
+Returns:
+ {
+ resolved channel uri: {
+ If there was an error:
+ 'error': (str) error message
+
+ 'claims_in_channel': the total number of results for the channel,
+
+ If a page of results was requested:
+ 'returned_page': page number returned,
+ 'claims_in_channel': [
+ {
+ 'absolute_channel_position': (int) claim index number in sorted list of
+ claims which assert to be part of the
+ channel
+ 'address': (str) claim address,
+ 'amount': (float) claim amount,
+ 'effective_amount': (float) claim amount including supports,
+ 'claim_id': (str) claim id,
+ 'claim_sequence': (int) claim sequence number,
+ 'decoded_claim': (bool) whether or not the claim value was decoded,
+ 'height': (int) claim height,
+ 'depth': (int) claim depth,
+ 'has_signature': (bool) included if decoded_claim
+ 'name': (str) claim name,
+ 'supports: (list) list of supports [{'txid': (str) txid,
+ 'nout': (int) nout,
+ 'amount': (float) amount}],
+ 'txid': (str) claim txid,
+ 'nout': (str) claim nout,
+ 'signature_is_valid': (bool), included if has_signature,
+ 'value': ClaimDict if decoded, otherwise hex string
+ }
+ ],
+ }
+ }
+```
+
+## claim_list_mine
+
+```text
+List my name claims
+
+Usage:
+ claim_list_mine
+
+
+Options:
+ None
+
+Returns:
+ (list) List of name claims owned by user
+ [
+ {
+ 'address': (str) address that owns the claim
+ 'amount': (float) amount assigned to the claim
+ 'blocks_to_expiration': (int) number of blocks until it expires
+ 'category': (str) "claim", "update" , or "support"
+ 'claim_id': (str) claim ID of the claim
+ 'confirmations': (int) number of blocks of confirmations for the claim
+ 'expiration_height': (int) the block height which the claim will expire
+ 'expired': (bool) true if expired, false otherwise
+ 'height': (int) height of the block containing the claim
+ 'is_spent': (bool) true if claim is abandoned, false otherwise
+ 'name': (str) name of the claim
+ 'permanent_url': (str) permanent url of the claim,
+ 'txid': (str) txid of the cliam
+ 'nout': (int) nout of the claim
+ 'value': (str) value of the claim
+ },
+ ]
+```
+
+## claim_new_support
+
+```text
+Support a name claim
+
+Usage:
+ claim_new_support ( | --name=) ( | --claim_id=)
+ ( | --amount=)
+
+
+Options:
+ --name= : (str) name of the claim to support
+ --claim_id= : (str) claim_id of the claim to support
+ --amount= : (float) amount of support
+
+Returns:
+ (dict) Dictionary containing result of the claim
+ {
+ txid : (str) txid of resulting support claim
+ nout : (int) nout of the resulting support claim
+ fee : (float) fee paid for the transaction
+ }
+```
+
+## claim_renew
+
+```text
+Renew claim(s) or support(s)
+
+Usage:
+ claim_renew ( | --outpoint=) | ( | --height=)
+
+
+Options:
+ --outpoint= : (str) outpoint of the claim to renew
+ --height= : (str) update claims expiring before or at this block height
+
+Returns:
+ (dict) Dictionary where key is the the original claim's outpoint and
+ value is the result of the renewal
+ {
+ outpoint:{
+
+ 'tx' : (str) hex encoded transaction
+ 'txid' : (str) txid of resulting claim
+ 'nout' : (int) nout of the resulting claim
+ 'fee' : (float) fee paid for the claim transaction
+ 'claim_id' : (str) claim ID of the resulting claim
+ },
+ }
+```
+
+## claim_send_to_address
+
+```text
+Send a name claim to an address
+
+Usage:
+ claim_send_to_address ( | --claim_id=)
+ ( | --address=)
+ [ | --amount=]
+
+
+Options:
+ --claim_id= : (str) claim_id to send
+ --address= : (str) address to send the claim to
+ --amount : (int) Amount of credits to claim name for, defaults to the current amount
+ on the claim
+
+Returns:
+ (dict) Dictionary containing result of the claim
+ {
+ 'tx' : (str) hex encoded transaction
+ 'txid' : (str) txid of resulting claim
+ 'nout' : (int) nout of the resulting claim
+ 'fee' : (float) fee paid for the claim transaction
+ 'claim_id' : (str) claim ID of the resulting claim
+ }
+```
+
+## claim_show
+
+```text
+Resolve claim info from txid/nout or with claim ID
+
+Usage:
+ claim_show [ | --txid=] [ | --nout=]
+ [ | --claim_id=]
+
+
+Options:
+ --txid= : (str) look for claim with this txid, nout must
+ also be specified
+ --nout= : (int) look for claim with this nout, txid must
+ also be specified
+ --claim_id= : (str) look for claim with this claim id
+
+Returns:
+ (dict) Dictionary containing claim info as below,
+
+ {
+ 'txid': (str) txid of claim
+ 'nout': (int) nout of claim
+ 'amount': (float) amount of claim
+ 'value': (str) value of claim
+ 'height' : (int) height of claim takeover
+ 'claim_id': (str) claim ID of claim
+ 'supports': (list) list of supports associated with claim
+ }
+
+ if claim cannot be resolved, dictionary as below will be returned
+
+ {
+ 'error': (str) reason for error
+ }
+```
+
+## cli_test_command
+
+```text
+This command is only for testing the CLI argument parsing
+Usage:
+ cli_test_command [--a_arg] [--b_arg] ( | --pos_arg=)
+ [...] [--pos_arg2=]
+ [--pos_arg3=]
+
+
+Options:
+ --a_arg : a arg
+ --b_arg : b arg
+ --pos_arg= : pos arg
+ --pos_args= : pos args
+ --pos_arg2= : pos arg 2
+ --pos_arg3= : pos arg 3
+
+Returns:
+ pos args
+```
+
+## commands
+
+```text
+Return a list of available commands
+
+Usage:
+ commands
+
+
+Options:
+ None
+
+Returns:
+ (list) list of available commands
+```
+
+## daemon_stop
+
+```text
+Stop lbrynet-daemon
+
+Usage:
+ daemon_stop
+
+
+Options:
+ None
+
+Returns:
+ (string) Shutdown message
+```
+
+## file_delete
+
+```text
+Delete a LBRY file
+
+Usage:
+ file_delete [--delete_from_download_dir] [--delete_all] [--sd_hash=] [--file_name=]
+ [--stream_hash=] [--rowid=] [--claim_id=] [--txid=]
+ [--nout=] [--claim_name=] [--channel_claim_id=]
+ [--channel_name=]
+
+
+Options:
+ --delete_from_download_dir : (bool) delete file from download directory,
+ instead of just deleting blobs
+ --delete_all : (bool) if there are multiple matching files,
+ allow the deletion of multiple files.
+ Otherwise do not delete anything.
+ --sd_hash= : (str) delete by file sd hash
+ --file_name : (str) delete by file name in downloads folder
+ --stream_hash= : (str) delete by file stream hash
+ --rowid= : (int) delete by file row id
+ --claim_id= : (str) delete by file claim id
+ --txid= : (str) delete by file claim txid
+ --nout= : (int) delete by file claim nout
+ --claim_name= : (str) delete by file claim name
+ --channel_claim_id= : (str) delete by file channel claim id
+ --channel_name= : (str) delete by file channel claim name
+
+Returns:
+ (bool) true if deletion was successful
+```
+
+## file_list
+
+```text
+List files limited by optional filters
+
+Usage:
+ file_list [--sd_hash=] [--file_name=] [--stream_hash=]
+ [--rowid=] [--claim_id=] [--outpoint=] [--txid=] [--nout=]
+ [--channel_claim_id=] [--channel_name=]
+ [--claim_name=] [--full_status]
+
+
+Options:
+ --sd_hash= : (str) get file with matching sd hash
+ --file_name= : (str) get file with matching file name in the
+ downloads folder
+ --stream_hash= : (str) get file with matching stream hash
+ --rowid= : (int) get file with matching row id
+ --claim_id= : (str) get file with matching claim id
+ --outpoint= : (str) get file with matching claim outpoint
+ --txid= : (str) get file with matching claim txid
+ --nout= : (int) get file with matching claim nout
+ --channel_claim_id= : (str) get file with matching channel claim id
+ --channel_name= : (str) get file with matching channel name
+ --claim_name= : (str) get file with matching claim name
+ --full_status : (bool) full status, populate the
+ 'message' and 'size' fields
+
+Returns:
+ (list) List of files
+
+ [
+ {
+ 'completed': (bool) true if download is completed,
+ 'file_name': (str) name of file,
+ 'download_directory': (str) download directory,
+ 'points_paid': (float) credit paid to download file,
+ 'stopped': (bool) true if download is stopped,
+ 'stream_hash': (str) stream hash of file,
+ 'stream_name': (str) stream name ,
+ 'suggested_file_name': (str) suggested file name,
+ 'sd_hash': (str) sd hash of file,
+ 'download_path': (str) download path of file,
+ 'mime_type': (str) mime type of file,
+ 'key': (str) key attached to file,
+ 'total_bytes': (int) file size in bytes, None if full_status is false,
+ 'written_bytes': (int) written size in bytes,
+ 'blobs_completed': (int) num_completed, None if full_status is false,
+ 'blobs_in_stream': (int) None if full_status is false,
+ 'status': (str) downloader status, None if full_status is false,
+ 'claim_id': (str) None if full_status is false or if claim is not found,
+ 'outpoint': (str) None if full_status is false or if claim is not found,
+ 'txid': (str) None if full_status is false or if claim is not found,
+ 'nout': (int) None if full_status is false or if claim is not found,
+ 'metadata': (dict) None if full_status is false or if claim is not found,
+ 'channel_claim_id': (str) None if full_status is false or if claim is not found or signed,
+ 'channel_name': (str) None if full_status is false or if claim is not found or signed,
+ 'claim_name': (str) None if full_status is false or if claim is not found
+ },
+ ]
+```
+
+## file_reflect
+
+```text
+Reflect all the blobs in a file matching the filter criteria
+
+Usage:
+ file_reflect [--sd_hash=] [--file_name=]
+ [--stream_hash=] [--rowid=]
+ [--reflector=]
+
+
+Options:
+ --sd_hash= : (str) get file with matching sd hash
+ --file_name= : (str) get file with matching file name in the
+ downloads folder
+ --stream_hash= : (str) get file with matching stream hash
+ --rowid= : (int) get file with matching row id
+ --reflector= : (str) reflector server, ip address or url
+ by default choose a server from the config
+
+Returns:
+ (list) list of blobs reflected
+```
+
+## file_set_status
+
+```text
+Start or stop downloading a file
+
+Usage:
+ file_set_status ( | --status=) [--sd_hash=]
+ [--file_name=] [--stream_hash=] [--rowid=]
+
+
+Options:
+ --status= : (str) one of "start" or "stop"
+ --sd_hash= : (str) set status of file with matching sd hash
+ --file_name= : (str) set status of file with matching file name in the
+ downloads folder
+ --stream_hash= : (str) set status of file with matching stream hash
+ --rowid= : (int) set status of file with matching row id
+
+Returns:
+ (str) Confirmation message
+```
+
+## get
+
+```text
+Download stream from a LBRY name.
+
+Usage:
+ get [ | --file_name=] [ | --timeout=]
+
+
+
+Options:
+ --uri= : (str) uri of the content to download
+ --file_name= : (str) specified name for the downloaded file
+ --timeout= : (int) download timeout in number of seconds
+
+Returns:
+ (dict) Dictionary containing information about the stream
+ {
+ 'completed': (bool) true if download is completed,
+ 'file_name': (str) name of file,
+ 'download_directory': (str) download directory,
+ 'points_paid': (float) credit paid to download file,
+ 'stopped': (bool) true if download is stopped,
+ 'stream_hash': (str) stream hash of file,
+ 'stream_name': (str) stream name ,
+ 'suggested_file_name': (str) suggested file name,
+ 'sd_hash': (str) sd hash of file,
+ 'download_path': (str) download path of file,
+ 'mime_type': (str) mime type of file,
+ 'key': (str) key attached to file,
+ 'total_bytes': (int) file size in bytes, None if full_status is false,
+ 'written_bytes': (int) written size in bytes,
+ 'blobs_completed': (int) num_completed, None if full_status is false,
+ 'blobs_in_stream': (int) None if full_status is false,
+ 'status': (str) downloader status, None if full_status is false,
+ 'claim_id': (str) claim id,
+ 'outpoint': (str) claim outpoint string,
+ 'txid': (str) claim txid,
+ 'nout': (int) claim nout,
+ 'metadata': (dict) claim metadata,
+ 'channel_claim_id': (str) None if claim is not signed
+ 'channel_name': (str) None if claim is not signed
+ 'claim_name': (str) claim name
+ }
+```
+
+## help
+
+```text
+Return a useful message for an API command
+
+Usage:
+ help [ | --command=]
+
+
+Options:
+ --command= : (str) command to retrieve documentation for
+
+Returns:
+ (str) Help message
+```
+
+## peer_list
+
+```text
+Get peers for blob hash
+
+Usage:
+ peer_list ( | --blob_hash=) [ | --timeout=]
+
+
+Options:
+ --blob_hash= : (str) find available peers for this blob hash
+ --timeout= : (int) peer search timeout in seconds
+
+Returns:
+ (list) List of contacts
+```
+
+## publish
+
+```text
+Make a new name claim and publish associated data to lbrynet,
+update over existing claim if user already has a claim for name.
+
+Fields required in the final Metadata are:
+ 'title'
+ 'description'
+ 'author'
+ 'language'
+ 'license'
+ 'nsfw'
+
+Metadata can be set by either using the metadata argument or by setting individual arguments
+fee, title, description, author, language, license, license_url, thumbnail, preview, nsfw,
+or sources. Individual arguments will overwrite the fields specified in metadata argument.
+
+Usage:
+ publish ( | --name=) ( | --bid=) [--metadata=]
+ [--file_path=] [--fee=] [--title=]
+ [--description=] [--author=] [--language=]
+ [--license=] [--license_url=] [--thumbnail=]
+ [--preview=] [--nsfw=] [--sources=]
+ [--channel_name=] [--channel_id=]
+ [--claim_address=] [--change_address=]
+
+
+Options:
+ --name= : (str) name of the content
+ --bid= : (float) amount to back the claim
+ --metadata= : (dict) ClaimDict to associate with the claim.
+ --file_path= : (str) path to file to be associated with name. If provided,
+ a lbry stream of this file will be used in 'sources'.
+ If no path is given but a sources dict is provided,
+ it will be used. If neither are provided, an
+ error is raised.
+ --fee= : (dict) Dictionary representing key fee to download content:
+ {
+ 'currency': currency_symbol,
+ 'amount': float,
+ 'address': str, optional
+ }
+ supported currencies: LBC, USD, BTC
+ If an address is not provided a new one will be
+ automatically generated. Default fee is zero.
+ --title= : (str) title of the publication
+ --description= : (str) description of the publication
+ --author= : (str) author of the publication
+ --language= : (str) language of the publication
+ --license= : (str) publication license
+ --license_url= : (str) publication license url
+ --thumbnail= : (str) thumbnail url
+ --preview= : (str) preview url
+ --nsfw= : (bool) title of the publication
+ --sources= : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file
+ --channel_name= : (str) name of the publisher channel name in the wallet
+ --channel_id= : (str) claim id of the publisher channel, does not check
+ for channel claim being in the wallet. This allows
+ publishing to a channel where only the certificate
+ private key is in the wallet.
+ --claim_address= : (str) address where the claim is sent to, if not specified
+ new address wil automatically be created
+
+Returns:
+ (dict) Dictionary containing result of the claim
+ {
+ 'tx' : (str) hex encoded transaction
+ 'txid' : (str) txid of resulting claim
+ 'nout' : (int) nout of the resulting claim
+ 'fee' : (float) fee paid for the claim transaction
+ 'claim_id' : (str) claim ID of the resulting claim
+ }
+```
+
+## resolve
+
+```text
+Resolve given LBRY URIs
+
+Usage:
+ resolve [--force] ( | --uri=) [...]
+
+
+Options:
+ --force : (bool) force refresh and ignore cache
+ --uri= : (str) uri to resolve
+ --uris= : (list) uris to resolve
+
+Returns:
+ Dictionary of results, keyed by uri
+ '