Eli Gao e2c34f17ba
feat(cli): watch paths for auto uploading daemon (#14923)
* feat(cli): watch paths for auto uploading daemon

* chore: update package-lock

* test(cli): Batcher util calss

* feat(cli): expose batcher params from startWatch()

* test(cli): startWatch() for `--watch`

* refactor(cli): more reliable watcher

* feat(cli): disable progress bar on --no-progress or --watch

* fix(cli): extensions match when upload with watch

* feat(cli): basic logs without progress on upload

* feat(cli): hide progress in uploadFiles()

* refactor(cli): use promise-based setTimeout() instead of hand crafted sleep()

* refactor(cli): unexport UPLOAD_WATCH consts

* refactor(cli): rename fsWatchListener() to onFile()

* test(cli): prefix dot to mocked getSupportedMediaTypes()

* test(cli): add tests for ignored patterns/ unsupported exts

* refactor(cli): minor changes for code reviews

* feat(cli): disable onFile logs when progress bar is enabled
2025-03-03 13:05:32 -05:00
..
2023-07-06 09:37:47 -05:00
2023-12-18 20:29:26 -06:00
2024-03-14 13:09:27 -04:00
2024-01-12 07:36:27 -05:00
2025-01-23 08:32:14 -05:00
2024-02-12 15:31:59 +00: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. To build the server run the following in the server folder:

$ npm install
$ npm run build

Then, to build the open-api client run the following in the open-api folder:

$ ./bin/generate-open-api.sh

To run the Immich CLI from source, run the following in the cli folder:

$ npm install
$ npm run build
$ ts-node .

You'll need ts-node, the easiest way to install it is to use npm:

$ npm i -g ts-node

You can also build and install the CLI using

$ npm run build
$ npm install -g .