New to pcl? Start with Using pcl to understand how to use it in your workflow.
Global Options
Options:
-j, --json Output in JSON format
-h, --help Print help
-V, --version Print version
Commands
Commands are listed in the order they are usually used in the assertion development workflow.
Manage authentication with your Credible Layer dApp account.
Authenticate `pcl` with your Credible Layer dApp account
Usage: pcl auth [OPTIONS] <COMMAND>
Commands:
login Login to `pcl` using your wallet
logout Logout from `pcl`
status Check current authentication status
help Print this message or the help of the given subcommand(s)
Options:
-u, --auth-url <AUTH_URL> Base URL for authentication service [env: PCL_AUTH_URL=] [default: https://dapp.internal.phylax.systems]
-h, --help Print help
auth login
Login to pcl using your wallet. Opens a browser window for wallet authentication.
auth logout
Logout from pcl and clear local authentication token.
auth status
Check current authentication status.
Run tests for your assertions.
Run tests
Usage: pcl test [OPTIONS] [PATH]
Options:
-h, --help Print help (see more with '--help')
Common options:
-v, --verbosity... Verbosity level of the log messages. Pass multiple times to increase verbosity (e.g. -v, -vv, -vvv)
-q, --quiet Do not print log messages
--match-path <GLOB> Only run tests in source files matching the specified glob pattern
--match-test <REGEX> Only run test functions matching the specified regex pattern
--match-contract <REGEX> Only run tests in contracts matching the specified regex pattern
pcl test uses Forge underneath for test execution. Note that pcl uses an older version of Forge, so newer Forge features may not be available. The Forge version is periodically updated to include new features. See the Forge test documentation for all available options.
Build contracts using phorge.
Build contracts using `phorge`
Usage: pcl build [OPTIONS]
Options:
--root <ROOT> Root directory of the project
-h, --help Print help
pcl build will be run automatically if the project hasnβt been built yet when using pcl store.
Submit assertion bytecode and source code to the Assertion DA.
Submit the Assertion bytecode and source code to be stored by the Assertion DA of the Credible Layer
Usage: pcl store [OPTIONS] <ASSERTION_CONTRACT> [CONSTRUCTOR_ARGS]...
Arguments:
<ASSERTION_CONTRACT> Name of the assertion contract to build and flatten
[CONSTRUCTOR_ARGS]... Constructor arguments for the assertion contract.
Format: <ARG0> <ARG1> <ARG2>
Options:
-u, --da-url <DA_URL> URL of the assertion-DA server [env: PCL_DA_URL=]
[default: https://da.internal.phylax.systems]
--root <ROOT> Root directory of the project
-h, --help Print help (see more with '--help')
Examples:
# Store assertion contract without constructor arguments
pcl store MyAssertionContract
# Store assertion with constructor arguments
pcl store MyAssertion 0xADDRESS_OF_SMART_CONTRACT
# Store assertion with multiple constructor arguments
pcl store MyAssertion 0xADDRESS arg1 arg2
Submit assertions to the Credible Layer dApp.
Arguments for submitting assertions to the Credible Layer dApp
Usage: pcl submit [OPTIONS] [ASSERTION_CONTRACT] [CONSTRUCTOR_ARGS]...
Arguments:
[ASSERTION_CONTRACT] Name of the assertion to submit (when submitting a single assertion)
[CONSTRUCTOR_ARGS]... Constructor arguments for the assertion
Options:
-u, --api-url <API Endpoint> Base URL for the Credible Layer dApp API [env: PCL_API_URL=] [default: https://dapp.internal.phylax.systems/api/v1]
-p, --project-name <PROJECT> Optional project name to skip interactive selection
-a, --assertion <ASSERTION> Assertion in format 'Name(arg1,arg2)'. Use multiple -a flags for multiple assertions.
-h, --help Print help (see more with '--help')
Examples:
# Interactive mode (prompts you to select which stored assertions to submit and which project to submit them to)
pcl submit
# Submit a single assertion contract using positional arguments
pcl submit MyAssertionContract arg0 arg1 arg2
# Submit a single assertion contract with constructor arguments with -a flag
pcl submit -a 'MyAssertionContract(0xADDRESS_OF_SMART_CONTRACT)' -p my-project
# Submit assertion contract without constructor arguments
pcl submit -a 'MyAssertionContract' -p my-project
# Submit multiple assertion contracts using multiple -a flags
pcl submit -a 'AssertionContract1(arg0,arg1)' -a 'AssertionContract2(arg0,arg1)' -p my-project
If you have stored several assertions that you want to submit to the same project, itβs fastest to use the interactive mode for selecting the project and assertions.
Manage your pcl configuration including authentication token, pending assertions for submission, and project settings.
Manage configuration
Usage: pcl config <COMMAND>
Commands:
show Display the current configuration
delete Delete the current configuration
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
config show
Display the current configuration stored in ~/.pcl/config.toml.
config delete
Delete the current configuration file.
Environment Variables
PCL_AUTH_URL
Base URL for authentication service. Default: https://dapp.internal.phylax.systems
export PCL_AUTH_URL=https://custom-auth-url.com
pcl auth login
PCL_DA_URL
URL of the Assertion DA server. Default: https://da.internal.phylax.systems
export PCL_DA_URL=https://custom-da-url.com
pcl store MyAssertion
PCL_API_URL
Base URL for the Credible Layer dApp API. Default: https://dapp.internal.phylax.systems/api/v1
export PCL_API_URL=https://custom-api-url.com/api/v1
pcl submit -a 'MyAssertion' -p my-project
Configuration File
Configuration is stored in ~/.pcl/config.toml and includes:
- Authentication token
- Pending assertions for submission (assertions that have been stored but not yet submitted)
- Project settings
You can view the configuration with pcl config show or delete it with pcl config delete.
Next Steps