Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nifty Code Runner: Run Code in 25+ LanguagesNew to Visual Studio Code? Get it now.
Nifty Code Runner: Run Code in 25+ Languages

Nifty Code Runner: Run Code in 25+ Languages

Nifty

| (0) | Free
Run the current file or selection in 25+ languages in the terminal, with input support, your own commands and no telemetry.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Code Runner

Run the current file or selection in 25+ languages in the terminal, with input support, your own commands and no telemetry.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

Selecting part of a JavaScript file and running just those lines in the terminal

Running a Python script in the terminal

Running only the selected lines of a JavaScript file

Answering a script's input() prompts in the terminal

  • One key to run. Press Ctrl+Alt+R, click ▶ in the editor title, or right-click and choose Run File or Selection.
  • Keyboard input works. Programs run in a real terminal, so input(), Scanner, readline and interactive prompts just work.
  • Run just the selection. Select a few lines and run only those.
  • 37 languages out of the box: JavaScript, TypeScript (via tsx), Python, Go, Rust, C, C++, Java, Kotlin, Swift, Dart, Ruby, PHP, Perl, Lua, R, Julia, Haskell, Elixir, Clojure, Zig, Nim, F#, C# (dotnet script), Bash, PowerShell, Batch, CoffeeScript, Groovy, OCaml, Scala, Racket, Erlang, Crystal, V and more.
  • Your commands. Override any language, or add new ones, e.g. { "python": "uv run $file", "typescript": "bun $file" }, or by file extension.
  • Shebangs respected. On macOS and Linux, #!/usr/bin/env python3.12 runs with python3.12.
  • Works in Windows PowerShell. Compile-and-run commands (gcc x.c -o x && x) are rewritten so they work in PowerShell 5, which has no &&.
  • Saves first, runs in the file's folder (or the workspace root), and reuses one tidy Nifty Run terminal.
  • Stop with Ctrl+Alt+M.
  • No telemetry. Nothing is collected or sent anywhere.

Commands

Command Key What it does
Nifty Code Runner: Run File or Selection Ctrl+Alt+R Run the file, or the selected lines
Nifty Code Runner: Run with Custom Command… Edit the command before running
Nifty Code Runner: Stop Running Ctrl+Alt+M Send Ctrl+C to the running program
Nifty Code Runner: Configure Run Commands Open the settings

Settings

Setting Default What it does
nifty.runner.executorMap {} Commands by language id, e.g. { "python": "uv run $file" }
nifty.runner.executorMapByExtension {} Commands by extension, e.g. { ".mjs": "node $file" }
nifty.runner.respectShebang true Use #! lines on macOS and Linux
nifty.runner.runSelection true Run only the selection when there is one
nifty.runner.saveBeforeRun true Save before running
nifty.runner.cwd file Run in the file's folder or the workspace root
nifty.runner.reuseTerminal true Reuse the "Nifty Run" terminal
nifty.runner.clearBeforeRun true Clear the terminal first
nifty.runner.preserveFocus true Keep the cursor in the editor

Placeholders:

  • $file: full path
  • $fileName: name with extension
  • $fileNameWithoutExt: name without extension
  • $dir: the file's folder
  • $workspaceRoot: the workspace folder
  • $exe: the compiled program's path, e.g. main.exe on Windows

Note: a selection runs from a temporary copy, so relative imports inside it won't resolve. Run the whole file for code that imports its neighbours.

Install

  • VS Code: search for "Nifty Code Runner" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry, needs no account and makes no network requests. (Commands like npx tsx may download a tool the first time; that's npm, not the extension.)

More Nifty tools

  • Nifty Pretty Errors: Readable Error Messages: Readable error messages for every language: TypeScript types formatted as code, long C++ and Rust types folded, and a docs link for every error code, in the hover and a side panel. (Open VSX)
  • Nifty Launch: launch.json Generator & Checker: Add debug configurations for what's in your project (npm scripts, tests, Python, Django, FastAPI, Go, .NET, Rust, browsers), build compounds, and catch broken launch.json references. (Open VSX)
  • Nifty Problems: Project-Wide TypeScript Errors: See TypeScript and ESLint errors for your whole project in the Problems panel, not just open files. (Open VSX)
  • Nifty C# Templates: New Class, Record & Namespace: New C# class, interface, record, enum, test and controller files with the right namespace, plus namespace syncing. (Open VSX)
  • Nifty Docstrings: Python Docstring Generator: Type three quotes under a Python function and get a Google, NumPy or Sphinx docstring with its arguments, types, returns and raises. PHPDoc, Rust and Go doc comments too. (Open VSX)
  • Nifty JSON: Formatter, Validator & JSONPath: Format, minify, sort keys, query with JSONPath, copy paths, generate TypeScript types, and browse huge JSON files in a fast tree view. (Open VSX)

See all 35 Nifty tools at https://getnifty.dev

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