sourcegraph / sg.nvim

Experimental Sourcegraph + Cody plugin for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Offer `api_key_command` config option

smackesey opened this issue · comments

ChatGPT.nvim offers a handy auth method that executes an external command to obtain an API key. This is really nice if you store your API key in e.g. 1Password: https://github.com/jackMort/ChatGPT.nvim#secrets-management

sg.nvim should offer the same thing.

I currently have require('sg.auth').set(endpoint, token), which you could call in your setup if you wanted to provide alternative authentication.

Would that meet what you want to do? I'm not opposed to doing something similar to api_key_command though.