Currently itp context commands always save iTwin and iModel IDs to a file in the cache directory. This could cause issues, for example.: when running multiple automated workflows. I see a few possible solutions for this issue:
- Make context commands behave differently depending on token type:
- When interactive login is used: context is saved to a file in cache directory
- When service login is used: context is saved to current environment.
- Have a command flag, that gives the user an option to use context commands to save to environment instead of a file.