Onyx
A food diary in a file any app can read.
Calorie trackers export files no other tracker will import, so years of logging stay stuck in the app they started in. Onyx is a format for a personal food and body-weight diary that any app can write and read.
What it is
- A specification, at 1.0.0. Meals, foods, nutrients and weigh-ins, with units and time zones spelled out, so a file means the same thing in every app that reads it.
- Public domain. The specification, schemas and conformance tests are CC0. Implement them, fork them or rename them without asking. The engine is MIT or Apache-2.0.
- A conformance corpus. Files that must pass and files that must fail, in plain JSON, so a new implementation can show it is correct in any language.
- A validator with nothing to install.
npx @dsemakin/onyx validate diary.json, or a standalone binary from the releases page.
Who uses it
Burnin writes and reads Onyx since version 1.2.2. Its export saves the whole diary as an Onyx file, and importing one merges it into what is already on the phone rather than replacing it.
One app is not a format yet. If you build a tracker, run the conformance corpus against your reader or writer and add it to the list of implementations.
Read more
The specification
The full format, versioning rules and what a reader must accept.
Read SPEC.mdWhy we wrote it
The formats we looked at first, and the three decisions behind Onyx.
Read the post
Onyx was first published as Open Nutrition Log. Readers accept that name in a
file's format field, and the original v1 schema stays at its address,
bein.ltd/schema/onl/v1/log.schema.json.