KarmaCode brings live Bhagavad Gita verses into your VS Code workflow as a quiet, optional companion for moments of reflection.
Features
Category picker (Ctrl+Shift+P -> KarmaCode: Get Shloka by Category): Motivation, Duty, Detachment, Fear & Anxiety, Wisdom, or Any
Live data only - every shloka, transliteration, translation, and commentary is fetched in real time from the public Bhagavad Gita API (vedicscriptures.github.io). No bundled scripture text, no local dataset.
Multi-language tabs - English and Hindi come directly from the API. Marathi and Gujarati tabs are shown; if the API has no translation for a given verse in that language, the UI clearly says so and falls back to English.
Commentary accordion - expand to read Swami Sivananda's commentary where available.
Reflect - a short, original, developer-oriented reflection prompt for each verse (written specifically for this extension, not scripture text).
Copy Shloka - copies Sanskrit, transliteration, reference, and all available translations to your clipboard.
Full Chapter - fetches and displays every verse of the current chapter live from the API.
New Shloka - fetch another verse from the same category.
Commands
Command
Description
KarmaCode: Get Shloka by Category
Opens a category picker, then shows a shloka
KarmaCode: Open Shloka Panel
Opens the panel directly using your default category
Keyboard shortcut: Ctrl+Alt+K (Cmd+Alt+K on Mac)
Settings
Setting
Default
Description
karmacode.showTransliteration
true
Show Roman-script transliteration
karmacode.defaultCategory
any
Default category for the panel
karmacode.enableStartupShloka
false
Show a shloka automatically a few seconds after VS Code starts
How it works
KarmaCode is a thin client over the public Bhagavad Gita API at https://vedicscriptures.github.io. On every request:
A chapter/verse is selected (randomly within the chosen category)
The extension host calls GET /slok/{chapter}/{verse}
Sanskrit, transliteration, English translation (Swami Sivananda, with fallbacks), Hindi translation (where available), and commentary are extracted
The webview renders the result with language tabs, an accordion for commentary, and action buttons
If the API is unreachable, the panel shows a clear error state with a retry button - there is no offline dataset.
Requirements
VS Code 1.80+
Internet connection (required - KarmaCode does not bundle any shloka data)