Voltage CLI
11 min
use the voltage cli to work with the voltage api from your terminal the voltage command lets you inspect wallets, create and track payments, work with quotes and webhooks, and automate account operations you can run commands yourself or ask your coding agent to run them for you the cli is open source and available for macos, linux, and windows see the voltage cli repository https //github com/voltagecloud/voltage cli for source code and the full reference let your coding agent help if your agent has the current agent skill pack docid\ e e46wq gqm0a92wrdocv , its voltage api skill includes knowledge of the cli installation, authentication, profiles, commands, and payment outcomes an agent with terminal access can help install the cli and drive it on your behalf install the skill pack with node js/npm available npx skills add voltagecloud/agent skills global all this installs skills across supported agent harnesses omit all to choose agents interactively installing the skills does not install the cli or sign in to voltage if you installed the pack before cli support was added, update it using the instructions on the agent skill pack page open a new agent session and try use the voltage api skill to install the voltage cli for my operating system and help me sign in and configure a profile once connected, you can ask “use the voltage cli to check the network and available balance of my development wallet ” “list the completed payments in my configured environment ” “verify that my wallet is on mutinynet, then create a lightning invoice for 150 sats and give me the invoice ” “check whether that invoice has been paid ” complete browser login yourself when prompted give the agent the intended environment, wallet, and task; keep credentials out of the conversation the cli and its profiles use your existing account permissions install the cli yourself open the official releases page https //github com/voltagecloud/voltage cli/releases/latest download the archive matching your operating system and processor, plus sha256sums from the same release compare the archive's sha 256 checksum with its entry in sha256sums use shasum a 256 file on macos, sha256sum file on linux, or get filehash file algorithm sha256 in powershell, replacing file with the downloaded archive extract the archive and put voltage (windows voltage exe ) in a directory on your path platform archive target macos, apple silicon aarch64 apple darwin macos, intel x86 64 apple darwin linux, arm64 aarch64 unknown linux gnu linux, x86 64 x86 64 unknown linux gnu windows, x86 64 x86 64 pc windows msvc verify the installation voltage version voltage help the examples on this page use release v0 1 0 check the release instructions and your installed command's help when using another version sign in and select an environment start with browser login voltage login account work voltage organizations list account work voltage environments list account work org org id follow the browser prompt to sign in and complete mfa on a remote machine, add no browser and open the verification url yourself replace org id and env id below with the ids for your intended organization and environment save them in a profile voltage profiles create dev org org id env env id account work voltage wallets list profile dev a profile saves your organization, environment, and credential selection the name dev is just a label inspect the selected wallet's network before making test payments if you need a development wallet, start with the wallet setup guide docid\ alpqa ayg179ccwgf2ija and staging environment docid\ ukhb7 3ektubbv hblw1t inspect wallets and payments use a wallet id from the list above voltage wallets get wallet id profile dev voltage payments list profile dev statuses completed add json for scripts or agent use voltage wallets get wallet id profile dev json create a test lightning invoice with a confirmed mutinynet bitcoin wallet, create a 150 sat invoice voltage payments receive profile dev wallet wallet id \\ \ currency btc kind bolt11 amount 150 unit sats wait ready \ wait ready waits for the invoice to be available pay it from another compatible test wallet, then use the returned payment id to check settlement voltage payments get payment id profile dev wait completed timeout 120 an accepted request or a generated invoice does not mean the payment is complete if the wait times out, keep the payment id and check it again see the command reference https //github com/voltagecloud/voltage cli/blob/v0 1 0/docs/commands md for additional operations use an api key for automation for scripts, import an environment api key using the hidden input prompt voltage auth import key account ci org org id env env id voltage profiles create automation org org id env env id account ci voltage wallets list profile automation json create the key in the intended environment as described in the developer guide docid\ l4sp3ernfdbslxqajxoeg organization and environment discovery commands require browser login; obtain those ids before configuring key based automation the cli normally stores credentials in your operating system's credential store for headless linux without an unlocked secret service, use credential store file when importing the key; this stores credentials in an owner only file cli profiles live under $xdg config home/voltage or / config/voltage the cli does not read the agent skill's direct request helper file at / voltage/ env for automated payments, inspect the returned business outcome as well as the command's exit code reconcile an uncertain submission by its existing payment id before retrying commands returning one time secrets, such as webhook creation, support output file path to save the response privately find more commands voltage payments help voltage payments receive help voltage webhooks help use the cli readme https //github com/voltagecloud/voltage cli/blob/v0 1 0/readme md for more examples and output conventions for building an application integration, continue with the developer guide docid\ l4sp3ernfdbslxqajxoeg and voltage api reference https //voltageapi com/v1/docs