election-vibe 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +10 -0
  2. package/dist/cli.js +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -27,6 +27,14 @@ On Tuesday, after the polls close:
27
27
 
28
28
  Without installing, put `npx election-vibe` where `elections` is (`npx election-vibe collect`, `npx election-vibe watch`). The statusline and the plugin need the global install.
29
29
 
30
+ ### One-step setup with Claude
31
+
32
+ In Claude Code (the terminal CLI, or its desktop app), you can hand the whole setup to Claude. Paste this prompt and Claude installs the package, starts the collector, asks which races you care about, and follows them:
33
+
34
+ > Set up election-vibe for election night. If you cannot run commands on my computer, say so and stop. Install it with `npm i -g election-vibe` (it needs Node 22 or later; help me get that first if it is missing). Add its Claude Code plugin: `claude plugin marketplace add "$(npm root -g)/election-vibe"`, then `claude plugin install election-vibe@election-vibe --config store=production`. Start the collector by running `elections collect` in a terminal tab and leave it running. Then ask me which state I vote in and which races I care about (one question at a time, with answer options when you can), look them up with `elections find`, and follow them with `elections follow <id>`. If a race needs a district I do not know, point me to my county registrar's lookup instead of guessing. When everything is set, tell me to run /reload-plugins so the results line and the /elections pane appear. Results are unofficial: never call a race yourself, and present a check mark only as the named source's call.
35
+
36
+ The collector runs while that terminal tab stays open; every other surface reads its local snapshot. On default permission settings Claude asks you to approve the install steps; that is expected. The prompt sets up the plugin (Option B below); [In Claude Code](#in-claude-code) describes what it shows and the statusline alternative.
37
+
30
38
  ## What you will see
31
39
 
32
40
  Printed on Sunday, Nov 1, 2026, 9:39 PM PST, from real reads of the sources. Before the polls close, every contest looks like this: no counts yet, and the time its polls close.
@@ -133,6 +141,8 @@ elections list --state CA --level measure # every California measure, statewide
133
141
 
134
142
  Two ways, both reading the same local snapshot. Pick one: in a terminal, using both shows the same line twice (once in the statusline, once above the prompt). Both need the global install (`npm i -g election-vibe`); `npx` leaves nothing installed for them to run.
135
143
 
144
+ Setup can also be a single pasted prompt: see [One-step setup with Claude](#one-step-setup-with-claude).
145
+
136
146
  ### Option A: the statusline only
137
147
 
138
148
  `prompt` prints one line for a statusline: your followed contests (or, with none followed, the hot races), one shown and the rest counted (`+N`). A source call or a withdrawn call from the last five minutes is shown first. It reads the local snapshot only: it never fetches, never starts the collector, and never prints an error (with no snapshot it says `no results yet · run: elections collect`). Before any of those contests' polls close it says when the first one does; a snapshot more than 10 minutes old is called out first (`⚠ results 14m old`). Same words as the board: "leading" is never a win, and ✓ marks only a named source's call. `--width N` (default 80), `--color` for color, `--store rehearsal` for the test store.
package/dist/cli.js CHANGED
@@ -216,7 +216,7 @@ var REHEARSAL_SENTENCE = {
216
216
 
217
217
  // src/http.ts
218
218
  import { gunzipSync } from "zlib";
219
- var USER_AGENT = `ElectionsCompanion/${"0.1.2"} (unofficial results reader; local, no telemetry)`;
219
+ var USER_AGENT = `ElectionsCompanion/${"0.1.3"} (unofficial results reader; local, no telemetry)`;
220
220
  function retryAfterMs(header, nowMs) {
221
221
  if (!header) return void 0;
222
222
  const t = header.trim();
@@ -46335,7 +46335,7 @@ function storeOf(p) {
46335
46335
  }
46336
46336
  async function main(argv, io) {
46337
46337
  if (argv[0] === "--version" || argv[0] === "version") {
46338
- io.out("0.1.2");
46338
+ io.out("0.1.3");
46339
46339
  return 0;
46340
46340
  }
46341
46341
  const p = parseArgs(argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "election-vibe",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "US election night, Nov 3, 2026, in your terminal and in Claude Code: unofficial results from official free sources and civicAPI, kept on your machine. Never calls a race. Unofficial results. Not an election authority. Not affiliated with any government, campaign, or party.",
5
5
  "keywords": [
6
6
  "election",