Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

154 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

como โ€” track battery health from the command line

PyPI Version PyPI Python Versions PyPI License

como is a minimal CLI for recording and inspecting your laptop battery's health over time. It runs on macOS and Linux, stores everything locally in SQLite, and can schedule itself via launchd or cron.

Naming

Alessandro Volta โ€” who invented the battery โ€” grew up in Como, Italy. The name stuck.

Map of Como, Italy

Install

uv tool install como     # recommended
pipx install como        # alternative
pip install como         # also fine

Usage

Command Description
como / como save Record the current battery snapshot
como info Show current battery details (capacity, cycles, voltage, power, health)
como data [--since 30d] Show database stats and capacity/cycle history graphs. --since accepts d/w/m/y (e.g. 30d, 4w, 6m, 1y)
como export Write como.csv to the current directory
como import <file.csv> Import battery records from a CSV file
como automate Toggle scheduled saves (launchd on macOS, cron on Linux) at 8:00, 14:00, 20:00
como reset Delete the local database

Storage

Battery records live in a single SQLite database at:

  • macOS / Linux: $XDG_DATA_HOME/como/como.db (defaults to ~/.local/share/como/como.db)
  • Windows: %APPDATA%\como\como.db

The schema captures time, capacity, cycles, voltage_mv, power_mw, and is_charging for every save. Old zlib-compressed JSON databases from previous versions are migrated transparently on first run (a .bak of the original is kept alongside).

Development

Requires mise and uv.

mise install              # installs Python + uv per mise.toml
uv sync                   # creates .venv with all deps
uv run como info          # run the working-tree CLI (no install needed)
uv run pytest             # run tests with coverage
uv run pre-commit install # enable ruff + ty pre-commit hooks

License

MIT โ€” see LICENSE.

Copyright (c) 2012-2026, Cecil Wรถbker. Contact: me@cwoebker.com.

About

battery health & more ๐Ÿ”‹

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages