immich/packages/cli
NoiceHax 650b0b985f fix(cli): report upload-time duplicates in json output
The `duplicates` key of `--json-output` was only populated from
`checkForDuplicates`, which asks the server about the checksums of the
whole batch at once. That check cannot detect files that are duplicated
within the batch itself, so those are handed to `uploadFiles`, which the
server then rejects with `AssetMediaStatus.Duplicate`. `uploadFiles`
counted them for the "Skipped N duplicate assets" log line but returned
them as new assets, so they never reached the json output. It now
returns them separately and `uploadBatch` merges them into `duplicates`.

Closes #24291
2026-08-13 22:52:26 +05:30
..
bin refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
src fix(cli): report upload-time duplicates in json output 2026-08-13 22:52:26 +05:30
.editorconfig refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
.gitignore refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
.npmignore refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
.prettierignore refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
.prettierrc refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
Dockerfile chore(deps): update node.js to v24.19.0 (#30703) 2026-08-11 12:27:42 +02:00
eslint.config.mjs chore: use import.meta.dirname instead of __dirname (#30738) 2026-08-12 18:01:30 +02:00
LICENSE refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00
mise.toml chore: sequence pnpm installs in mise tasks (#30412) 2026-07-30 15:12:42 -04:00
package.json chore: version v3.1.0 2026-07-27 18:20:33 +00:00
README.md chore: mise scripts (#28367) 2026-05-11 17:46:02 -04:00
tsconfig.json chore(deps): update dependency eslint-plugin-unicorn to v70 - abandoned (#29684) 2026-07-20 23:47:14 -04:00
vite.config.ts refactor: move cli to package folder (#28356) 2026-05-11 14:49:45 -04:00

A command-line interface for interfacing with the self-hosted photo manager Immich.

Please see the Immich CLI documentation.

For developers

Before building the CLI, you must build the immich server and the open-api client. You can use the following command:

$ mise //:open-api

Run from build

Go to the cli folder and build it:

$ pnpm install
$ pnpm run build
$ node dist/index.js

Run and Debug from source (VSCode)

With VScode you can run and debug the Immich CLI. Go to the launch.json file, find the Immich CLI config and change this with the command you need to debug

"args": ["upload", "--help"],

replace that for the command of your choice.

Install from build

You can also build and install the CLI using

$ pnpm run build
$ pnpm install -g .