This guide walks you through setting up the XYB Ledger CLI, a lightweight command-line interface for configuring and managing your Ledger environment.
Prerequisites
Ensure the following tools are installed:
Tool
Version Required
Java
21+ (OpenJDK recommended)
OS
macOS or Linux (Windows users can use WSL or Git Bash)
Note: This guide assumes your Ledger service is already provisioned and running, either hosted remotely by XYB or on a private cloud. Contact your environment administrator if unsure.
Step 1: Download the CLI JAR
You can download the latest stable CLI tool (JAR file) using either curl or wget.
Keep the private key secure, you will use it for authentication.
Step 5: Create Cohort, Role, and Agent
Set your application cohort:
Note: This must match how your agent was registered. Your cohort was already provisioned for you by XYB during onboarding. This step simply tells the CLI which cohort you will work inside.
Create an ADMIN role:
Add Your Agent. Replace <your-agent-name> with your registered agent name (e.g., application/ext-invoice).
5. Switch Authentication to Your Own Agent
Now update your CLI to authenticate using your real agent and private key:
Set CLI authentication identity:
Step 6: Transition Ledger to Mastering Mode
Finally, switch Ledger into MASTERING mode:
Now your Ledger environment is fully initialized!
You now have:
The CLI tool downloaded
A script for easier use
An instance connected
Permissions configured
From here, you can continue with setting up messaging channels, cohorts, or interacting with the API.