A blazing-fast, JetBrains AI-compatible Neovim pluginβpowered via a secure local proxy. Insert AI-generated code, preview file changes, approve diffs, and elevate your development flow from your favorite keyboard-first editor.
- π¬ Chat with JetBrains AI directly in Neovim
- π Preview and accept file suggestions from the AI
- π Store your tokens securely with encrypted local storage
- π Connect via a local Docker proxy with user-owned tokens
- π¨ Beautiful UI powered by Noice.nvim
- π§ͺ Built-in
:checkhealth
diagnostics - β GitHub-friendly repo: secure, compliant, and community-driven
{
"CharaD7/nvim-jetbrainsai-proxy",
dependencies = {
"folke/noice.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
"nvim-lua/plenary.nvim"
},
config = function()
require("jetbrainsai").setup({
-- Optional: Disable auto token prompt
auto_prompt = true,
})
end
}
During setup, you'll be prompted to enter your:
-
JetBrains JWT
token -
JetBrains Bearer
token -
(Optional) Encryption passphrase to securely store these credentials
π‘οΈ You are solely responsible for providing your own tokens. This plugin does not bypass or spoof any licensing or authentication.
To retrieve your valid tokens, you'll need to run the proxy locally, authenticated with your JetBrains session.
Jetbrains AI credentials must be extracted from your own session using the official IDE. This plugin does not ship with authentication, and you will need your own tokens to connect.
Step 1: Clone the repo and navigate to the proxy directory.
git clone https://github.com/CharaD7/nvim-jetbrainsai-proxy.git
cd nvim-jetbrainsai-proxy/proxy
Step 2: Install dependencies and validate your setup
make verify
make bootstrap
NB: You will need docker or podman for this to work for you.
Step 3: Open any Jetbrains IDE and initiate the AI chat.
Step 4: Use IDE DevTools plugin to inspect a network request to Jetbrains AI chat
Step 5: Extract the key information:
Authorization: Bearer ...
jb-access-token: ...
Step 6: Fill in the config.yaml
like so:
tokens:
- jwt: "<your-grazie-authentication-jwt>"
bearer: "<your_bearer_here>" # can be blank
Step 7: Start the proxy
docker build -t jetbrains-proxy .
docker run -p 8080:8080 jetbrains-proxy
You can securely store your JetBrains AI tokens using AES-256 encryption.
- Run
:JetbrainsAISetup
- When prompted, enter a
- JWT token
- Bearer token
- (Optional) passphrase to encrypt your tokens
- Tokens are stored at
~/.cache/nvim-jetbrainsai/tokens.enc
β οΈ If you skip encryption, tokens are stored in memory only and will not persist.
If youβve saved encrypted tokens before, the plugin will:
- Detect the token file on startup
- Prompt you once to enter your passphrase (optional)
- Skip completely if no token is saved or prompt is canceled
Youβll never be blocked by required input during startup.
This plugin will check for encrypted tokens on startup only if:
- You've previously stored them via
:JetbrainsAISetup
auto_prompt = true
(default)
Otherwise, it stays silent and clean.
You can disable token auto-load entirely:
require("jetbrainsai").setup({
auto_prompt = false
})
You may also logout via: :JetbrainsAILogout
Mode | Mapping | Action |
---|---|---|
n |
<leader>jc |
Start chat prompt |
n |
<leader>js |
Setup tokens (store or encrypt) |
n |
<leader>jl |
Logout (clear memory-stored tokens) |
To validate setup, run:
:checkhealth nvim-jetbrainsai-proxy
The plugin will check:
-
π Token presence or encryption status
-
π Proxy availability
-
π§° Required dependencies (curl, openssl)
-
π§ Neovim version & runtime paths
Q: Where do I get my JetBrains tokens?
A: Run mitmproxy and route IDE traffic through it. Look for grazie-authenticate-jwt
in the headers on /chat/stream
calls.
Q: Why is my token not working?
A: It's likely expired or missing required scopes. Try triggering a new AI interaction in WebStorm or IntelliJ.
Q: How do I avoid committing secrets?
A: Use .env
+ make gen-config
. We've already .gitignore
d config.yaml
for safety.
Q: Can I contribute a plugin for VS Code/other editors?
A: Absolutely! PRs welcome if they route via this proxy.
This plugin does not bundle any JetBrains source code, credentials, or assets. Users must authenticate with their own valid tokens and license. No usage data is transmitted or stored.
β οΈ Use of the JetBrains API via proxy is for educational and non-commercial use only. We recommend this plugin be run locally and by licensed users.
- All API calls use your local, user-authenticated proxy
- Tokens are never transmitted to third parties or stored by this plugin
- Users are expected to comply with Jetbrains' Terms of Use and Privacy Policy
View ongoing work and feature proposals under the Discussions tab.
-
Chat with JetBrains AI via proxy
-
File write approval workflow
-
Token storage with optional encryption
-
Custom UI options per theme
-
Direct connection to JetBrains Gateway or MCP (optional)
To contribute to this repo, please read CONTRIBUTING
This project uses the MIT LICENSE