feat(cli): refactor and add album support (#4434)
* Allow building and installing cli * feat: add format fix * docs: remove cli folder * feat: use immich scoped package * feat: rewrite cli readme * docs: add info on running without building * cleanup * chore: remove import functionality from cli * feat: add logout to cli * docs: add todo for file format from server * docs: add compilation step to cli * fix: success message spacing * feat: can create albums * fix: add check step to cli * fix: typos * feat: pull file formats from server * chore: use crawl service from server * chore: fix lint * docs: add cli documentation * chore: rename ignore pattern * chore: add version number to cli * feat: use sdk * fix: cleanup * feat: album name on windows * chore: remove skipped asset field * feat: add more info to server-info command * chore: cleanup * chore: remove unneeded packages * chore: fix docs links * feat: add cli v2 milestone * fix: set correct cli date --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
88b5f5b500
commit
7e38e7c949
@@ -1,24 +1,28 @@
|
||||
A command-line interface for interfacing with Immich
|
||||
A command-line interface for interfacing with the self-hosted photo manager [Immich](https://immich.app/).
|
||||
|
||||
# Getting started
|
||||
# Installing
|
||||
|
||||
$ ts-node cli/src
|
||||
To use the cli, run
|
||||
|
||||
To start using the CLI, you need to login with an API key first:
|
||||
$ npm install @immich/cli
|
||||
|
||||
$ ts-node cli/src login-key https://your-immich-instance/api your-api-key
|
||||
# Usage
|
||||
|
||||
NOTE: This will store your api key under ~/.config/immich/auth.yml
|
||||
To use the CLI, you need to login with an API key first:
|
||||
|
||||
Next, you can run commands:
|
||||
$ immich login-key https://your-immich-instance/api your-api-key
|
||||
|
||||
$ ts-node cli/src server-info
|
||||
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
|
||||
|
||||
$ ts-node cli/src logout
|
||||
$ immich logout
|
||||
|
||||
# Usage
|
||||
# Commands
|
||||
|
||||
```
|
||||
Usage: immich [options] [command]
|
||||
@@ -30,9 +34,9 @@ Options:
|
||||
|
||||
Commands:
|
||||
upload [options] [paths...] Upload assets
|
||||
import [options] [paths...] Import existing 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
|
||||
```
|
||||
|
||||
@@ -40,7 +44,21 @@ Commands:
|
||||
|
||||
- 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
|
||||
|
||||
# Known issues
|
||||
# For developers
|
||||
|
||||
- Upload can't use sdk due to multiple issues
|
||||
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 .
|
||||
|
||||
Reference in New Issue
Block a user