No description
Find a file
Renovate cdf0a1173a
All checks were successful
Build and test / Build AMD64 (pull_request) Successful in 50s
Checking yaml / Run yamllint (pull_request) Successful in 5s
Build and test / Tests (pull_request) Successful in 59s
Build and test / Generate Documentation (pull_request) Successful in 52s
Build and test / Clippy (pull_request) Successful in 46s
Checking Renovate configuration / validate (pull_request) Successful in 1m2s
fix(deps): update rust crate dialoguer to 0.12.0
2025-08-25 13:34:55 +10:00
.forgejo/workflows chore: migrate CI to Forgejo 2025-08-01 12:04:38 +10:00
nix chore: improve Nix flake 2025-08-01 11:35:27 +10:00
src feat: list assets per album 2025-08-13 14:47:33 +10:00
.envrc Initial commit 2024-10-23 20:36:36 +11:00
.gitignore chore: improve Nix flake 2025-08-01 11:35:27 +10:00
.yamllint.yaml chore: migrate CI to Forgejo 2025-08-01 12:04:38 +10:00
build.rs chore: make Clippy happy 2025-08-01 11:48:41 +10:00
Cargo.lock fix(deps): update rust crate dialoguer to 0.12.0 2025-08-25 13:34:55 +10:00
Cargo.toml fix(deps): update rust crate dialoguer to 0.12.0 2025-08-25 13:34:55 +10:00
flake.lock chore(deps): lock file maintenance 2025-08-25 00:06:07 +10:00
flake.nix chore: improve Nix flake 2025-08-01 11:35:27 +10:00
LICENSE Add LICENSE 2024-10-28 05:02:36 +00:00
README.md feat: list assets per album 2025-08-13 14:47:33 +10:00
renovate.json chore: migrate CI to Forgejo 2025-08-01 12:04:38 +10:00

Immich Tools

Crates.io MIT License

immich-tools is a command-line utility for interacting with Immich, a self-hosted photo and video backup solution. This tool provides various utilities to manage your Immich server from the command line.

Features

Albums

  • List all albums on your Immich server
  • Delete albums (all or empty ones only)
  • Auto-create albums from external libraries folder structure
  • List assets of an album by album name

Assets

  • List assets (all or offline only)
  • Delete assets (all or offline only)

External libraries

  • List all libraries
  • Scan all libraries to detect new assets

People

  • List named faces that do not have an associated date of birth
  • Synchronize dates of birth from a vCard file

Server

  • Show server version
  • Check which server features are enabled

Installation

From Crates.io

cargo install immich-tools

From Source

git clone https://git.enoent.fr/kernald/immich-tools.git
cd immich-tools
cargo build --release

The binary will be available at ./target/release/immich-tools.

Configuration

To connect to your Immich server, you need to provide:

  • server_url: The API endpoint of your Immich instance (usually ends with /api)
  • api_key: Your Immich API key (can be generated in the Immich web interface)

These can be provided in several ways (in order of precedence):

  1. Command line arguments:

    immich-tools --server-url https://photos.example.com/api --api-key your-api-key server version
    
  2. Environment variables (prefixed with IMMICH_TOOLS_):

    IMMICH_TOOLS_SERVER_URL=https://photos.example.com/api IMMICH_TOOLS_API_KEY=your-api-key immich-tools server version
    
  3. Environment variables pointing to files (suffixed with _FILE):

    IMMICH_TOOLS_SERVER_URL_FILE=~/immich-url.txt IMMICH_TOOLS_API_KEY_FILE=~/immich-api-key.txt immich-tools server version
    
  4. Configuration file in the OS-specific location:

    • Linux: ~/.config/immichtools/config.toml
    • macOS: ~/Library/Application Support/fr.enoent.Immich-Tools/config.toml
    • Windows: ~\AppData\Roaming\enoent\Immich Tools\config\config.toml

Example Configuration File

server_url = "https://photos.example.com/api"
api_key_file = "/home/example/.config/immichtools/apikey"

[people.sync_date_of_births]
vcard = "/home/example/contacts.vcf"

Usage Examples

Albums

List all albums:

immich-tools albums list

Delete empty albums:

immich-tools albums delete --empty

Auto-create albums from folder structure:

immich-tools albums auto-create --album-name-separator "/"

List assets belonging to a specific album (by album name):

immich-tools albums list-assets --album "My Album"

Assets

List all assets:

immich-tools assets list

List offline assets only:

immich-tools assets list --offline

Delete offline assets:

immich-tools assets delete --offline

External libraries

List all libraries:

immich-tools libraries list

Scan all libraries for new assets:

immich-tools libraries scan

People

List people missing date of birth:

immich-tools people missing-date-of-births

Sync dates of birth from vCard file:

immich-tools people sync-date-of-births --vcard /path/to/contacts.vcf

Server

Show server version:

immich-tools server version

Check enabled server features:

immich-tools server features

Global Options

  • --dry-run: Show what would be done without making any changes
  • --no-confirm: Skip confirmation prompts
  • -v, --verbose: Increase logging verbosity (can be used multiple times)

Immich API Compatibility

The bindings are generated automatically from the Immich OpenAPI specification. The current version is compatible with Immich v1.119.1, with some limitations around file upload operations (Progenitor doesn't yet support multipart/form-data content types, see this issue).