GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - prankware-code/codewars-vscode: Unofficial Codewars integration for VS Code — browse your profile, pick a kata by rank, solve it in the editor, run sample tests or submit against the full hidden suite without leaving VS Code.

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
media
media
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.vscode-test.mjs
.vscode-test.mjs
 
 
.vscodeignore
.vscodeignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Codewars for VS Code

Unofficial Codewars integration: browse your profile, pick a kata, solve it in the editor, and submit — without leaving VS Code.

Not affiliated with Codewars. Uses public endpoints plus a session cookie you paste yourself.

Features

  • Profile sidebar — overall rank, honor, leaderboard position, completed count. Webview with tabs: Overview, Languages (per-language ranks), Completed katas.
  • Trainer — pick a mode (Fundamentals / Rank Up / Random / Practice / Beta / Kumite) and a language. The extension fetches a kata matching your rank (-5 / -4 for Fundamentals, -3 for Rank Up at 4 kyu, etc.) via the public search page.
  • Kata view — description (markdown), tags, supported languages, rank pill, author, stats. Buttons: Train this kata, ▶ Test, ⤴ Attempt, ↻ Skip.
  • Solve inside VS Code — description on the left, starter code on the top-right, sample tests on the bottom-right. Files live under the extension's global storage, so Ctrl+S just saves.
  • Test runs your solution + your (possibly edited) sample tests via cr.codewars.com and shows a test tree in the Output channel.
  • Attempt submits to the hidden full test suite, finalizes on codewars.com — the kata is marked as completed on your profile.
  • Skip rerolls with the same mode and language.
  • Open kata by URL / ID — paste a kata link or slug, the details render inside VS Code.

Quick start

  1. Install the extension and open the Codewars view in the activity bar.
  2. Click Login → enter your Codewars username.
  3. When prompted for _session_id, paste the cookie from your browser:
    • On codewars.com, open DevTools → Application (Chrome) / Storage (Firefox) → Cookies → https://www.codewars.com → copy the value of _session_id.
    • This cookie is stored in VS Code's SecretStorage (encrypted), never written to plain settings.
  4. The profile opens. Go to Kata list → Start training... → pick a mode → Start Training.
  5. In the kata webview press Train this kata. Description docks to the left, starter code + sample tests appear on the right.
  6. Edit the solution, press ▶ Test to run locally, ⤴ Attempt to submit.

Authentication

The extension uses only what you give it:

  • username — kept in globalState (plain).
  • _session_id cookie — kept in VS Code SecretStorage.
  • A short-lived runner JWT is fetched on each Test/Attempt via POST /api/v1/runner/authorize.

If the cookie expires or is revoked, any authenticated request will land on the sign-in redirect; the extension notices this and signs you out automatically.

Commands

Command Description
Codewars: Open Welcome Screen Welcome webview with the Login button
Codewars: Sign In / Sign Out Start / end the session
Codewars: Open Profile Profile webview with tabs
Codewars: Refresh Profile Re-fetch profile + completed katas
Codewars: Open Trainer Setup webview (mode + language)
Codewars: Open Kata by URL or ID Paste a kata link or slug
Codewars: Train Current Kata Open solution + tests editors for the active kata
Codewars: Test Current Kata Run solution against the visible sample tests
Codewars: Attempt Current Kata Run against the hidden full suite and finalize

How kata files are stored

Starter code and sample tests are written under VS Code's extension global storage:

  • Linux: ~/.config/Code/User/globalStorage/<publisher>.codewars-vscode/katas/<slug>/<language>/
  • macOS: ~/Library/Application Support/Code/User/globalStorage/<publisher>.codewars-vscode/katas/...
  • Windows: %APPDATA%\Code\User\globalStorage\<publisher>.codewars-vscode\katas\...

Existing files are never overwritten on re-train — your edits persist. To reset a kata to the starter, delete its solution.<ext> file and press Train this kata again.

Known limitations

  • The Trainer's mode labels mirror codewars.com, but selection is done by filtering the public /kata/search/{language} page by rank. It's not the exact algorithm the official trainer uses (that requires server-side state).
  • Attempt works for public test-runner katas (the vast majority). Katas that rely on unusual runner setups may report a decrypter error — fall back to Open on codewars.com.
  • Attempt flow depends on the /api/v1/runner/authorize → runner.codewars.com/run → /api/v1/.../notify pipeline. If Codewars changes this pipeline, the Test/Attempt buttons may break until the extension is updated.
  • No offline mode — the extension always talks to codewars.com.

Development

git clone https://github.com/prankware/codewars-vscode.git
cd codewars-vscode/codewars-vscode
npm install
npm run watch      # TypeScript in watch mode

Press F5 in VS Code to launch an Extension Development Host with the extension loaded. After code changes, reload the host with Ctrl+R.

Project layout:

  • src/extension.ts — single-file extension: tree providers, webviews, commands, Codewars API glue.
  • src/logo.svg — activity bar icon.
  • out/ — compiled JS (generated).

Contributing

Issues and PRs welcome. When reporting a bug, please include:

  • Output from the Codewars output channel (last session + last Test/Attempt run).
  • VS Code version and OS.

License

MIT.

About

Unofficial Codewars integration for VS Code — browse your profile, pick a kata by rank, solve it in the editor, run sample tests or submit against the full hidden suite without leaving VS Code.

marketplace.visualstudio.com/items?itemName=prankware.codewars-vscode

Topics

algorithmscode-runnercodepracticecodewarscodewars-apicoding-challengescoding-katadeveloper-learningdeveloper-toolside-extensionkatalearn-to-codeproductivityprogramming-challengestypescriptvscodevscode-extension

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.