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] service source [dest]
psibase
create-token
[-e
expiration] [-m
mode]
DESCRIPTION
psibase
is the command-line tool for interacting with psibase blockchains.
OPTIONS
-
-a
,--api
urlpsinode
API Endpoint. The default ishttp://psibase.127.0.0.1.sslip.io/
-
-h
,--help
Print help information
-
-s
,--sign
private-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
- An EOS style base58-encoded private key beginning
PVT_K1_
-
--trace
formatFor 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
,--key
public-keySet all accounts to authenticate using this key. The key will also be used for block production. 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
- An EOS style base58-encoded public key beginning
PUB_K1_
-
-p
,--producer
nameSet the name of the block producer.
psinode
should be configured to use the same name. -
--package-source
urlSpecifies 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
,--insecure
The 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
,--key
public-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
- An EOS style base58-encoded public key beginning
PUB_K1_
-
-S
,--sender
accountSender 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-account
public-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-account
Create 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-proxy
Register the service with HttpServer. This allows the service to host a website, serve RPC requests, and serve GraphQL requests.
-
-S
,--sender
senderSender to use when creating the account [default: accounts]
info
psibase
[-a
url] info
packages...
Displays the contents of packages
-
packages
Packages to show
-
--package-source
urlSpecifies 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
-
-k
public-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
- An EOS style base58-encoded public key beginning
PUB_K1_
-
--reinstall
Packages that are requested directly (not dependencies) will be installed even if they are already installed and up-to-date.
-
--package-source
urlSpecifies 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
-
--all
Prints all known packages (default)
-
--available
Prints packages that are available in the repository, but not installed on chain
-
--installed
Prints packages that are currently installed
-
--package-source
urlSpecifies 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
,--insecure
Make 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
,--key
Set 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
- An EOS style base58-encoded public key beginning
PUB_K1_
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-source
urlSpecifies 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] service source [dest]
Upload a file to a service. The service must provide a storeSys
action.
-
-r
,--recursive
If 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-type
content-typeMIME Content-Type of the file. If not specified, it will be guessed from the file name. Cannot be used with
-r
. -
service
Service to upload to
-
source
Source filename to upload
-
dest
Destination path within service. If not specified, defaults to the file name of source or
/
for recursive uploads. -
-S
,--sender
senderAccount to use as the sender of the transaction. Defaults to the service account.
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-after
secondsLifetime of the token in seconds. The default is 1 hour.
-
-m
,--mode
modeThe permissions granted by the token. Should be
r
orrw
. The default isrw
.