Immich Albums is a tool designed to create albums in Immich from a folder structure. Assets needs to be loaded as external library in Immich then you can launch script to create albums.
- Immich instance running
- Python installed
- Poetry installed - https://python-poetry.org/docs/#installation
- Clone the repository:
git clone https://github.com/alvistar/immich-albums.git
- Navigate to the project directory:
cd immich-albums
- Install dependencies:
-
poetry install
- Activate virtual environment:
poetry shell
- Test installation:
im --help
You can get help of various args by running:
im --help
The following are required arguments:
--api_key
- Immich API key--api_host
- Immich API host. Example:https://localhost:22283/api
--original_path
- Path to local albums--replace_path
- Path as seen by Immich host
Original path is the path to your local albums.
If for example your albums are stored in /home/user/albums
and you mounted that path under docker as /mnt/albums
you need to pass /home/user/albums
as --original-path
and /mnt/albums
as --replace-path
.
Note
Api host should be the API endpoint of your Immich instance.
Example: https://localhost:22283/api
cd /home/user/albums
im --api-key YOUR_API_KEY --api-host YOUR_API_HOST --original-path /home/user/albums --replace-path /mnt/albums .
Instead of passing every argument you can create a config file in yaml format.
Default config file name is config.yaml
and it should be placed in your home directory under ".config/immich-albums/config.yml"
Example config file:
api_key: YOUR_API_KEY
api_host: YOUR_API_HOST
original_path: /path/to/local/albums
replace_path: /path/as/seen/by/immich
Note
Take care of the underscore. It should be api_key
and not api-key
.
Alternatively you can pass config file path as argument:
im --config /path/to/config/file
openapi-generator-cli generate -g python -o generated/openapi_client -i immich-openapi-specs.json -p packageVersion=1.105.1
poetry lock --no-update
Contributions to Immich Albums are welcome!
This project is licensed under the MIT license - see the LICENSE.txt file for details.
Big thanks to Immich for the incredible job!