GLAM CLI
A convenient way of interacting with the GLAM Protocol.
GLAM CLI is under active development and is subject to frequent change. It’s highly recommended to use the latest version. If you encounter any issue, please submit it on GitHub
Getting Started
Install
This will install the CLI and make it available in your terminal as glam-cli
.
Configure
The CLI expects a configuration file at ~/.config/glam/config.json
. The file should contain the following content:
At minimum, you need to provide cluster, json_rpc_url, and keypair_path:
Run
Check the version of the CLI:
Show help:
Docker
Pull the Docker Image
A pre-built docker image is available on Github. To pull the latest image, run:
Run the CLI inside Docker Container
The docker image doesn’t come with a configuration file or a keypair. Instead, you’ll need to provide them to the container by mounting a volume from a host directory to the container’s /workspace
directory.
Create a local directory (for example, $HOME/.glam-cli-docker
) and place both the configuration file and keypair into it. Assuming your keypair filename is keypair.json
, the directory and the config file should look like the following:
Run the following command to start the container and get the CLI ready to use:
Now that you’re inside the container, you can use the CLI:
Configuration
The GLAM CLI expects a configuration file at the following path:
- macOS / Linux:
~/.config/glam/config.json
- Windows:
%USERPROFILE%\.config\glam\config.json
This file defines how the CLI connects to Solana, sets transaction fees, and points to the appropriate GLAM state.
Recommended
Use this template if you have a Helius account and want dynamic priority fee management:
Here’s a quick explanation of each field:
cluster
: Value must be one ofmainnet-beta
,devnet
, orlocalnet
.json_rpc_url
: The URL of your preferred Solana JSON RPC endpoint.tx_rpc_url
: Optional. If not set it defaults tojson_rpc_url
. Use this to specify a separate RPC endpoint you want to use for landing transactions.keypair_path
: Path to your keypair JSON file.priority_fee
: provided,level
andhelius_api_key
will be ignored.level
: Optional (defaults toMin
). Only applied if cluster ismainnet-beta
. Other options areMin
,Low
,Medium
,High
,VeryHigh
,UnsafeMax
,Default
(more info can be found here).helius_api_key
: Optional. Only applied if cluster ismainnet-beta
. If not providedlevel
will be ignored. The API key is needed to fetch the priority fee estimate from Helius.
glam_state
: Optional. If you want to set a default active GLAM state, you can do so here. Alternatively, you can use theset
command to set the active GLAM state later on.
Static Priority Fee
Use this version if you don’t want to use Helius, or prefer a fixed fee model:
micro_lamports
: Specifies a fixed transaction fee in micro-lamports
(1 lamport = 1,000,000 micro-lamports)
This bypasses the need for Helius.
Use this method in stable environments where dynamic fee adjustment is unnecessary or unavailable.