A VSCode extension that runs NuShell scripts interactively with a native-looking terminal interface beside your editor.
- 🖥️ Real Terminal Experience - Full PTY (pseudoterminal) with interactive shell
- ⌨️ Direct Keyboard Input - Type directly into the terminal, just like a real terminal
- 🎨 VSCode Theme Integration - Matches your VSCode theme colors
- 📁 Runs in Background - No visible terminal window, process runs silently
- ⚡ Real-time I/O - Live output streaming with full terminal capabilities
- 🔧 Full Terminal Features - Supports Ctrl+C, arrow keys, backspace, and more
- Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Type "OpenCode: Run in Current Directory"
- Select a script:
- If only one
.nufile exists, it runs automatically - If multiple
.nufiles exist, choose from the list - If no
.nufiles found, browse for a file
- If only one
- Interactive terminal panel opens beside your editor
- Script runs and shows output in real-time
- Type directly into the terminal - it works just like a real terminal:
- Type your responses and press Enter
- Use Backspace, arrow keys, Ctrl+C, etc.
- All keyboard input is sent directly to the shell
- Continue interacting with the script naturally
Note: Extension does NOT auto-start. You must manually trigger it via command palette.
- Node.js (v20+)
- npm
- VSCode
- OpenCode CLI tool
-
Install dependencies:
npm install
-
Compile TypeScript:
npm run compile
-
Press
F5to run the extension in debug mode
npm run compilenpm run watch.
├── src/
│ └── extension.ts # Main extension logic (runs opencode)
├── resources/
│ └── icon.svg # Extension icon
├── .vscode/
│ ├── launch.json # Debug configuration
│ └── tasks.json # Build tasks
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
nullshell.runScript- Manually run OpenCode in current directory
- NuShell must be installed on your system
- The
nucommand must be available in your PATH - Install from: https://www.nushell.sh/
The extension works out of the box:
- Create any
.nuscript in your workspace - Open the workspace in VSCode
- Trigger via Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Type "OpenCode: Run in Current Directory"
- Select your script (or it auto-runs if only one exists)
- Interactive terminal panel opens beside your editor
- User triggers command via Command Palette
- Extension searches for
.nufiles in workspace:- One file: Runs automatically
- Multiple files: Shows quick pick menu
- No files: Opens file browser
- Extension creates webview panel with real terminal interface (opens beside editor)
- Spawns
nu <script>process using node-pty (PTY/pseudoterminal) - Working directory is set to the script's folder
- PTY provides full terminal capabilities (TTY emulation)
- Captures all terminal output in real-time and displays it
- Interactive Mode:
- User types directly into the terminal (no separate input field)
- Each keystroke is sent to the PTY
- Supports special keys (Enter, Backspace, Ctrl+C, arrow keys, etc.)
- Process receives input exactly like a real terminal
- Session stays alive until script completes or panel is closed
- Configurable command via settings
- Custom arguments support
- Multiple workspace support
- Command history
Feel free to open issues and pull requests!
MIT