Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>Vajra - AI Coding AssistantNew to Visual Studio Code? Get it now.
Vajra - AI Coding Assistant

Vajra - AI Coding Assistant

Ashish Sharda

|
350 installs
| (1) | Free
Free Cursor alternative — streaming AI chat, ghost-text autocomplete, @ context, git tools, multi-agent council. Claude 4, GPT-4.1, Gemini 2.5, Llama 4, DeepSeek R1 & 40+ models.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Vajra — AI Coding Assistant

The free Cursor alternative built for VS Code

Streaming chat · Ghost-text autocomplete · @ context · Git AI · Code actions · 40+ models


What is Vajra?

Vajra is a full-featured AI coding assistant that runs inside VS Code. It gives you a streaming chat panel, inline ghost-text completions (Tab to accept), one-click code fixes, AI-powered git tools, and deep context awareness — all from 40+ models including Claude 4, GPT-4.1, Gemini 2.5, DeepSeek R1, and local Ollama models that never leave your machine.


🆕 What's New in 0.9.0

  • Rate answers. Every finished answer has Helpful and Needs work buttons; Needs work asks for a quick reason. Ratings are saved locally on your machine and are not sent to us.
  • Share answers. Open an editable Markdown preview of a single answer, choose whether to include your question or attached code, and copy exactly what you see. A removable "Made with Vajra" link is added by default.
  • Pick the provider, then the model. Click the model badge in the chat header to switch models; choosing a provider opens its model list, and Vajra remembers your last model for each provider. Escape at any step changes nothing.
  • Live OpenAI model list. Fetched from your account (no billable calls), cached with a timestamp, and filtered to models that work with Vajra. Anything else is available as a custom ID, after a warning.
  • Honest provider status. Not configured, Key saved · not verified, Verified or Authentication failed, instead of "Ready" just because a key exists. A rejected key offers Update API key right away.
  • Streaming fix. Streamed responses now appear token-by-token as intended, instead of only after the chat redraws. A failed request no longer leaves an empty bubble behind.

What's New in 0.8.0

  • Vision that actually works — pasted images are now sent as real image data to OpenAI, Anthropic, and Gemini, so vision models can genuinely see what you share instead of a text placeholder.
  • Secrets stay off the wire — before anything goes to a cloud model, Vajra scans and redacts API-key-shaped text, and blocks .env/.pem/credentials.json-type files outright. Fully local Ollama use is unaffected.
  • .vajraignore support — alongside .gitignore, so you control exactly what Vajra can read from your workspace.
  • Cost tracking and auto model selection now do something — an approximate cost/token chip under each response, and autocomplete automatically uses a faster, cheaper model instead of your full chat model.
  • Conversation history survives reloads — chats persist across window reloads instead of resetting every time.
  • /explain, /fix, /test, /optimize auto-attach context — no more typing @selection manually for these to work.
  • Safer Apply — applying a fix or inline edit to a file with unsaved changes now asks for confirmation first.
  • Offline-capable chat UI — the chat panel's Markdown/syntax highlighting no longer depends on loading scripts from a CDN.

See the full Changelog for details, plus what's intentionally not in this release yet (full agent/tool-calling mode, true semantic @codebase search).


Features

💬 Streaming AI Chat

Real-time token-by-token responses in a persistent chat panel. Ask questions, paste code, share screenshots — Vajra streams the answer as it's generated, no waiting for a wall of text.

  • Multi-turn conversation with full history context
  • Paste images directly into chat (vision models)
  • Syntax-highlighted code blocks with one-click copy
  • Markdown rendering with tables, lists, and headers

👍 Rate & Share Answers

Every finished answer has a small action row: Helpful, Needs work, and Share.

  • Helpful / Needs work. Needs work asks for a quick reason: Incorrect answer, Code did not work, Missed my context, Too verbose, or Other. Click again any time to change your rating.
  • Ratings are saved locally. They're stored in VS Code's workspace storage on your machine and are not sent to us or to any AI provider. Only the rating, reason, provider, model, and time are saved — never the answer text.
  • Share opens an editable Markdown preview of that one answer. Edit it however you like, then Copy Markdown to put exactly that text on your clipboard. Nothing is uploaded.
    • Off by default: your original question, the code/context you attached with @ mentions, and a "Does this approach look right? Any edge cases I'm missing?" line for asking a reviewer.
    • On by default: a visible "Made with Vajra" link. Untick it, or just delete the line.
    • Review before copying. The preview masks secret-shaped values, the same way Vajra does before contacting a cloud model, but you should still check for code, paths, or internal names you don't want to share.
    • If you change an option after editing, Vajra asks before replacing your edits. If copying fails, your edits stay put and you can retry.
    • Attached code/context is held in memory only, so after a window reload, Include code/context is unavailable for older answers.

⚡ Ghost-Text Autocomplete

Start typing and Vajra suggests what comes next — right inside your editor, just like Copilot. Press Tab to accept, keep typing to ignore.

  • Triggers automatically after a configurable delay (default 650ms)
  • 80-entry LRU cache to avoid redundant API calls
  • Skips comments and short lines to stay out of your way
  • Toggle on/off instantly from the status bar (⚡ Vajra)

@ Context Mentions

Type @ in chat to inject live context from your project:

Mention What it includes
@currentfile The full file you have open
@selection Whatever text you have selected
@file:name Any file in your workspace by name
@codebase:query Keyword search across your entire project (not yet semantic/embeddings-based)
@gitdiff Current staged git diff
@web:query Live web search results via DuckDuckGo

🔧 Code Actions (Lightbulb Menu)

See a red squiggle? Click the lightbulb (or press Ctrl+.) and get:

  • ⚡ Fix with Vajra — streams a fix directly into your editor with Apply / Show Diff / Cancel controls
  • 💡 Explain with Vajra — opens chat with a full explanation
  • 🔧 Refactor with Vajra — suggests cleaner alternatives

✏️ Inline Edit (Cmd+K / Ctrl+K)

Select any code, press Ctrl+K (or Cmd+K on Mac), type your instruction, and Vajra streams the rewritten version. You see a diff and choose Apply or Cancel before anything changes.

🔀 Git AI Tools

Generate Commit Message (Ctrl+Shift+G / Cmd+Shift+G): Reads your staged diff and writes a conventional commit message — imperative mood, ≤72 char subject line — copied to clipboard and ready to paste.

Generate PR Description: Reads your commit log and diff, writes a full markdown PR description, and opens it in a new editor tab.

Both appear as buttons in the Source Control panel (SCM sidebar).

📋 Slash Commands

Type / in chat to access:

Command Action
/explain Explain selected code
/refactor Suggest refactoring
/tests Generate unit tests
/debug Debug and find bugs
/optimize Performance improvements
/comments Add code comments
/council Multi-agent debate mode
/terminal Paste and analyze terminal output

🤖 40+ Models, 10+ Providers

Provider Flagship Models Notes
Anthropic Claude Opus 4, Sonnet 4, Haiku 4.5 Best reasoning
OpenAI GPT-4.1, GPT-4o families Model list is fetched live from your account
Google Gemini 2.5 Pro, Flash Best multimodal
DeepSeek R1, V3 Best open-source
Groq Llama 4, Qwen2.5-Coder Fastest inference
Mistral Devstral, Codestral Best for code
Ollama Any local model 100% private, free
OpenRouter 200+ models, one key Maximum choice
Qwen Qwen2.5-Coder 32B/14B/7B Best local coding
HuggingFace Open-source models Research models

🏠 .vajrarules — Project AI Instructions

Create a .vajrarules file (or .cursorrules) in your project root. Vajra reads it automatically and uses it as the system prompt for every request in that project. A green dot appears in the chat header when rules are active.

Use it to set coding style, tech stack, naming conventions, or anything else you want the AI to always know about your project.


Quick Start

Option A — Ollama (Free, 100% Private)

# 1. Install Ollama from https://ollama.ai/download

# 2. Pull a coding model
ollama pull qwen2.5-coder:7b   # 4.1GB — best for most machines

# 3. Open VS Code — Vajra auto-detects Ollama and configures itself

That's it. No API key, no internet, no cost.

Option B — Cloud Provider

  1. Press Ctrl+Shift+P → Vajra: Select AI Provider
  2. Pick your provider (OpenAI, Anthropic, Gemini, etc.)
  3. Enter your API key when prompted
  4. Pick a model from that provider's list
  5. Start chatting

Choosing providers and models

  • Click the model badge in the chat header to switch models for the current provider. The list has a Change provider… item, and the command Vajra: Select AI Provider opens the provider list directly.
  • Choosing a provider always opens its model list. Nothing changes until you pick a model, so pressing Escape keeps your current provider and model.
  • Vajra remembers your last model for each provider, so switching back is one click. The current model has a ✓, and the list is searchable.
  • OpenAI models come live from your account. The list is fetched with GET /v1/models using your saved key. That's a metadata call, so nothing is generated or billed.
    • It's cached for 24 hours, and the picker says when you're looking at a cached list.
    • Use Refresh available models in the list (or Vajra: Refresh Available Models) to re-check.
    • Changing your key throws the cache away.
    • If OpenAI can't be reached, Vajra shows the cached list (or its built-in list) and labels it as such.
  • Only OpenAI models known to work with Vajra are shown by default. Vajra sends Chat Completions requests with temperature and max_tokens: 8192. Embedding, audio, image and moderation models are hidden, and so are reasoning models (o-series), which reject those parameters. Enter custom model ID… lets you use any ID after a compatibility warning; Vajra won't change its request format for it.
  • Other providers use Vajra's built-in model list, labelled as such. Ollama shows the models actually installed locally.
  • Provider status is shown honestly:
    • Not configured
    • Key saved · not verified
    • Verified: the picker says exactly what was checked, e.g. "GET /v1/models accepted this key", which doesn't prove access to every model.
    • Authentication failed: after a 401. Use the 🔑 button, Update API key on the error, or Vajra: Update API Key.
  • If a model you saved disappears from your account, Vajra tells you and asks you to choose. It never silently switches to a different (possibly more expensive) model.
  • The provider or model can't be changed while a response is still streaming.

Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+V / Cmd+Shift+V Open Vajra Chat
Ctrl+K / Cmd+K Inline Edit (with selection)
Ctrl+Shift+G / Cmd+Shift+G Generate Commit Message
Tab Accept autocomplete suggestion
Click ⚡ Vajra status bar Toggle autocomplete on/off

Right-Click Menu

Select any code in your editor and right-click to access:

  • Explain Code
  • Refactor Code
  • Debug Code
  • Optimize Code
  • Add Comments
  • Generate Unit Tests
  • Inline Edit

Configuration

Open Settings (Ctrl+,) and search vajra.

Setting Default Description
vajra.defaultProvider ollama Active AI provider
vajra.defaultModel qwen2.5-coder:7b Active model
vajra.enableAutocomplete true Ghost-text completions
vajra.autocompleteDelay 650 Ms before autocomplete fires
vajra.temperature 0.7 Creativity (0 = precise, 2 = creative)
vajra.maxTokens 4096 Max response length
vajra.enableMultiModalInput true Image paste in chat

Tip: API keys are stored in User Settings (Global) — never committed to your repo.


Hardware Guide (Ollama)

RAM Recommended Model Notes
4 GB qwen2.5-coder:1.5b Lightweight, fast
8 GB qwen2.5-coder:7b ⭐ Best all-around
16 GB qwen2.5-coder:14b Near-cloud quality
32 GB+ qwen2.5-coder:32b Maximum performance

Troubleshooting

Autocomplete not showing? Check the ⚡ Vajra pill in the status bar — click it to toggle on. Also check vajra.enableAutocomplete in settings.

Ollama not detected? Run ollama serve in a terminal, then reload VS Code.

Wrong model/provider error? Click the model badge in the chat header (or Ctrl+Shift+P → Vajra: Select AI Provider) and pick a model from the list.

"Authentication failed (HTTP 401)"? The provider rejected your saved key. Choose Update API key on the error, or run Vajra: Update API Key.

Slow responses? Switch to Groq for cloud (fastest inference) or use a smaller Ollama model locally.


Support

  • 📧 Email: ashishjsharda@gmail.com
  • ⭐ Leave a review on the Marketplace — it helps more developers find Vajra

Made with ❤️ for developers who ship

VS Code Marketplace · Email Support

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft