Installation
Thexyz CLI provides a Solana-like interface for interacting with XYZ Chain. This guide covers installation methods for different platforms.
Prerequisites
- Go 1.21+ - Download
- Git - For cloning the repository
- Make - For building from source
Install from Source
Clone and Build
Install Both CLIs
To install bothxyz (developer CLI) and xyzd (chain daemon):
Binary Locations
After installation, binaries are located at:| Binary | Location |
|---|---|
xyz | $GOPATH/bin/xyz |
xyzd | $GOPATH/bin/xyzd |
$GOPATH/bin is in your PATH:
~/.bashrc, ~/.zshrc, etc.) for persistence.
Verify Installation
Expected Output
Expected Output
Shell Completion
Enable tab completion for faster command entry:- Bash
- Zsh
- Fish
- PowerShell
Configuration
Initial Setup
View Configuration
Directory Structure
The CLI stores data in~/.xyz/:
Environment Variables
All configuration can be set via environment variables with theXYZ_ prefix:
| Variable | Description | Default |
|---|---|---|
XYZ_NODE | RPC endpoint | tcp://localhost:26657 |
XYZ_CHAIN_ID | Chain ID | xyz-testnet-1 |
XYZ_KEYRING_BACKEND | Keyring backend | os |
XYZ_HOME | Home directory | ~/.xyz |
Configuration Precedence
Configuration values are resolved in this order (highest to lowest):- Command-line flags -
--node tcp://... - Environment variables -
XYZ_NODE=tcp://... - Config file -
~/.xyz/config.yaml - Default values - Built-in defaults
Updating
From Source
Check for Updates
Uninstalling
Troubleshooting
Command not found: xyz
Command not found: xyz
Ensure Add to your shell profile for persistence.
$GOPATH/bin is in your PATH:Permission denied
Permission denied
The binary may need executable permission:
Build errors
Build errors
Missing dependencies
Missing dependencies
Run
go mod tidy to fetch dependencies: