jackMort / jackMort/ChatGPT.nvim

ChatGPT api_key_cmd = "pass show api/tokens/openai" using pass password-store

Open
#454 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

Description

I have looked everywhere for an answer, was hoping someone here could steer me in the right direction.
Am I incorrect in saying that api_key_cmd should handle the following?
the command `pass show api/tokens/openai` works in terminal and prompts for master password if not currently cached.
Should I need to add to this config to capture the master password?
```
return {
"jackMort/ChatGPT.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"folke/trouble.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
require("chatgpt").setup({
api_key_cmd = "pass show api/tokens/openai",
})
end,
}

```

Hoping someone can provide suggestions to try.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the require("chatgpt").setup entry point and the api_key_cmd configuration shown in the issue. Reproduce the pass show api/tokens/openai command from the plugin context and compare its behavior with the terminal; the work is done when the configured command reliably supplies the API key, including when pass prompts for the master password.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.