Read-only CLI for browsing and exporting recipes from the Mela macOS app
Project description
Mela CLI
mela is a read-only macOS CLI for browsing and exporting recipes from the local Mela app catalog.
It reads Mela's local Core Data SQLite store directly and never writes to the live database.
About Mela
Mela is a recipe manager for iOS and macOS with iCloud sync. The
official app supports collecting recipes from the web, feeds, and scans, then using them in
cook mode, meal planning, and groceries workflows. See the official
Help and File Format Documentation
for product details and the melarecipe / melarecipes formats.
Project Relationship
mela is an unofficial companion CLI for people who want shell access to their local Mela
catalog. It is not the Mela app itself and it does not use an official Mela API.
Why Read-only
Mela stores its live catalog in a local Core Data SQLite store inside its macOS app-group container, and syncing is handled through CloudKit-backed Core Data state rather than simple document files.
That makes read access practical, but direct writes are risky:
- raw SQLite writes would bypass the Core Data and CloudKit bookkeeping that Mela expects
- the live store includes sync/history metadata in addition to recipe content
- there is no documented public API for in-place catalog edits
mela therefore treats the local store as read-only. It is designed to be safe for browsing,
searching, diagnostics, and export. When you need a writable format, use --format melarecipe
or export-all to generate importable files rather than mutating the live database.
Status
- Platform: macOS only
- Python: 3.11+
- Scope: read-only
- Primary install path:
pipx install mela-cli
What It Does
- Lists and searches recipes in your local Mela catalog as table, JSON, or CSV summaries
- Shows individual recipes in terminal-friendly text, Markdown, or JSON
- Exports recipes as
.melarecipe, JSON, or Markdown - Reports tags, catalog stats, and discovery/runtime diagnostics
What It Does Not Do
- It does not write to Mela's live SQLite database
- It does not provide a supported import/write workflow yet
- It does not target non-macOS platforms
Installation
Recommended:
pipx install mela-cli
Development install:
python3 -m pip install -e .
Discovery
By default, mela tries to discover the official installed Mela app and derive the live catalog paths from the app's bundle metadata and group container layout.
Discovery precedence:
- CLI flags
- Environment variables
- Auto-discovery
Supported overrides:
--app-path--db-path--support-dir--compression-tool
Environment variables:
MELA_APP_PATHMELA_DB_PATHMELA_SUPPORT_DIRMELA_COMPRESSION_TOOL
Use mela doctor to inspect what was discovered.
Commands
mela list [-q QUERY] [-f] [-w] [-t TAG] [-n N] [--format table|json|csv]
mela search QUERY [-f] [-w] [-t TAG] [-n N] [--format table|json|csv] # alias for list --query
mela show SELECTOR [--format text|markdown|json]
mela export SELECTOR [--format melarecipe|json|markdown] [-o DIR] [--filename-style slug|id|id-slug] [--compact]
mela export-all [-q QUERY] [-f] [-w] [-t TAG] [-n N] [--format melarecipe|json|markdown] [-o DIR] [--filename-style slug|id|id-slug] [--compact]
mela tags [--format table|json]
mela stats [--format table|json]
mela doctor [--format table|json]
Selector resolution order for single-recipe commands:
- Numeric primary key
- Exact Mela record ID
- Exact title
- Unique record-ID prefix
- Unique title fragment
Ambiguous matches fail with a clear error and suggested PKs.
Option Reference
Global options available before any subcommand:
--app-path: override auto-discovery and point directly atMela.app--db-path: use a specificCurcuma.sqlitefile--support-dir: use a specific Core Data external blob directory--compression-tool: use a specificcompression_toolpath or command name
list options (search is an alias that takes the query as a positional argument):
-q/--query QUERY: case-insensitive text search across recipe content-f/--favorite: only include favorite recipes-w/--want-to-cook: only include recipes marked want-to-cook-t/--tag TAG: filter by tag; repeat the flag to require multiple tags-n/--limit N: cap the number of returned recipes--format table|json|csv: choose human-readable table output or machine-readable JSON/CSV
show options:
SELECTOR: recipe PK, exact record ID, exact title, unique record-ID prefix, or unique title fragment--format text|markdown|json: choose terminal text, Markdown, or full recipe JSON
export options:
SELECTOR: same selector rules asshow--format melarecipe|json|markdown: choose Mela import JSON, full recipe JSON, or Markdown-o/--output DIR: directory to write the exported file (default: current directory)--filename-style slug|id|id-slug: filename style — title-based slug (default), record UUID, or UUID + slug--compact: minify JSON output formelarecipeandjsonexports; ignored formarkdown
export-all options:
-q/--query QUERY: full-text filter across recipe content-f/--favorite,-w/--want-to-cook,-t/--tag TAG,-n/--limit N: same filtering aslist--format melarecipe|json|markdown: output format for each exported recipe-o/--output DIR: destination directory for bulk exports (default: current directory)--filename-style slug|id|id-slug: filename style — title-based slug (default), record UUID, or UUID + slug--compact: minify JSON output formelarecipeandjsonexports; ignored formarkdown
tags, stats, and doctor options:
--format table|json: choose human-readable table output or machine-readable JSON
Examples
List favorite recipes:
mela list --favorite
Search for soup recipes as JSON:
mela list -q soup --format json
Export the current summary catalog as CSV:
mela list --format csv
Show one recipe in Markdown:
mela show 42 --format markdown
Export one recipe as a Mela import file to the current directory:
mela export "Instant Pot Chicken Adobo"
Export one recipe to a specific directory, named by record ID:
mela export "Instant Pot Chicken Adobo" --output ./exports --filename-style id
Export minified JSON and inspect it:
mela export 42 --format json --compact | jq .
Export matching recipes to a directory:
mela export-all --tag Dessert --output ./desserts
Inspect runtime discovery:
mela doctor
Machine-readable Output
JSON is the stable machine-readable interface for v1. CSV is the stable summary export
format for list (and its search alias).
listreturns an array of recipe summariesshowreturns a full recipe objecttagsreturns an array of tag/count objectsstatsreturns a fixed stats objectdoctorreturns a structured discovery report
Human-readable table/text/Markdown output may evolve.
Summary fields for list --format json and list --format csv:
pkidtitletagsfavoritewantToCooklinkcreatedAtprepTimecookTimetotalTimeyieldimageCount
CSV conventions:
- fixed header order matching the field list above
tagsserialized as a semicolon-delimited string- booleans serialized as
true/false - missing values serialized as empty fields
imageCountserialized as an integer
tags --format json returns:
[
{"tag": "Breakfast", "count": 12}
]
stats --format json returns:
{
"recipes": 204,
"favorites": 10,
"wantToCook": 3,
"tags": 37,
"recipesWithImages": 166,
"recipesWithLinks": 170
}
Export format differences:
--format jsonuses the full Mela CLI recipe schema. It includes fields likepk,createdAt, and structured image objects with metadata plus base64 payloads.--format melarecipeuses a Mela import-oriented schema. It omits CLI-only fields likepkandcreatedAt, omits empty optional fields, and serializesimagesas an array of base64 strings.- Both are JSON-encoded. Use
jsonfor automation against the CLI contract andmelarecipewhen you want a file that Mela can import.
doctor --format json returns:
{
"ok": true,
"supportedPlatform": true,
"bundleId": "recipes.mela.appkit",
"applicationGroup": "TEAMID.recipes.mela",
"appPath": "/Applications/Mela.app",
"appPathSource": "auto-discovery",
"appExists": true,
"dbPath": "/Users/example/Library/Group Containers/TEAMID.recipes.mela/Data/Curcuma.sqlite",
"dbPathSource": "derived from app entitlement",
"dbExists": true,
"supportDir": "/Users/example/Library/Group Containers/TEAMID.recipes.mela/Data/.Curcuma_SUPPORT/_EXTERNAL_DATA",
"supportDirSource": "derived from app entitlement",
"supportDirExists": true,
"compressionTool": "compression_tool",
"compressionToolSource": "default",
"compressionToolResolvedPath": "/usr/bin/compression_tool",
"compressionToolAvailable": true,
"canReadCatalog": true,
"canDecodeExternalImages": true,
"recipeCount": 204,
"warnings": []
}
doctor fields are intended for diagnostics and environment inspection. ok means the CLI
can read the catalog and decode external image blobs with the currently discovered runtime.
Troubleshooting
If discovery does not find your Mela install or live catalog:
mela doctor
If needed, override the paths explicitly:
mela --db-path "/path/to/Curcuma.sqlite" --support-dir "/path/to/_EXTERNAL_DATA" list
Implementation Notes
- The CLI is based on Mela's current local macOS schema and storage layout.
- Image extraction supports:
- inline blobs
- raw Core Data external blobs
- LZFSE-compressed keyed-archive external blobs via macOS
compression_tool
.melarecipeoutput is produced from reverse-engineered local data rather than an official Mela API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mela_cli-1.0.1.tar.gz.
File metadata
- Download URL: mela_cli-1.0.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5c625f014b084926161ad0eda53041110c5c11cd6f80150a4f5034d6fe653c8
|
|
| MD5 |
b6ecb0b8408fa8719f7db64d0a8c0850
|
|
| BLAKE2b-256 |
a6a302eb7690ae7b6f65f7805337ba6e3923cfd15008377c925c873514d1ad48
|
Provenance
The following attestation bundles were made for mela_cli-1.0.1.tar.gz:
Publisher:
publish.yml on waynevernon/mela-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mela_cli-1.0.1.tar.gz -
Subject digest:
e5c625f014b084926161ad0eda53041110c5c11cd6f80150a4f5034d6fe653c8 - Sigstore transparency entry: 1154862130
- Sigstore integration time:
-
Permalink:
waynevernon/mela-cli@a3a60629908394e29aba026a62e40df59cfbf95b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/waynevernon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3a60629908394e29aba026a62e40df59cfbf95b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mela_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mela_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a130063fbbda7daf0f218069de5e654caa4078321ebc10676b9e0013c876823
|
|
| MD5 |
64cbf173ba6c6b084cb785a7a08c0be6
|
|
| BLAKE2b-256 |
705961c7c6e7931a48189d287a720861bf3e0684f72807c6b9650fac206ffa0f
|
Provenance
The following attestation bundles were made for mela_cli-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on waynevernon/mela-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mela_cli-1.0.1-py3-none-any.whl -
Subject digest:
8a130063fbbda7daf0f218069de5e654caa4078321ebc10676b9e0013c876823 - Sigstore transparency entry: 1154862132
- Sigstore integration time:
-
Permalink:
waynevernon/mela-cli@a3a60629908394e29aba026a62e40df59cfbf95b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/waynevernon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3a60629908394e29aba026a62e40df59cfbf95b -
Trigger Event:
push
-
Statement type: