简介
基于 StrawPoll API v3 的终端 CLI 工具,支持多选投票、会议时间协调与排名投票,适合开发者快速创建自动化投票工作流。
原始描述
Create and manage StrawPoll polls, meeting polls, and ranking polls from the terminal using the strawpoll CLI. Use when the user wants to create polls, view...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
strawpoll-cli 是一款面向终端的 StrawPoll 投票管理工具,支持三种核心投票类型:多选投票(multiple-choice)、会议时间投票(meeting/availability)和排名投票(ranking)。用户可通过简单的命令行指令完成投票创建、结果查看、更新删除等全生命周期管理。
基础使用流程为:安装 CLI 工具 → 配置 API Key(支持系统密钥环或环境变量)→ 执行投票操作。创建投票时可直接指定选项,也可启动交互式向导;支持多种输出格式(彩色表格/JSON/纯文本),便于人工查看或脚本集成。
显著优点
- 终端原生体验:无需打开浏览器即可完成投票管理,适合开发者工作流
- 三种投票模式覆盖:从简单多选到复杂的排名投票(Borda 计数法),再到会议时间协调,场景覆盖全面
- 脚本友好:JSON/Plain 输出格式、环境变量配置、强制操作选项,完美适配 CI/CD 和自动化脚本
- 交互式向导:无参数时自动启动向导,降低新用户上手门槛
- 配置持久化:支持
~/.config/strawpoll/config.yaml保存默认设置,避免重复输入
潜在缺点与局限性
- 依赖外部服务:所有数据存储于 StrawPoll 云端,无法离线使用,存在服务可用性风险
- 无投票端点:用户只能通过浏览器访问投票链接进行投票,CLI 仅支持管理端操作
- 选项数量受限:单投票最多 30 个选项,复杂场景可能不够用
- T3 来源:作者为个人开发者(dedene),无企业背书,长期维护存在不确定性
- Go 生态依赖:需通过 Homebrew 或 Go 工具链安装,对非开发者环境不够友好
适合的目标群体
- 需要快速发起团队投票的技术团队负责人
- 希望将投票流程集成到自动化脚本中的 DevOps 工程师
- 频繁组织会议、需要协调多人时间的项目经理
- 学术或社区场景需要进行排名投票(如董事会选举、优先级排序)的组织者
使用风险
- API Key 泄露风险:若使用环境变量存储密钥,可能在进程列表或日志中暴露;建议优先使用系统密钥环
- 误操作风险:
--force参数可跳过删除/重置确认,脚本中滥用可能导致数据丢失 - 网络依赖:所有操作需连接 StrawPoll API,网络中断时完全不可用
- 数据隐私:投票数据存储于第三方云服务,敏感决策场景需谨慎评估合规性
技能正文
name: strawpoll-cli description: > Create and manage StrawPoll polls, meeting polls, and ranking polls from the terminal using the strawpoll CLI. Use when the user wants to create polls, view poll results, schedule meetings with availability, run ranked-choice votes, delete or update polls, or automate StrawPoll workflows in scripts. license: MIT homepage: https://github.com/dedene/strawpoll-cli metadata: author: dedene version: "1.1.0" openclaw: primaryEnv: STRAWPOLL_API_KEY requires: env: - STRAWPOLL_API_KEY - STRAWPOLL_KEYRING_BACKEND bins: - strawpoll install: - kind: brew tap: dedene/tap formula: strawpoll bins: [strawpoll] - kind: go package: github.com/dedene/strawpoll-cli/cmd/strawpoll bins: [strawpoll]
strawpoll-cli
Command-line interface for the StrawPoll API v3. Supports three poll types: multiple-choice, meeting (availability), and ranking.
Installation
# Homebrew (macOS/Linux)
brew install dedene/tap/strawpoll
# Or via Go
go install github.com/dedene/strawpoll-cli/cmd/strawpoll@latest
Authentication
An API key is required. Get one at strawpoll.com/account/settings.
# Store in system keyring (interactive prompt)
strawpoll auth set-key
# Or use environment variable (for scripts/CI)
export STRAWPOLL_API_KEY="your-key-here"
# Verify setup
strawpoll auth status
Quick Start
# Create a poll
strawpoll poll create "Favorite language?" Go Rust Python TypeScript
# View poll details (accepts ID or full URL)
strawpoll poll get NPgxkzPqrn2
strawpoll poll get https://strawpoll.com/NPgxkzPqrn2
# View results with vote counts
strawpoll poll results NPgxkzPqrn2
# Delete (with confirmation)
strawpoll poll delete NPgxkzPqrn2
Poll Types
Multiple-Choice Polls
# Basic poll
strawpoll poll create "Best editor?" Vim Emacs "VS Code" Neovim
# With voting rules
strawpoll poll create "Pick up to 3" A B C D E \
--is-multiple-choice --multiple-choice-max 3 \
--dupcheck session --deadline 24h
# Private poll, copy URL to clipboard
strawpoll poll create "Team vote" Opt1 Opt2 --is-private --copy
# Open in browser after creation
strawpoll poll create "Quick poll" Yes No --open
# List your polls
strawpoll poll list --limit 10
# Update a poll
strawpoll poll update NPgxkzPqrn2 --title "New title" --add-option "New option"
# Reset votes (with confirmation)
strawpoll poll reset NPgxkzPqrn2
Meeting Polls (Availability)
# With all-day dates
strawpoll meeting create "Team standup" \
-d 2025-03-10 -d 2025-03-11 -d 2025-03-12
# With time ranges
strawpoll meeting create "1:1 meeting" \
-r "2025-03-10 09:00-10:00" \
-r "2025-03-10 14:00-15:00" \
--tz "America/New_York" --location "Room 4B"
# Interactive wizard (no dates = launches wizard)
strawpoll meeting create "Sprint planning"
# View availability grid
strawpoll meeting results xYz123abc
# List meeting polls
strawpoll meeting list
Ranking Polls
# Create ranking poll
strawpoll ranking create "Rank these frameworks" React Vue Svelte Angular Solid
# View Borda count results
strawpoll ranking results rAnK456
# Verbose: per-position breakdown
strawpoll ranking results rAnK456 --verbose
# List ranking polls
strawpoll ranking list
Output Formats
All commands support three output modes:
# Default: colored table (human-readable)
strawpoll poll results NPgxkzPqrn2
# JSON: structured output for scripting
strawpoll poll results NPgxkzPqrn2 --json
# Plain: tab-separated values
strawpoll poll results NPgxkzPqrn2 --plain
# Disable colors (also respects NO_COLOR env var)
strawpoll poll results NPgxkzPqrn2 --no-color
Scripting Examples
# Get poll ID from creation
POLL_ID=$(strawpoll poll create "Vote" A B --json | jq -r '.id')
# Pipe results
strawpoll poll results "$POLL_ID" --plain | cut -f1,3
# Delete without confirmation
strawpoll poll delete "$POLL_ID" --force
# Results with participant breakdown
strawpoll poll results "$POLL_ID" --participants --json
Configuration Defaults
Save preferred settings to avoid repetitive flags:
# Set defaults
strawpoll config set dupcheck session
strawpoll config set results_visibility after_vote
strawpoll config set is_private true
# View config
strawpoll config show
# Config file location
strawpoll config path
Config stored at ~/.config/strawpoll/config.yaml.
Interactive Mode
Create commands launch an interactive wizard when run in a terminal without arguments:
# Launches wizard (poll title, options, settings)
strawpoll poll create
# Launches meeting wizard (dates, times, location)
strawpoll meeting create "Team sync"
Wizards render on stderr; data output goes to stdout. In non-TTY (pipes), provide all arguments via flags.
Important Notes
- Poll options: minimum 2, maximum 30
- Poll IDs: accepts bare IDs or full URLs (with/without
https://,www.,/polls/) - Deadlines: RFC3339 (
2025-03-15T18:00:00Z) or duration (24h,1h30m) - Meeting dates:
YYYY-MM-DDfor all-day,YYYY-MM-DD HH:MM-HH:MMfor time ranges - Timezones: IANA format (e.g.,
Europe/Berlin,America/New_York) - No voting endpoint — voting is browser-only via the poll URL
Shell Completions
strawpoll completion bash > /etc/bash_completion.d/strawpoll
strawpoll completion zsh > "${fpath[1]}/_strawpoll"
strawpoll completion fish > ~/.config/fish/completions/strawpoll.fish
See reference.md for complete flag reference for all commands.
Installation
brew install dedene/tap/strawpoll
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。