strawpoll-cli

module
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT

README

🍓 strawpoll-cli - StrawPoll in your terminal

A command-line interface for the StrawPoll API v3 - create and manage polls from the command line.

CI Go Report Card

Agent Skill

This CLI is available as an open agent skill for AI assistants including Claude Code, OpenClaw, Codex, Cursor, GitHub Copilot, and 35+ agents.

npx skills add dedene/strawpoll-cli

Features

  • Create polls - Multiple-choice polls with 20+ configuration options
  • View results - Colored ASCII tables with vote counts and percentages
  • Participant breakdown - See who voted for what with --participants
  • Delete polls - With confirmation prompt (or --force for scripting)
  • Multiple output formats - Human-readable tables, JSON, or plain TSV
  • Clipboard & browser - Copy poll URL or open it directly after creation
  • Config defaults - Save your preferred poll settings to avoid repetitive flags

Installation

Homebrew (macOS/Linux)
brew install dedene/tap/strawpoll
Go install
go install github.com/dedene/strawpoll-cli/cmd/strawpoll@latest
From source
git clone https://github.com/dedene/strawpoll-cli.git
cd strawpoll-cli
make build

Setup

You need a StrawPoll API key. Get one at strawpoll.com/account/settings.

# Store your API key securely in the system keyring
strawpoll auth set-key

# Verify it's configured
strawpoll auth status

Usage

Create a poll
# Simple poll
strawpoll poll create "Favorite color?" Red Blue Green Yellow

# With options
strawpoll poll create "Best framework?" React Vue Svelte Angular \
  --dupcheck session \
  --results-vis after_vote \
  --deadline 24h

# Copy URL to clipboard after creation
strawpoll poll create "Lunch?" Pizza Sushi Tacos --copy

# Open in browser
strawpoll poll create "Meeting day?" Monday Wednesday Friday --open
View poll details
# By poll ID
strawpoll poll get NPgxkzPqrn2

# By full URL (auto-extracts ID)
strawpoll poll get https://strawpoll.com/NPgxkzPqrn2
View results
# Results table with vote counts and percentages
strawpoll poll results NPgxkzPqrn2

# With per-participant breakdown
strawpoll poll results NPgxkzPqrn2 --participants
Delete a poll
# With confirmation prompt
strawpoll poll delete NPgxkzPqrn2

# Skip confirmation (for scripting)
strawpoll poll delete NPgxkzPqrn2 --force
Output formats
# JSON output (for scripting)
strawpoll poll get NPgxkzPqrn2 --json

# Plain TSV output
strawpoll poll results NPgxkzPqrn2 --plain

# Disable colors
strawpoll poll results NPgxkzPqrn2 --no-color
Configuration
# Set default poll options
strawpoll config set dupcheck session
strawpoll config set results_visibility after_vote

# View current config
strawpoll config show

# Show config file path
strawpoll config path

Shell completions

# Bash
strawpoll completion bash > /etc/bash_completion.d/strawpoll

# Zsh
strawpoll completion zsh > "${fpath[1]}/_strawpoll"

# Fish
strawpoll completion fish > ~/.config/fish/completions/strawpoll.fish

Environment variables

Variable Description
STRAWPOLL_API_KEY API key (overrides keyring)
STRAWPOLL_KEYRING_BACKEND Keyring backend: keychain, file, pass
STRAWPOLL_KEYRING_PASSWORD Password for file-based keyring
NO_COLOR Disable colored output

License

MIT - see LICENSE

Credits

Powered by the StrawPoll API v3.

Directories

Path Synopsis
cmd
strawpoll command
internal
api
cmd
output
Package output provides output formatting for CLI commands.
Package output provides output formatting for CLI commands.
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL