@solworks/poll-cli
v0.1.32
Published
CLI tool for Poll.fun
Readme
poll-cli
Command-line interface for Poll.fun. Create bets, place wagers, check balances, and manage your account from the terminal.
Install
cd poll-cli && npm install && npm run buildAuthentication
Option A — Browser login (recommended):
poll auth loginOpens your browser for approval. Token saved to ~/.config/poll/credentials.json (0600 permissions).
Option B — Environment variable:
export POLL_API_TOKEN=polld_...
poll mePOLL_API_TOKEN takes precedence over stored credentials. Override the API endpoint with POLL_API_URL (default: https://api.poll.fun). Override the credential directory with POLL_CONFIG_DIR.
Usage
All commands accept --format <json|table|compact> (default: table).
Bet write commands that return a transaction signature also accept --confirm [true|false], which defaults to true and polls for confirmation with interactive feedback.
Account
poll me # Account info (name, UUID, balances)
poll me stats # Detailed profile stats
poll auth status # Auth status + credential health check
poll auth logout # Clear stored credentialsBets
poll bets trending # Trending bets
poll bets new # Newest bets
poll bets list # Your created, joined, and wagered bets
poll bets get <id> # Bet details (shows outcomes for multi-outcome bets)
# Create a binary (For/Against) bet
poll bets create --question "Will it rain tomorrow?" [--min-wager 5]
# Create a multi-outcome (v4) bet — pass --outcomes (2–64 comma-separated labels)
poll bets create --question "Who wins Group A?" --outcomes "Brazil,Spain,France"
# Place a wager — use --side on binary bets, --outcome-index on multi-outcome bets
poll bets wager <betAddress> --amount 10 --side for
poll bets wager <betAddress> --amount 10 --outcome-index 1
poll bets cancel <betAddress>
poll bets join <betAddress>
# Resolve by vote — use --outcome on binary bets, --outcome-index on multi-outcome bets
poll bets initiate-vote <betAddress>
poll bets vote <betAddress> --outcome for
poll bets vote <betAddress> --outcome-index 1Multi-outcome bets are version 4.
bets create --outcomesalways creates a v4 bet (even with two labels). For binary bets use--side/--outcome; for multi-outcome bets use--outcome-index. Using the wrong flag for a bet's version is rejected with a clear error.
Wagers
poll wagers # List your wagers
poll wagers --active # Active wagers onlySocial
poll friends list
poll friends add <uuid>
poll friends accept <requestId>
poll leaderboard # Global leaderboard
poll leaderboard me # Your rankingWallet & Misc
poll wallet balance
poll wallet transactions
poll notifications
poll streakToken Management
Create and revoke tokens via the web UI at poll.fun/settings, or use poll auth login to generate a token via browser auth flow. List your active tokens from the CLI:
poll auth token listAvailable scopes: read, bet:write, user:write, social:write, wallet:read.
Security
- Credentials stored with 0600 file permissions;
poll auth statuswarns if permissions are wrong - HTTPS enforced for all non-localhost API URLs
- Tokens are shown once on creation and cannot be retrieved again
- CLI login tokens default to 90-day expiry (max 1 year)
