Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.phylax.systems/llms.txt

Use this file to discover all available pages before exploring further.

pcl is the Credible CLI for building, testing, verifying, deploying, and downloading Credible Layer assertions.
New to pcl? Start with the Quickstart Tutorial to learn the workflow.

Version

This reference matches pcl 1.3.3.
pcl 1.3.3
Commit: 864b0db687c83c4010bc4ca3fee379607a19b094
Build Timestamp: 2026-04-30T16:20:59.647643000Z
Default Platform URL: https://app.phylax.systems

Syntax

pcl [OPTIONS] COMMAND

Global Options

OptionDescription
-j, --jsonEmit JSON output where supported
-h, --helpPrint help
-V, --versionPrint version

Commands

CommandDescription
pcl testRun tests using Phorge
pcl applyPreview and apply declarative deployment changes from credible.toml
pcl authAuthenticate the CLI with your Credible Layer Platform account
pcl configManage CLI configuration
pcl buildBuild contracts using Phorge
pcl verifyVerify assertions locally before deployment
pcl downloadDownload assertion source code for a protocol

test

Runs tests using Phorge.
pcl test [OPTIONS] [PATH]
[PATH] is the contract file to test. It is a shortcut for --match-path.

Common test Options

OptionDescription
-v, --verbosity...Increase log verbosity. Pass multiple times, such as -vvv
-q, --quietDo not print log messages
--jsonFormat log messages as JSON
--mdFormat log messages as Markdown
--color COLORSet log color mode: auto, always, or never
-s, --suppress-successful-tracesShow traces only for failures
--junitOutput test results as a JUnit XML report
-l, --listList tests instead of running them
--summaryPrint a test summary table
--detailedPrint a detailed test summary table
--gas-reportPrint a gas report
--fail-fastStop after the first failure
--rerunRe-run recorded failures from the last run
-w, --watch [PATH...]Watch files or directories for changes

Test Filtering

OptionDescription
--match-test REGEXOnly run test functions matching the regex
--no-match-test REGEXExclude test functions matching the regex
--match-contract REGEXOnly run tests in matching contracts
--no-match-contract REGEXExclude tests in matching contracts
--match-path GLOBOnly run tests in matching source files
--no-match-path GLOBExclude tests in matching source files
--no-match-coverage REGEXExclude matching files from coverage output

EVM and Build Options

pcl test supports many Forge-compatible EVM, fork, compiler, linker, cache, project, and watch options. Use pcl test --help for the complete option list.
pcl test uses Phorge for test execution. Some Forge options may differ from upstream Foundry behavior. Use pcl test --help as the authoritative option list for your installed pcl version.

apply

Previews and applies declarative deployment changes from credible.toml.
pcl apply [OPTIONS]
pcl apply reads credible.toml, builds and verifies referenced assertion contracts, previews release changes against the platform, and creates a release after confirmation.

apply Options

OptionDescription
--root ROOTProject root directory. Default: .
-c, --config CONFIGPath to credible.toml, relative to root or absolute. Default: assertions/credible.toml
--jsonEmit machine-readable output for this command
--yesApply without interactive confirmation
--auto-approveAlias for --yes
-u, --api-url API_URLBase URL for the platform API. Default: https://app.phylax.systems
-h, --helpPrint help

apply Behavior

  • If project_id is omitted from credible.toml, pcl apply prompts you to select a project interactively.
  • If JSON output is enabled, project_id is required in credible.toml.
  • If there are no release changes, the command exits without creating a release.
  • If --yes is omitted, the command prompts for confirmation before applying changes.

apply Examples

pcl apply
pcl apply --root ./my-project
pcl apply --root ./my-project -c path/to/credible.toml
pcl apply --yes
pcl apply --json --yes

auth

Authenticates the CLI with your Credible Layer Platform account.
pcl auth [OPTIONS] COMMAND

auth Commands

CommandDescription
loginLogin to PCL
logoutLogout from PCL
statusCheck current authentication status
helpPrint help

auth Options

OptionDescription
-u, --auth-url AUTH_URLBase URL for the authentication service. Default: https://app.phylax.systems
-h, --helpPrint help

config

Manages CLI configuration.
pcl config COMMAND

config Commands

CommandDescription
showDisplay the current configuration
deleteDelete the current configuration
helpPrint help
Configuration is stored in ~/.config/pcl/config.toml by default and includes authentication tokens and identity.

build

Builds contracts using Phorge.
pcl build [OPTIONS]

build Options

OptionDescription
--root ROOTRoot directory of the project
-h, --helpPrint help

verify

Verifies assertions locally before deployment.
pcl verify [OPTIONS] [ASSERTION]
[ASSERTION] can be a contract name or file:contract. If omitted, pcl verify verifies all assertions from credible.toml.

verify Options

OptionDescription
--root ROOTProject root directory. Default: .
-c, --config CONFIGPath to credible.toml, relative to root or absolute. Default: assertions/credible.toml
--args ARGS...Constructor arguments for the assertion
--jsonEmit machine-readable JSON output
-h, --helpPrint help

verify Behavior

  • When [ASSERTION] is omitted, constructor arguments come from each assertion’s args field in credible.toml.
  • --args can only be used when verifying a specific assertion.
  • Constructor arguments are ABI-encoded against the assertion contract constructor.
  • The command exits with code 1 if any assertion fails verification.

Verification Statuses

StatusMeaning
successThe assertion verified successfully
deployment_failureThe assertion failed during deployment in the local verification environment
no_triggersThe assertion did not expose any triggers
missing_assertion_specThe assertion is missing the required assertion specification
invalid_assertion_specThe assertion specification is invalid

verify Examples

pcl verify
pcl verify OwnableAssertion
pcl verify assertions/src/OwnableAssertion.a.sol:OwnableAssertion
pcl verify OwnableAssertion --args 0x75634113D6A2fbfF5e65151ce1572195bE1d001A
pcl verify --json

download

Downloads assertion source code for a protocol.
pcl download [OPTIONS]

download Options

OptionDescription
--project-id PROJECT_IDProject UUID to download assertions from
-o, --output-dir OUTPUT_DIROutput directory for .sol files. Default: PROJECT_NAME-assertions/
--jsonEmit machine-readable output for this command
-u, --api-url API_URLBase URL for the platform API. Default: https://app.phylax.systems
-h, --helpPrint help

download Behavior

  • --project-id is required.
  • The command requires authentication. Run pcl auth login first.
  • By default, files are written to a directory named after the project: PROJECT_NAME-assertions/.
  • Downloaded files use the pattern CONTRACT_NAME_ASSERTION_ID_PREFIX.sol.
  • Assertions without available source are skipped.

download Examples

pcl download --project-id 550e8400-e29b-41d4-a716-446655440000
pcl download --project-id 550e8400-e29b-41d4-a716-446655440000 -o ./downloaded-assertions
pcl download --project-id 550e8400-e29b-41d4-a716-446655440000 --json

credible.toml Configuration

The credible.toml file defines assertion deployment configuration for pcl apply and pcl verify. Default location: assertions/credible.toml, relative to the project root.

Format

environment = "production"
project_id = "550e8400-e29b-41d4-a716-446655440000"

[contracts.my_contract]
address = "0x1234567890abcdef1234567890abcdef12345678"
name = "MyContract"

[[contracts.my_contract.assertions]]
file = "assertions/src/MyAssertion.a.sol"
args = ["0x75634113D6A2fbfF5e65151ce1572195bE1d001A", "42"]

Root Fields

FieldTypeRequiredDescription
environmentstringYesDeployment environment name, such as "production"
project_idUUIDNoPlatform project ID. Required when pcl apply emits JSON output
contractsmapYesNamed contract definitions

Contract Fields

FieldTypeRequiredDescription
addressstringYesContract address on-chain
namestringYesHuman-readable contract name
assertionsarrayYesAssertions to apply to this contract

Assertion Fields

FieldTypeRequiredDescription
filestringYesAssertion contract file path. Use file.sol:ContractName when the contract name cannot be inferred from the filename
argsarray or scalarNoConstructor arguments for the assertion. Values are converted to strings before ABI encoding

Contract Name Inference

pcl infers assertion contract names from file in this order:
file valueInferred contract
assertions/src/MyAssertion.a.sol:ExplicitAssertionExplicitAssertion
assertions/src/MyAssertion.a.solMyAssertion
assertions/src/MyAssertion.solMyAssertion

Validation

  • Contract addresses must be unique within the file.
  • pcl verify returns an error if credible.toml contains no assertions.
  • pcl apply --json returns an error if project_id is missing.

Environment Variables

VariableUsed byDescriptionDefault
PCL_AUTH_URLpcl authBase URL for the authentication servicehttps://app.phylax.systems
PCL_API_URLpcl apply, pcl downloadBase URL for the platform APIhttps://app.phylax.systems

Configuration File

pcl stores CLI configuration in ~/.config/pcl/config.toml by default. Use pcl config show to view the current configuration and pcl config delete to delete it.

Next Steps

Apply Assertions

Learn how to deploy assertions with pcl apply

Quick Start Guide

Step-by-step tutorial for your first assertion

Installation

Install pcl

Deploy with the Platform

Deploy assertions to protect your contracts