immich/cli
2023-11-13 09:23:01 +01:00
..
src Merge branch 'main' of https://github.com/immich-app/immich into feat/cli-albums 2023-11-13 09:23:01 +01:00
.editorconfig feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
.eslintignore feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
.eslintrc.js fix(server,cli): don't float promises (#4433) 2023-10-13 01:22:40 -04:00
.gitignore feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
.prettierignore feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
.prettierrc feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
package-lock.json chore(deps): update dependency eslint to v8.53.0 (#4986) 2023-11-12 21:46:22 -06:00
package.json fix: add check step to cli 2023-11-11 00:49:55 +01:00
README.md fix: typos 2023-11-11 00:51:02 +01:00
testSetup.js feat(cli) Add new CLI (#3066) 2023-07-06 09:37:47 -05:00
tsconfig.build.json feat(cli): add build script and unify tests (#3369) 2023-07-21 13:10:01 -05:00
tsconfig.json fix: add check step to cli 2023-11-11 00:49:55 +01:00

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

Installing

To use the cli, run

$ npm install @immich/cli

Usage

To use the CLI, you need to login with an API key first:

$ immich login-key https://your-immich-instance/api your-api-key

NOTE: This will store your api key in cleartext under ~/.config/immich/auth.yml

Next, you can run commands, for example:

$ immich server-info

When you're done, log out to remove the credentials from your filesystem

$ immich logout

Commands

Usage: immich [options] [command]

Immich command line interface

Options:
  -h, --help                        display help for command

Commands:
  upload [options] [paths...]       Upload assets
  server-info                       Display server information
  login-key [instanceUrl] [apiKey]  Login using an API key
  logout                            Remove stored credentials
  help [command]                    display help for command

Todo

  • Sidecar should check both .jpg.xmp and .xmp
  • Sidecar check could be case-insensitive
  • Use the SDK for all api calls. We currently use raw axos http calls
  • Use list of supported files from server via api

For developers

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

$ 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 .