Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmctl

Small CLI for La Marzocco Home machines using pylamarzocco.

Install

cd /Users/mrecachinas/Projects/Personal/lmctl
uv tool install --editable .
lmctl login

If lmctl is not on your PATH, run uv tool update-shell and restart your shell.

Config

Default config: ~/.config/lmctl/config.json

{
  "username": "you@example.com",
  "default_serial": "SERIAL"
}

The installation key is stored separately at ~/.config/lmctl/installation_key.json. Override paths with --config-file, --key-file, LMCTL_CONFIG_FILE, or LMCTL_KEY_FILE.

Saved passwords use the OS keychain (keyring service lmctl) and are keyed by username. Use lmctl password status or lmctl password forget to inspect or remove the saved password. lmctl login saves by default; use lmctl login --no-save-password or --no-keyring to opt out.

MCP

After lmctl login, agents can use stdio:

{
  "mcpServers": {
    "lmctl": {
      "command": "lmctl",
      "args": ["mcp"]
    }
  }
}

Or run a local Streamable HTTP server:

lmctl mcp http://127.0.0.1:8000/mcp

HTTP binds loopback only by default. --allow-remote exposes physical machine control and should only be used behind your own auth/TLS.

Help

usage: lmctl [-h] [--json] [--username USERNAME] [--password PASSWORD] [--no-keyring] [--key-file KEY_FILE]
             [--config-file CONFIG_FILE]
             {login,switch,mcp,password,config,key,register,things,show,dashboard,settings,statistics,schedule,firmware,power,steam,water}
             ...

Control La Marzocco Home machines using pylamarzocco.

positional arguments:
  {login,switch,mcp,password,config,key,register,things,show,dashboard,settings,statistics,schedule,firmware,power,steam,water}
    login               Authenticate, choose a machine, and save defaults.
    switch              Choose a different default machine.
    mcp                 Run an MCP server for agent integrations.
    password            Manage the saved keychain password.
    config              Manage lmctl defaults.
    key                 Manage installation keys.
    register            Register the current installation key with La Marzocco.
    things              List account devices.
    show                Fetch dashboard, settings, statistics, schedule, and firmware.
    dashboard           Fetch a machine dashboard.
    settings            Fetch machine settings.
    statistics          Fetch machine statistics.
    schedule            Fetch a machine schedule.
    firmware            Fetch firmware information.
    power               Turn a machine on or off.
    steam               Turn steam on or off.
    water               EXPERIMENTAL: estimate reservoir water from counters.

options:
  -h, --help            show this help message and exit
  --json                Print JSON instead of human-readable output.
  --username USERNAME   La Marzocco Home username. Defaults to LMCTL_USERNAME or LAMARZOCCO_USERNAME, then saved config.
  --password PASSWORD   La Marzocco Home password. Defaults to LMCTL_PASSWORD, LAMARZOCCO_PASSWORD, saved keychain password, or an interactive prompt.
  --no-keyring          Do not read from or write to the OS keychain for this invocation.
  --key-file KEY_FILE   Installation key JSON file. Defaults to LMCTL_KEY_FILE or ~/.config/lmctl/installation_key.json.
  --config-file CONFIG_FILE
                        Configuration JSON file. Defaults to LMCTL_CONFIG_FILE or ~/.config/lmctl/config.json.

Experimental water estimate

lmctl water is experimental. La Marzocco exposes the Micra's low-water alarm, coffee count, and flush count, but not a continuous reservoir sensor. The estimate is useful for rough "full / half / low soon" guidance, not exact milliliters.

After filling the tank, reset the baseline:

lmctl water refill

Then estimate remaining water:

lmctl water estimate

Steam and manual water use are not exposed by the machine API. Log those separately when you want them reflected in future estimates:

lmctl water log-use 75 --note steam

Calibration flags are available on refill and estimate: --tank-ml, --reserve-ml, --shot-ml, and --flush-ml. The estimator stores per-machine state in water.json next to your lmctl config by default.

The MCP server also exposes the experimental water estimator as get_water_estimate, mark_water_refill, and log_water_use.

Development

uv run pytest -q
uv build

About

Lamarzocco CLI and MCP

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages