DEV Community

Lifan
Lifan

Posted on • Originally published at clifan.substack.com

Building a local-first MyChart exporter for a changing medical record

mychart-cli started as a practical family tool.

While we were caring for a medically complex baby in the NICU, notes and test
results kept changing. I needed a current copy of the records we could already
view, in a form that a local downstream workflow could consume without
rebuilding context by hand.

The result is a Node.js CLI that:

  • launches a dedicated Chrome profile
  • reads records available to the signed-in MyChart user
  • stores normalized records locally
  • exports Markdown or chunked JSONL
  • validates the active chart before mutating the store

The CLI does not explain records or make medical decisions. A separate local
workflow used the exports for timely explanations. Keeping those two jobs
separate made the data boundary easier to understand and test.

A runnable demo without a chart

Reviewing a MyChart tool should not require sharing a chart. The public beta has
an offline synthetic demo:

npx @lifan-builds/mychart-cli demo
Enter fullscreen mode Exit fullscreen mode

It exercises the installed command and JSONL export shape without starting
Chrome, accessing the network, or writing a record store.

Privacy choices

The project has no backend, telemetry, cloud sync, or built-in LLM. New installs
use the operating system's application-data directory. Stores, exports,
attachments, and browser metadata use private POSIX permissions.

The dedicated Chrome profile is still sensitive because it contains cookies.
Exports are medical data. If a user sends an export to another application,
that application's privacy rules apply.

Public issue templates reject medical records, screenshots, portal URLs, and
credentials. Bugs need synthetic reproductions.

Beta scope

Version 0.1.0 targets macOS, Node.js 20 or newer, and Google Chrome. MyChart
deployments vary, and I expect portal-specific fixes. The project is unofficial,
not affiliated with Epic or a health care provider, and not medical advice.

Repository and setup guide:

https://github.com/lifan-builds/mychart-cli

Top comments (0)