Documentation
CLI

CLI

Cup's CLI provides the cup check command.

Basic Usage

Check for all updates

$ cup check
nginx:alpine                                      Update available
redis:7                                           Update available
redis:alpine                                      Update available
...
centos:7                                                Up to date
mcr.microsoft.com/devcontainers/go:0-1.19-bullseye      Up to date
rockylinux:9-minimal                                    Up to date
rabbitmq:3.11.9-management                              Up to date
...
some/deleted:image                                         Unknown

Check for updates to a specific image

$ cup check node:latest
node:latest has an update available

Enable icons

You can also enable icons if you have a Nerd Font (opens in a new tab) installed.

JSON output

When integrating Cup with other services (e.g. webhooks or a dashboard), you may find Cup's JSON output functionality useful.

It provides some useful metrics (see server for more information), along with a list of images and whether they have an update or not.

$ cup check -r
{"metrics":{"update_available":4,"monitored_images":25,"unknown":1,"up_to_date":20},"images":{"ghcr.io/immich-app/immich-server:v1.106.4":false,"portainer/portainer-ce:2.20.3-alpine":false,"ghcr.io/runtipi/runtipi:v3.4.1":false,...}}

Here is how it would look in Typescript:

type CupData = {
    metrics: {
        monitored_images: number,
        up_to_date: number,
        update_available: number,
        unknown: number
    },
    images: {
        [image: string]: boolean | null
    }
}

Usage with Docker

If you're using the Docker image, just replace all occurences of cup in the examples with docker run -tv /var/run/docker.sock:/var/run/docker.sock ghcr.io/sergi0g/cup.

For example, this:

$ cup check node:latest

becomes:

$ docker run -tv /var/run/docker.sock:/var/run/docker.sock ghcr.io/sergi0g/cup check node:latest