Tutorial · Intermediate · 9 min
Push menu updates from CI with the MenuPi CLI
Wire `@menupi/cli` into GitHub Actions so a JSON menu change in your repo publishes to every screen.
Prerequisites
- MenuPi API key with `menu:write` + `playlists:write` scopes
- A GitHub repo + Actions enabled
What you will build
- A `menus/prod.json` file checked into your repo.
- A GitHub Actions workflow that pushes on every merge to main.
- A second job that publishes a target playlist.
- 1
Install the CLI locally
Run `npm install -g @menupi/cli` then `menupi auth login`. Paste your API key when prompted; credentials write to `~/.menupi/credentials.json`.
Shellnpm install -g @menupi/cli menupi auth login - 2
Author menus/prod.json
Shape: `{ menuGroupId, create?, update?, delete? }`. Keep prices, descriptions, image URLs, and SKU references in source control.
menus/prod.json·JSON{ "menuGroupId": "mg_abc123", "update": [ { "id": "mi_xyz", "price": 5.0 } ] } - 3
Add the GitHub Actions workflow
Drop the file below at `.github/workflows/menu-deploy.yml`. Store the API key as a repo secret named `MENUPI_API_KEY`.
.github/workflows/menu-deploy.yml·YAMLname: Menu deploy on: { push: { branches: [main] } } jobs: push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm install -g @menupi/cli - env: { MENUPI_API_KEY: ${{ secrets.MENUPI_API_KEY }} } run: menupi content push ./menus/prod.json - 4
Publish the playlist
Optional second job: republish the playlist after the content push completes so screens pick up the change immediately.
YAML- env: { MENUPI_API_KEY: ${{ secrets.MENUPI_API_KEY }} } run: menupi playlist publish pl_8XR4... --screen scr_main - 5
Verify on a screen
Push a tiny price change to main. Within a minute the GH Action goes green and the screen reflects the new price.