@solworks/poll-cli
v0.1.31
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
poll bets create --question "..." --options "Yes,No" [--type USDC] [--amount 5]
poll bets wager <betAddress> --amount 10 --option 0
poll bets cancel <betAddress>
poll bets join <betAddress>
poll bets vote <betAddress> --option 0Wagers
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)
