Skip to main content
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.8.0.

Syntax

Global Options

Assertion Development Commands

The commands below cover the assertion development workflow documented on this page. Run pcl --help for the complete command list for your installed version.

test

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

Common test Options

Test Filtering

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 reads credible.toml, builds and verifies referenced assertion contracts, previews release changes against the platform, and creates a release after confirmation.

apply Options

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

deploy

Creates or resolves a platform project, verifies or sets its protocol manager, creates a release, activates the release on-chain, and confirms the deployment.

deploy Options

deploy Behavior

  • --dry-run returns after building and verifying the local release payload. It does not authenticate, resolve a project, validate a chain, or inspect the protocol manager.
  • Without --dry-run, the command requires authentication, project information, an RPC endpoint, and a signer unless the relevant step is already complete or explicitly skipped.
  • If credible.toml has no project_id, provide a project name and chain ID so the command can create the project.
  • Existing projects use the chain recorded by the platform.
  • If --yes is omitted, the command requests confirmation before mutations and broadcasts.
  • The command observes existing state before each step so an interrupted workflow can resume.

deploy Examples

auth

Authenticates the CLI with your Credible Layer Platform account.

auth Commands

auth Options

pcl auth login displays a device code, then opens a browser after you press Enter. Use --no-wait with --json to return the login challenge without waiting for verification.

config

Manages CLI configuration.

config Commands

Configuration is stored in ~/.config/pcl/config.toml by default and includes authentication state, the remembered platform URL, and per-chain RPC settings.

build

Builds contracts using Phorge.

build Options

verify

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

verify Options

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

verify Examples

download

Downloads assertion source code for a protocol.

download Options

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

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

Root Fields

Contract Fields

Assertion Fields

Contract Name Inference

pcl infers assertion contract names from file in this order:

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

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 create an assertion release 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