Skip to main content

Overview

The dex polls command manages poll creation, editing, status control, results analysis, and publishing to test and production environments.

Usage

dex polls <validate|create|edit|close|open|publish|overview|live|trend|snapshots|publish-results|promote-results> [args]

Subcommands

Validate

Validate the polls.json file schema.
dex polls validate [--file data/polls.json]
--file
string
Path to polls.json file (overrides default)

Create

Create a new poll draft.
dex polls create [--question ...] [--visibility public|members] [--status draft|open|closed] [--file ...]
--question
string
Poll question text
--visibility
string
Poll visibility: public or members
--status
string
Initial status: draft, open, or closed
--call-year
number
Year for inDex call reference
--file
string
Path to polls.json file

Edit

Edit an existing poll.
dex polls edit <pollId> [--question ... --visibility ... --status ... --closeAt ... --manualClose true|false --file ...]
pollId
string
required
Poll ID to edit
--question
string
Update poll question
--visibility
string
Update visibility: public or members
--status
string
Update status: draft, open, or closed
--closeAt
string
ISO 8601 timestamp for automatic close
--manualClose
boolean
Enable/disable manual close mode
--call-sequence
number
Update inDex call sequence number
--call-year
number
Update inDex call year

Close / Open

Change poll status.
dex polls close <pollId> [--file ...]
dex polls open <pollId> [--file ...]
pollId
string
required
Poll ID to update

Publish

Publish polls to remote environment.
dex polls publish --env test|prod [--file ...]
--env
string
required
Target environment: test or prod
--file
string
Path to polls.json file

Analytics Commands

Overview

Get overview of all polls with vote counts.
dex polls overview [--env test|prod] [--window 30d]
--env
string
Environment to query: test or prod (default: test)
--window
string
Time window for stats (e.g., 30d, 90d)

Live

Get live voting results for a poll.
dex polls live <pollId> [--env test|prod]
pollId
string
required
Poll ID to query
--env
string
Environment to query (default: test)

Trend

Visualize voting trends over time.
dex polls trend <pollId> [--env test|prod] [--window 90d] [--bucket day] [--chart line|stack|velocity]
pollId
string
required
Poll ID to analyze
--env
string
Environment to query (default: test)
--window
string
Time window (e.g., 7d, 30d, 90d)
--bucket
string
Time bucket size: hour, day, week
--chart
string
Chart type: line, stack, or velocity
--json
boolean
Output raw JSON instead of chart

Snapshots

List published result snapshots.
dex polls snapshots <pollId> [--env test|prod]
pollId
string
required
Poll ID to query

Publish Results

Publish poll results snapshot.
dex polls publish-results <pollId> --summary-file <path> [--headline ...] [--draft]
pollId
string
required
Poll ID to publish results for
--summary-file
string
required
Path to markdown summary file
--headline
string
Results headline text
--draft
boolean
Create as draft (don’t publish immediately)
--window
string
Time window for trend data (default: 90d)
--env
string
Environment (default: test)

Promote Results

Promote a draft snapshot to published state.
dex polls promote-results <pollId> --version <n> [--env test|prod]
pollId
string
required
Poll ID
--version
number
required
Snapshot version number to promote

Examples

Create and open a poll

dex polls create --question "What instrument should be featured next?" --visibility public --status open

View live results

dex polls live poll-2026-01
dex polls trend poll-2026-01 --window 30d --bucket day --chart stack

Close a poll

dex polls close poll-2026-01

Publish results

dex polls publish-results poll-2026-01 --summary-file ./results-summary.md --headline "Poll Results: Instrument Feature"

Publish to production

dex polls publish --env prod

Workflow

1

Create poll

Use dex polls create to create a new poll draft
2

Configure poll

Edit question, options, and settings using dex polls edit
3

Open for voting

Make poll active: dex polls open <pollId>
4

Monitor results

Track voting with dex polls live and dex polls trend
5

Close poll

End voting period: dex polls close <pollId>
6

Publish results

Share results using dex polls publish-results

Desk Mode

Launch the interactive polls desk for real-time monitoring:
dex polls desk [--env test|prod] [--layout <name>] [--paused]
--env
string
Environment for operations (default: test)
--layout
string
Desk layout configuration
--paused
boolean
Start in paused mode

See Also

Build docs developers (and LLMs) love