Lean Terminal

pending

by LeanProductivity

Embedded terminal panel powered by xterm.js and node-pty — no external windows.

26 starsUpdated 3d agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Lean Terminal

An embedded terminal panel for Obsidian, powered by xterm.js and node-pty. Run shell commands directly inside your vault workspace — no external windows needed.

Desktop only. Requires Obsidian 1.5.0+.

Features

  • Full PTY terminal (not a simple command runner) with interactive shell support
  • Multiple terminal tabs with rename and color-coding support
  • Auto-detects your shell: PowerShell 7 / Windows PowerShell / cmd.exe on Windows, $SHELL on macOS/Linux
  • Four built-in color themes: Obsidian Dark, Obsidian Light, Monokai, Solarized Dark
  • Clickable URLs in terminal output
  • Auto-resize on panel resize
  • Opens at vault root by default
  • Clipboard support: Ctrl+V / Cmd+V paste, Ctrl+C / Cmd+C copy (with selection)
  • Notification sounds when background tab commands finish (4 sound types, adjustable volume)
  • Shift+Enter inserts a newline instead of submitting (muscle memory friendly for Claude Code users)
  • Custom background color override with color picker (match your vault theme)
  • Configurable: shell path, font size, font family, cursor blink, scrollback, panel location

Installation

Via BRAT (recommended)

  1. Install the BRAT plugin if you don't have it
  2. Open Settings > BRAT > Add Beta Plugin
  3. Enter: sdkasper/lean-obsidian-terminal
  4. Enable the plugin in Settings > Community Plugins
  5. Go to Settings > Terminal > Download binaries and click Download — this fetches the native terminal binary for your platform
  6. Open the terminal via the ribbon icon or command palette

Manual Installation

  1. Clone this repository
  2. Run npm install && npm run build
  3. Run node install.mjs "/path/to/your/vault"
  4. Restart Obsidian and enable the plugin in Settings > Community Plugins

Usage

ActionHow
Open terminalClick the terminal icon in the ribbon, or run Open terminal from the command palette
Toggle terminalCommand palette: Toggle terminal, or click the ribbon icon again
New tabCommand palette: New terminal tab, or click the + button in the tab bar
Rename tabRight-click the tab label
Close tabClick the x on the tab
Split paneCommand palette: Open terminal in new pane

Settings

SettingDefaultDescription
Shell pathAuto-detectPath to shell executable. Leave empty for auto-detection
Font size14Terminal font size in pixels
Font familyMenlo, Monaco, 'Courier New', monospaceTerminal font stack
ThemeObsidian DarkColor theme for the terminal
Cursor blinkOnWhether the cursor blinks
Scrollback5000Number of lines kept in scroll history
Background colorTheme defaultOverride the theme background with any CSS color (hex, RGB, etc.)
Default locationBottomWhere new terminal panels open (Bottom or Right)
Notify on completionOffSound + notice when a background tab command finishes
Notification soundBeepChoose from Beep, Chime, Ping, or Pop
Notification volume50Volume for notification sounds (0–100)

How It Works

The plugin uses xterm.js for terminal rendering and node-pty for native pseudo-terminal support. node-pty spawns a real shell process (PowerShell, bash, etc.) and connects its stdin/stdout to xterm.js via Obsidian's Electron runtime. This gives you a fully interactive terminal — not just command execution.

On Windows, the plugin uses the winpty backend because Obsidian's Electron renderer does not support Worker threads required by ConPTY.

Feedback

Use this repo to report bugs, request features, or ask questions.

Development

npm install
npm run dev          # Watch mode (auto-rebuild on save)
npm run build        # Production build
node install.mjs     # Install to default vault (D:\LOS Test)

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.

Lean Terminal | SimilarPlugins