Examples
This page contains practical examples of using the immichpy CLI for common tasks.
List all albums and parse with jq
Get all albums and their name and ID using albums get-all-albums:
Vacation 2023 851c8f67-9bf3-48f5-8130-59da9ab17c06
Selfies c980670b-69d1-42ee-b4a5-86947f169d99
List all users
Get all users in a table format using users search-users:
┃ Key ┃ Value ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ avatar_color │ primary │
│ email │ demo@immich.app │
│ id │ 6733f307-4f31-43b0-906c-95ea45d4680e │
│ name │ demo │
│ profile_changed_at │ 2025-11-11 16:45:16.871000+00:00 │
│ profile_image_path │ │
└────────────────────┴──────────────────────────────────────┘
…
Upload a folder into an album
Upload a folder and add the assets to an album, creating it if it does not exist, using assets upload:
"uploaded": [
{
"asset": {
"id": "81acecd9-ac4e-467d-a007-d83783116997",
"status": "created"
},
"filepath": "~/Pictures/paris/IMG_0001.jpg"
},
…
],
"rejected": [],
"failed": [],
"stats": {
"total": 3,
"uploaded": 3,
"rejected": 0,
"failed": 0
}
}
Download an album archive
Download an album archive to a directory with progress bar using download download-archive-to-file:
[
"out-dir/archive-d73aaebe-f8d2-486d-b0f0-a0a64c75320b.zip"
]
Share an album with multiple users
Add multiple users to an album by repeating --album-users in albums add-users-to-album:
"album_name": "2025'04 - April's Pictures",
"album_users": [
{
"role": "viewer",
"user": {
"email": "alex@immich.app",
"id": "0025cccf-27ca-4973-9be1-ffb549b10441",
"name": "Alex"
}
},
{
"role": "viewer",
"user": {
"email": "zack@immich.app",
"id": "033dda4c-5009-4475-afa5-dcc8ed2e5885",
"name": "Zack"
}
}
],
…
}
Share an album with a link
Create a password-protected link with a custom name for people without an Immich account using shared-links create-shared-link:
"allow_download": true,
"id": "3146a36e-abc2-447d-a890-3b26ab08e36f",
"slug": "paris-2025",
"type": "ALBUM",
…
}
Find an asset by its file path
Find an asset using search search-assets, where --original-path matches any part of the path:
Trigger library scan
Look up the library ID using libraries get-all-libraries and trigger a scan using libraries scan-library:
{
"id": "098adb6d-0a9b-494a-bd66-2ae6c0bf28ff",
…
}
]
immichpy libraries scan-library 098adb6d-0a9b-494a-bd66-2ae6c0bf28ff
Show storage usage per user
Print the photos and storage per user using server get-server-statistics:
Jason 26 photos 0.1 GB
Mich 8 photos 0.03 GB
Use another profile
Run a command against another server or account with a profile:
"version": "v2.4.1",
…
}