psibase
NAME
psibase - The psibase blockchain command line client
SYNOPSIS
psibase [-a url] boot [-p name] [-k public-key] [packages...]
psibase [-a url] create [-i | -k public-key] [-S sender] name
psibase [-a url] deploy [-p] account filename
psibase [-a url] info packages...
psibase [-a url] install [-k public-key] packages...
psibase [-a url] list [--all | --available | --installed]
psibase [-a url] modify [-i | -k public-key] account
psibase [-a url] search regex...
psibase [-a url] upload [-r] [-t content-type] source [dest] -S sender
psibase create-token [-e expiration] [-m mode]
psibase subcommand [args...]
DESCRIPTION
psibase is the command-line tool for interacting with psibase blockchains.
OPTIONS
-
-a,--apiurlpsinodeAPI Endpoint. The default ishttp://psibase.127.0.0.1.sslip.io/ -
-h,--helpPrint help information
-
-s,--signprivate-keySign transactions with this key. The key can be in any of the following forms:
- A file containing a PEM or DER encoded private key
- A PKCS #11 URI
-
--traceformatFor commands that push transactions to the chain, determines how the result is reported.
error: If the transaction failed, show the error messagestack(default): If the transaction failed, show a stack trace from the action that caused the errorfull: Shows all actions in the tracejson: Shows the full transaction trace as JSON
COMMANDS
boot
psibase [-a url] boot [-p name] [-k public-key] [packages...]
The boot command deploys a set of system services and web interfaces suitable for development. The chain will have a single block producer. The chain can only be booted once.
-
packages
Packages to install to the chain. If not specifed, a default set will be installed.
-
-k,--account-keypublic-keySet the producer account to use this key for transaction authentication. The public key can be any of the following:
- A file containing a PEM or DER encoded public key
- A PKCS #11 URI
-
--block-keypublic-keySet the producer's block signing key. The public key can be any of the following:
- A file containing a PEM or DER encoded public key
- A PKCS #11 URI
-
-p,--producernameSet the name of the block producer.
psinodeshould be configured to use the same name. -
--package-sourceurlSpecifies a package repository. If multiple repositories are provided, the ones listed earlier will be preferred over those listed later. The default is the local package repository.
create
psibase [-a url] create [-i | -k public-key] [-S sender] name
Create or modify an account
-
-i,--insecureThe account won't be secured; anyone can authorize as this account without signing. This option does nothing if the account already exists. Caution: this option should not be used on production or public chains.
-
-k,--keypublic-keySet the account to authenticate using this key. Also works if the account already exists. The public key can be any of the following:
- A file containing a PEM or DER encoded public key
- A PKCS #11 URI
-
-S,--senderaccountSender to use when creating the account [default: accounts].
deploy
psibase [-a url] deploy [-p] account filename
Deploy a service
-
account
Account to deploy the service on
-
filename
A wasm file containing the service
-
-c,--create-accountpublic-keyCreate the account if it doesn't exist. Also set the account to authenticate using this key, even if the account already existed
-
-i,--create-insecure-accountCreate the account if it doesn't exist. The account won't be secured; anyone can authorize as this account without signing. Caution: this option should not be used on production or public.
-
-p,--register-proxyRegister the service with HttpServer. This allows the service to host a website, serve RPC requests, and serve GraphQL requests.
-
-S,--sendersenderSender to use when creating the account [default: accounts]
info
psibase [-a url] info packages...
Displays the contents of packages
-
packages
Packages to show
-
--package-sourceurlSpecifies a package repository. If multiple repositories are provided, the ones listed earlier will be preferred over those listed later. The default is the local package repository.
install
psibase [-a url] install [-k public-key] packages...
Install packages to the chain along with all dependencies. If any of the requested packages are already installed, they will be updated if a newer version is available.
-
packages
Packages to install
-
-kpublic-keySet all accounts created by the new packages to authenticate using this key. If no key is provided, the accounts will not require authentication. The public key can be any of the following:
- A file containing a PEM or DER encoded public key
- A PKCS #11 URI
-
--reinstallPackages that are requested directly (not dependencies) will be installed even if they are already installed and up-to-date.
-
--package-sourceurlSpecifies a package repository. If multiple repositories are provided, the ones listed earlier will be preferred over those listed later. The default is the local package repository.
list
psibase [-a url] list [--all | --available | --installed]
Prints a list of packages from the chain and/or package repositories
-
--allPrints all known packages (default)
-
--availablePrints packages that are available in the repository, but not installed on chain
-
--installedPrints packages that are currently installed
-
--package-sourceurlSpecifies a package repository. If multiple repositories are provided, the ones listed earlier will be preferred over those listed later. The default is the local package repository.
modify
psibase [-a url] modify [-i | -k public-key] account
Modify an account
-
-i,--insecureMake the account insecure, even if it has been previously secured. Anyone will be able to authorize as this account without signing. Caution: this option should not be used on production or public chains
-
-k,--keySet the account to authenticate using this key. The public key can be any of the following:
- A file containing a PEM or DER encoded public key
- A PKCS #11 URI
search
psibase [-a url] search regex...
Search for packages
-
regex
Regular expressions to match agaist the package names and descriptions. If there are multiple patterns, they must all match for a package to be listed. The search is case-insensitive.
-
--package-sourceurlSpecifies a package repository. If multiple repositories are provided, the ones listed earlier will be preferred over those listed later. The default is the local package repository.
upload
psibase [-a url] upload [-r] [-t content-type] source [dest] -S sender
Upload a file to a service's subdomain. The file will be stored to and served from the sender's namespace within the sites service.
-
-r,--recursiveIf source is a directory, upload its contents recursively. The files may be split across multiple transactions if they are too large to fit in a single transaction.
-
-t,--content-typecontent-typeMIME Content-Type of the file. If not specified, it will be guessed from the file name. Cannot be used with
-r. -
source
Source filename to upload
-
dest
Destination path at the subdomain from which the file will be served. If not specified, defaults to the file name of source or
/for recursive uploads. -
-S,--sendersenderAccount to use as the sender of the transaction. Required. Files are uploaded to this account's subdomain.
create-token
psibase create-token [-e expiration] [-m mode]
Create an access token. psibase will prompt for the key to use to sign the token. For the token to be useful, the server must enable bearer tokens with the same key.
-
-e,--expires-aftersecondsLifetime of the token in seconds. The default is 1 hour.
-
-m,--modemodeThe permissions granted by the token. Should be
rorrw. The default isrw.
Custom Commands
psibase subcommand [args...]__
Additional psibase subcommands can be implemented in WASM. They will be found in $PREFIX/share/psibase/wasm/.
FILES
-
$PREFIX/share/psibase/packages/index.json
Local package repository
-
$PREFIX/share/psibase/wasm/psibase-*.wasm
Custom subcommands