Skip to content

hanpq/PSImmich

PSImmich

This project has adopted the following policies CodeOfConduct Contributing Security

Project status

GitHub Workflow Status Codecov Platform PowerShell Gallery License docs changelog GitHub release (latest SemVer including pre-releases) GitHub release (latest SemVer including pre-releases) Static Badge Static Badge2

About

PSImmich is a Powershell API wrapper for Immich

Installation

PowerShell Gallery

To install from the PowerShell gallery using PowerShellGet run the following command:

Install-Module PSImmich -Scope CurrentUser

Usage

Before calling the Immich cmdlets a session needs to be created. Currently it is supported to use an API key or credentials (username and password)

Connect-Immich -BaseURL 'https://immich.domain.com' -AccessToken 'ztKkvGWVIacJATX7RLCbWCISpamwEQkLpakn8O48acE'
$Cred = Get-Credential
Connect-Immich -BaseURL 'https://immich.domain.com' -Credential $Cred

You can verify that the connection is working by calling Get-IMSession and verifying that AccessTokenValid is true

Get-IMSession

BaseUri          : https://immich.domain.com
AuthMethod       : AccessToken
AccessToken      : System.Security.SecureString
AccessTokenValid : True
Credential       : 
JWT              : 
APIUri           : https://immich.domain.com/api
ImmichVersion    : 1.98.2
SessionID        : 67055f46-51aa-42a2-8471-46170c441558

The session object can be passed to all cmdlets. This is useful if connection to more than one Immich instance is needed.

$Session1 = Connect-Immich -BaseURL 'https://immich.domain.com' -AccessToken 'ztKkvGWVIacJATX7RLCbWCISpamwEQkLpakn8O48acE' -PassThru

Get-IMAsset -Session $Session1

To see available cmdlets you can use the following command

Get-Command -Module PSImmich  | Format-Wide -Column 4 -Property Name                     

Add-IMActivity     Add-IMAlbumAsset          Add-IMAlbumUser    Add-IMAsset
Add-IMAssetTag     Add-IMMyProfilePicture    Add-IMPartner      Add-IMSharedLinkAsset 
...
...

Available commands

For documentation about each command please see the docs

Versioning

PSImmich follows Immich's versioning scheme to indicate compatibility:

  • Major.Minor versions match Immich - PSImmich 2.3.x is developed and tested against Immich 2.3.x
  • Patch version starts with Immich's patch number - If Immich releases 2.3.1, PSImmich starts at 2.3.1
  • Subsequent PSImmich releases increment the patch - Additional PSImmich updates become 2.3.2, 2.3.3, etc. until the next Immich version is released.

This ensures you can easily identify which Immich version is supported by checking the first two version numbers.

About

PSImmich is a Powershell API wrapper for Immich

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors