@venumdev/cli
v0.1.0
Published
Agent-friendly CLI for the Venum Solana execution API
Maintainers
Readme
@venumdev/cli
@venumdev/cli works as both an importable JavaScript/TypeScript client and a command-line surface for the Venum Solana execution API.
- Website:
https://www.venum.dev - Venum Terminal:
https://github.com/venumhq/solana-venum-terminal
It gives developers, coding agents, and trading agents a simple way to work with Venum from the terminal: prices, pools, token discovery, quotes, swap building, transaction submission, transaction status, and real-time streams.
This CLI is part of the broader Venum OSS surface:
- less raw RPC
- more executable actions
- better DevX for Solana execution
- better Agent X for coding and trading agents
What It Covers
- health checks
- authenticated price lookups
- pool browsing and pair inspection
- token list discovery
- swap quotes
- unsigned swap transaction building
- local signing and swap submission from a Solana keypair file
- signed transaction submission
- transaction status checks
- SSE price streams
- SSE new-pool streams
Install
Library install with pnpm:
pnpm add @venumdev/cliLibrary install with npm:
npm install @venumdev/cliCLI global install with pnpm:
pnpm add -g @venumdev/cliCLI global install with npm:
npm install -g @venumdev/cliRun without installing:
pnpm dlx @venumdev/cli health
pnpm dlx @venumdev/cli price SOL
npx @venumdev/cli health
npx @venumdev/cli price SOLRun locally from source:
git clone https://github.com/venumhq/solana-venum-cli.git
cd solana-venum-cli
pnpm install
pnpm startLibrary Usage
Import the API client directly:
import { VenumApiClient, resolveConfig } from '@venumdev/cli';
const config = resolveConfig();
const api = new VenumApiClient({
apiKey: config.apiKey,
baseUrl: config.baseUrl,
});
const health = await api.health();
const price = await api.price('SOL');
console.log({ health, price });Available exports include:
VenumApiClientVenumApiErrorVenumNetworkError- API response types from
src/api.ts loadConfig,saveConfig,resolveConfig,getConfigPath
Quick Start
Get an API key at https://www.venum.dev, then configure it once:
venum config set api-key <your-key>
venum health
venum quote SOL USDC 1000000000With pnpm dlx or npx, pass the command after the package name:
pnpm dlx @venumdev/cli config set api-key <your-key>
pnpm dlx @venumdev/cli prices
npx @venumdev/cli config set api-key <your-key>
npx @venumdev/cli pricesRun locally from source:
pnpm start
pnpm start -- health
pnpm start -- quote SOL USDC 1000000000All commands except health and config require an API key.
Config
The CLI follows the same config pattern as the Venum terminal app.
Saved config path:
~/.config/venum/config.jsonEnvironment variables override saved config:
VENUM_API_KEY=<your-key>
VENUM_API_URL=https://api.venum.devPersist values locally:
venum config set api-key <your-key>
venum config set api-url https://api.venum.devInspect config:
venum config get
venum config pathUnset values:
venum config unset api-key
venum config unset api-urlOutput Modes
Human-readable output is the default.
Use --json for agent and automation workflows:
venum quote SOL USDC 1000000000 --json
venum tx <signature> --jsonFor live price streams, use --time and --change to show timestamps and 24h change in human-readable output:
venum prices --time --change
venum stream prices SOL,ETH --timeYou can also override config per command:
venum --api-key your_key --api-url https://api.venum.dev prices SOL,ETHCheck API health:
venum healthGet prices:
venum price SOL
venum prices SOL,ETH,JUP
venum pricesBrowse pools:
venum pools SOL
venum pools SOL USDC
venum pools --tokens SOL,USDC,JUP --limit 25
venum pool <pool-address>
venum new-pools --limit 20Browse supported tokens:
venum tokens
venum tokens --category memecoinGet a quote:
venum quote SOL USDC 1000000000
venum quote SOL USDC 1000000000 --slippage 50 --jsonBuild a swap transaction:
venum swap build SOL USDC 1000000000 --wallet <pubkey>Build, sign locally, and submit in one command:
venum swap sign-and-submit SOL USDC 1000000000 --keypair ~/.config/solana/id.json
venum swap sign-and-submit SOL USDC 1000000000 --keypair ~/.config/solana/id.json --waitReuse a previous build artifact:
venum swap build SOL USDC 1000000000 --wallet <pubkey> --json > build.json
venum swap sign-and-submit --build-file ./build.json --keypair ~/.config/solana/id.jsonReuse a prior quoteId plus unsigned transaction:
venum swap sign-and-submit --quote-id <quote-id> --tx <base64> --keypair ~/.config/solana/id.json
venum swap sign-and-submit --quote-id <quote-id> --file ./unsigned-tx.txt --keypair ~/.config/solana/id.jsonSubmit a signed swap transaction with a quote id:
venum swap submit --quote-id <quote-id> --signed-tx <base64>
venum swap submit --quote-id <quote-id> --file ./signed-tx.txtSubmit any signed transaction:
venum send <base64>
venum send --file ./signed-tx.txtTrack a transaction:
venum tx <signature>Stream live prices:
venum prices
venum prices --time --change
venum stream prices SOL,ETH,BONK
venum stream prices --jsonStream newly discovered pools:
venum stream poolsWhen you use venum swap sign-and-submit --wait, the CLI first tries the transaction SSE confirmation stream and falls back to polling tx if the stream is unavailable.
Command Reference
venum health
venum price <token>
venum prices [tokens]
venum pool <address>
venum pools [tokenA] [tokenB] [--token <token>] [--tokens <tokens>] [--dex <dex>] [--limit <n>] [--offset <n>]
venum new-pools [--limit <n>]
venum tokens [--category <category>]
venum quote <inputMint> <outputMint> <amount> [--slippage <bps>]
venum swap build <inputMint> <outputMint> <amount> --wallet <pubkey> [--slippage <bps>]
venum swap sign-and-submit <inputMint> <outputMint> <amount> --keypair <path> [--slippage <bps>] [--wait]
venum swap sign-and-submit --build-file <path> --keypair <path> [--wait]
venum swap sign-and-submit --quote-id <id> [--tx <base64> | --file <path>] --keypair <path> [--wait]
venum swap submit --quote-id <id> [--signed-tx <base64> | --file <path>]
venum send [transaction] [--file <path>]
venum tx <signature>
venum stream prices [tokens] [--time] [--change]
venum stream pools
venum config get
venum config path
venum config set <key> <value>
venum config unset <key>Agent Workflows
This CLI is designed to be usable by coding agents and trading agents.
Recommended patterns:
- use
--jsonwhen another tool or agent will parse the output - save
VENUM_API_KEYin env or config once, then reuse it - use
quote -> swap build -> swap submit -> txas the default execution flow - use
swap sign-and-submitwhen you want the CLI to handle local keypair signing - use
stream pricesandstream poolswhen you want push-based updates instead of polling - use default text output for humans and
--jsonfor agents
Example machine-readable flow:
venum quote SOL USDC 1000000000 --json
venum swap build SOL USDC 1000000000 --wallet <pubkey> --json
venum tx <signature> --jsonWhy This Exists
Most Solana apps and bots still use more raw RPC than they should.
Venum is building a higher-level execution surface for Solana:
- prices
- pools
- quotes
- transaction building
- submission
- transaction tracking
- agent-friendly tooling
@venumdev/cli is the terminal-native entry point into that surface.
Related Venum Projects
@venumdev/terminalfor the real-time trading TUI:https://github.com/venumhq/solana-venum-terminal@venumdev/sdkfor the typed JavaScript client@venumdev/txfor transaction submission and confirmation toolinghttps://www.venum.devfor the main product sitehttps://swap.venum.devfor the hosted swap producthttps://docs.venum.devfor API docs
Development
Typecheck:
pnpm checkRun help:
pnpm start
pnpm start -- --helpLicense
MIT
