Open aniruddhas opened 3 months ago
Thanks a ton!
Let's add the support of immich-cli config file support as well
instanceUrl: http://localhost:3001/api
apiKey: ---redactedkey---
@simulot this is a nice addition and I would like to take advantage of it however I can't find the right syntax to use in the configuration file.
How does the configuration file should looks like?
{
"instanceUrl": "http://localhost:30041/api",
"apiKey": "---redactedkey---"
}
or same as CLI options?
{
"server": "http://localhost:30041/api",
"key": "---redactedkey---"
}
or should match it what's in the code?
type Configuration struct {
APIURL string `json:",omitempty"`
ServerURL string `json:",omitempty"`
APIKey string
}
{
"ServerURL": "http://localhost:30041/",
"APIKey": "---redactedkey---",
"APIURL": "http://localhost:30041/api"
}
The format for immich-go is:
{
"ServerURL": "http://localhost:2283",
"APIKey": "theredactedkey"
}
I have discovered after having implemented this that immich-cli is also saving credentials in a file. The file format is about to change. So I'll adapt immich-go to that soon.
Oh, I thought you knew about it. That's what I was referring to in the original post. Re-using existing immich CLI configuration, will make the transition of users to immich-go ... a pretty smooth affair.
Hi,
Thanks for this great utility. Its faster than the node client created by immich team and lot better than my clunky bash script which uses exiftools / mediainfo and curl.
It would be a great and simple feature if, immich-go can use : ~/.config/immich/auth.yml if it exists. If there is an option to provide the config file (I have handful of [non tech] home users and I keep their API keys in separate files.) it would be great too!
Thanks again for this great utility!