Skip to main content

Immich CLI

Immich CLI is a command-line-interface (CLI) that uploads media to an Immich instance. It is available as both an npm package and a Docker image.

This page describes every command and option. For worked examples, see Upload media with the CLI.

Install

npm package

Immich CLI is published as @immich/cli on the npm registry and requires a minimum Node.js version of v20.x.

npm i -g @immich/cli

If you previously installed the legacy CLI, uninstall it first:

npm uninstall -g immich

Docker

Immich CLI is available as a Docker image on both GitHub and Docker Hub. See below for the image name on each platform.

PlatformImage name
GitHubghcr.io/immich-app/immich-cli
Docker Hubimmichapp/immich-cli

The image entrypoint is the immich command itself, so arguments passed to docker run are passed straight to the CLI.

Global options

The following options apply to all commands.

OptionEnvironment variableDefault valueDescription
-d, --config-directory <directory>IMMICH_CONFIG_DIR~/.config/immich/Configuration directory where auth.yml will be stored
-u, --url [url]IMMICH_INSTANCE_URLImmich server URL
-k, --key [key]IMMICH_API_KEYImmich API key
-V, --versionOutput the version number
-h, --helpDisplay help for command

Commands

login

immich login <url> <key>

Login using an API key. The credentials are stored in auth.yml inside the configuration directory. Also available as immich login-key.

ArgumentDescription
urlImmich server URL
keyImmich API key

logout

immich logout

Removes the stored credentials.

server-info

immich server-info

Displays information about the server, including its version.

upload

immich upload [paths...] [options]

OptionEnvironment variableDefault valueDescription
[paths...]One or more paths to assets to be uploaded
-r, --recursiveIMMICH_RECURSIVEfalseRecursively crawl directories
-i, --ignore <pattern>IMMICH_IGNORE_PATHSPattern to ignore
--skip-hashIMMICH_SKIP_HASHfalseDon't hash files before upload
-H, --include-hiddenIMMICH_INCLUDE_HIDDENfalseInclude hidden folders
-a, --albumIMMICH_AUTO_CREATE_ALBUMfalseAutomatically create albums based on folder name
-A, --album-name <name>IMMICH_ALBUM_NAMEAdd all assets to specified album (conflicts with --album)
--visibility <visibility>IMMICH_VISIBILITYSet the visibility of uploaded assets
-n, --dry-runIMMICH_DRY_RUNfalseDon't perform any actions, just show what will be done
-c, --concurrency <number>IMMICH_UPLOAD_CONCURRENCYnumber of CPU cores, minus oneNumber of assets to upload at the same time
-j, --json-outputIMMICH_JSON_OUTPUTfalseOutput detailed information in json format
--deleteIMMICH_DELETE_ASSETSDelete local assets after upload
--delete-duplicatesIMMICH_DELETE_DUPLICATESDelete local assets that are duplicates (already exist on server)
--no-progressIMMICH_PROGRESS_BARprogress bars are shownHide progress bars
--watchIMMICH_WATCH_CHANGESfalseWatch for changes and upload automatically (implies --no-progress)

--visibility accepts archive, timeline, hidden, or locked. --dry-run conflicts with --skip-hash, and --album-name conflicts with --album.

With --json-output, the printed JSON contains three keys: newFiles, duplicates, and newAssets.