@web3api/cli
Command line interface for Polywrap.
Installation#
Usage#
Install it and then in your project directory, see the list of available CLI commands by using the command:
The following menu will appear in your terminal window:
Let's take a look at each of these options individually.
test-env (t)#
This command allows you to manage a test environment for Web3API.
When the Web3API CLI starts or shuts down a test environment, it uses Docker Compose. Compose is a tool for defining and running multi-container Docker applications. In this case, it will create an environment for Ethereum using Ganache and IPFS using localhost:5001.
query (q)#
This command queries Web3APIs using recipe scripts, typically for testing purposes.
You can specific your recipe path, for example, with:
A simple e2e.json recipe file looks like the following:
In the above example, the constants.json file could include the following:
create (c)#
Creates a new project with the Web3API CLI.
codegen (g)#
TODO
build (b)#
Builds a Web3API and (optionally) uploads it to IPFS.
If you wanted to deploy to IPFS, simply use the command -ipfs <ipfs uri>.