diff --git a/cli/package-lock.json b/cli/package-lock.json index 45e35a7666..372160121d 100644 --- a/cli/package-lock.json +++ b/cli/package-lock.json @@ -18,7 +18,7 @@ "yaml": "^2.3.1" }, "bin": { - "immich": "dist/index.js" + "immich": "dist/src/index.js" }, "devDependencies": { "@types/byte-size": "^8.1.0", diff --git a/cli/package.json b/cli/package.json index 2476c4a8e1..b42da01018 100644 --- a/cli/package.json +++ b/cli/package.json @@ -4,7 +4,7 @@ "description": "Command Line Interface (CLI) for Immich", "main": "dist/index.js", "bin": { - "immich": "./dist/index.js" + "immich": "./dist/src/index.js" }, "license": "MIT", "dependencies": { diff --git a/cli/src/index.ts b/cli/src/index.ts index f775137628..39c17cafdb 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -5,8 +5,9 @@ import Upload from './commands/upload'; import ServerInfo from './commands/server-info'; import LoginKey from './commands/login/key'; import Logout from './commands/logout'; +import { version } from '../package.json'; -program.name('immich').description('Immich command line interface'); +program.name('immich').description('Immich command line interface').version(version); program .command('upload') diff --git a/server/bin/cli.sh b/server/bin/cli.sh index da8ea52f72..3c6b1512e3 100755 --- a/server/bin/cli.sh +++ b/server/bin/cli.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -node ./node_modules/@immich/cli/dist/index "$@" +npx immich "$@"