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




- 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.)
- 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 Struct Layout: C/C++ Struct Padding: See the memory layout of C and C++ structs: offsets, sizes, alignment and padding on hover and inline, a fix that reorders fields to save space, and hex, binary and char hovers for numbers. (Open VSX)
- Nifty Bash Debugger: Breakpoints & Step Through Scripts: Debug Bash scripts without bashdb: breakpoints, conditions, logpoints, stepping, call stack, variables and arrays. Works with bash 4.2 to 5.2+ and Git Bash on Windows. (Open VSX)
- Nifty Buttons: Custom Status Bar Buttons: Add your own buttons to the status bar: run commands, shell commands, tasks or links, per project and only for the files they apply to. (Open VSX)
- Nifty C# Scratchpad: Run C# Snippets & NuGet: Run C# snippets instantly with NuGet packages and rich Dump() output, a LINQPad-style scratchpad and Polyglot Notebooks replacement. (Open VSX)
- Nifty Env: .env Files, Profiles & Secrets: Load .env files into terminals, tasks and debug sessions, switch between .env profiles, hide secret values on screen, and check .env against .env.example. (Open VSX)
See all 100+ Nifty extensions and web tools at https://getnifty.dev
| |