obsidian-copilot icon indicating copy to clipboard operation
obsidian-copilot copied to clipboard

Feature: store API key separate from `data.json`

Open adamhp opened this issue 2 years ago • 3 comments

For those of us who use git to backup and sync our Vaults, it would be nice if we could store the API Key outside of the data.json so that it can be .gitignore'd separately from the rest of our settings.

adamhp avatar May 15 '23 13:05 adamhp

@adamhp I see, thanks for the suggestion! Added to my list of future features. Just curious, do you know how other plugins do this, where's the best place to store it?

logancyang avatar May 15 '23 18:05 logancyang

@logancyang It seems maybe there aren't great options.

https://github.com/InterwebAlchemy/obsidian-ai-research-assistant/issues/7

I wonder if there can be some way to use a .env and access it? Alternatively, you could require the user to add their key every time they open Obsidian. Not ideal, but would be the most secure. My vault is private, so this isn't the end of the world for me personally, but it seems like Obsidian needs to figure out a secure secrets management for its plugin ecosystem.

adamhp avatar May 15 '23 23:05 adamhp

The issue linked is quite helpful, thanks! Using a .env would be nice. I'm hesitant to require everyone to add their key every time though. Definitely a great discussion to have with the Obsidian core developers. Will keep this open until I find a good solution!

logancyang avatar May 16 '23 00:05 logancyang