luckflip
v2.0.0
Published
Certainty, now available via npm
Downloads
414
Maintainers
Readme
🔮 luckflip
Make decisions from the command line
$ luckflip
🔮 HEADS
$ luckflip "ship it" "fix it first"
🔮 ship it
$ luckflip "stay" "quit" --best-of 7
1. stay 1 – 0
2. quit 1 – 1
3. stay 2 – 1
4. stay 3 – 1
5. stay 4 – 1
🔮 stayNo coin. No hands. No second-guessing. Just answers.
Install
npm install --global luckflipor skip the commitment:
npx luckflipUsage
luckflip # heads or tails
luckflip "react" "vue" # pick one
luckflip "react" "vue" "svelte" # pick one from many
luckflip "rewrite" "refactor" -b 7 # best-of series
luckflip "deploy" "wait" -q # bare output for scriptsOptions
| flag | description |
|---|---|
| -b, --best-of <n> | run a series, majority wins — n must be odd |
| -q, --quiet | result only, no formatting |
| --seed <n> | deterministic result — same seed, same answer |
Works in scripts
# use the exit code
luckflip -q && npm run deploy || echo "not today"
# capture the result
CHOICE=$(luckflip "blue" "green" -q)
echo "deploying to $CHOICE"
# reproducible results
luckflip "a" "b" --seed $BUILD_NUMBER -qExit codes: first choice or heads → 0, second choice or tails → 1, three or more choices → always 0.
Why
You've been staring at the same two options for twenty minutes. Both are fine. Neither is obviously better. You need to just pick one and move on.
luckflip picks for you.
You move on.
License
MIT ©
