npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

liver-cli

v0.1.2

Published

BAC tracking CLI

Readme

liver — BAC Tracking CLI

A command-line tool for tracking Blood Alcohol Concentration (BAC) over time. Supports sessions, presets, statistics, and SVG export of BAC curves.

Installation

npm install -g liver-cli

Setup

# Set your profile (required before using other commands)
liver profile set --weight 78 --height 184 --sex m --age 22

# Save drink presets
liver preset set augustiner --vol 500 --abv 5.2
liver preset set shot --vol 40 --abv 40

Commands

Profile

| Command | Description | |---------|-------------| | liver profile set [options] | Set your profile | | liver profile show | Show current profile |

profile set options:

  • --weight <kg> — Weight in kg (30–250)
  • --height <cm> — Height in cm (120–230)
  • --sex <m\|f\|o> — Sex (male/female/other)
  • --age <n> — Age (16–120)
  • --formula <watmark\|watson> — Preferred BAC formula

Preset

| Command | Description | |---------|-------------| | liver preset set <name> | Create/update a drink preset | | liver preset list | List all presets | | liver preset show <name> | Show a preset | | liver preset rm <name> | Remove a preset |

preset set options:

  • --vol <ml> — Volume in ml (0–5000)
  • --abv <pct> — ABV in percent (0–100)

Session

| Command | Description | |---------|-------------| | liver session start [options] | Start a drinking session | | liver session end [options] | End current session | | liver session show | Show current session | | liver session list [options] | List sessions | | liver session stomach <state> | Set stomach state | | liver session rename <id> | Rename a session |

session start options:

  • --name <str> — Session name
  • --stomach <empty\|some\|full> — Initial stomach state (default: some)

session stomach options:

  • --at <T> — Backdated time

Drinks

| Command | Description | |---------|-------------| | liver add [preset] [options] | Add a drink | | liver start [preset] [options] | Start drinking (adds a running drink) | | liver stop [options] | Stop current drink | | liver drink list | List all drinks | | liver drink rm <id> | Remove a drink |

add / start options:

  • --vol <ml> — Volume in ml
  • --abv <pct> — ABV in percent
  • --at <T> — Time (default: now)
  • --duration <Xm\|Xh> — Drink duration (e.g. 25m)
  • --stomach <empty\|some\|full> — Stomach state at time of drink
  • --session new — Create new session for backdated drink

stop options:

  • --at <T> — Stop time

BAC Status

| Command | Description | |---------|-------------| | liver status | Current BAC status | | liver bac [options] | BAC at specific time | | liver curve [options] | BAC curve over time | | liver sober [options] | Time until sober |

bac options:

  • --at <T> — Time to check BAC for

curve options:

  • --from <T> — Start time (default: session start)
  • --to <T> — End time (default: sober time)
  • --step <minutes> — Step in minutes (default: 5)
  • --export svg — Export as SVG

sober options:

  • --at <T> — Time to calculate from

Statistics

| Command | Description | |---------|-------------| | liver stats [options] | Drinking statistics |

stats options:

  • --month <YYYY-MM> — Specific month
  • --year <YYYY> — Specific year
  • --from <T> — From date
  • --to <T> — To date
  • --all — All time (default: last 30 days)

Config

| Command | Description | |---------|-------------| | liver config set <key> <value> | Set config value | | liver config get <key> | Get config value | | liver config list | List all config |

Config keys:

  • zones.sweet_spot_min — Sweet spot minimum (default: 0.4 ‰)
  • zones.sweet_spot_max — Sweet spot maximum (default: 0.8 ‰)
  • engine.default_formula — Default formula (default: watson)

Global Options

| Option | Description | |--------|-------------| | -V, --version | Output version | | --human | Human-readable output | | --no-color | Disable colors | | -v, --verbose | Verbose logging | | --formula <watson\|widmark> | BAC formula override |

Examples

Track a drinking session

# Start session
liver session start --name "Friday Night" --stomach full

# Add drinks
liver add augustiner              # instant
liver add augustiner --duration 25m
liver session stomach some       # stomach emptying
liver start shot                  # running drink
liver stop                       # stop it

# Check status
liver status
liver curve --from 19:30 --step 5m

# End session
liver session end

SVG export

liver curve --export svg > meine-kurve.svg
liver curve --from "2026-05-03T14:00" --to "2026-05-03T22:00" --step 15m --export svg

Backdated logging

liver add bier --at "yesterday 21:00" --session new --name "Yesterday"

Disclaimer

All BAC calculations are estimates and not legally or medically valid. Use responsibly.