Open in Terminal

by ChenFeng
5
4
3
2
1
Score: 60/100

Description

Category: Coding & Technical Tools

The Open in Terminal plugin adds commands to launch your vault directory in your preferred terminal application. The core command opens a clean terminal window at your vault's root without running additional scripts. Beyond that, you can enable optional commands for Claude Code, Codex CLI, and Gemini CLI that open the terminal and automatically execute their respective tools. Settings let you specify which terminal app to use like Terminal or iTerm on macOS, cmd.exe or PowerShell on Windows, and gnome terminal or alacritty on Linux. The plugin handles platform-specific launch strategies cleanly, avoiding unnecessary shell overhead while offering debug logging for troubleshooting when needed.

Reviews

No reviews yet.

Stats

49
stars
38,193
downloads
15
forks
281
days
4
days
4
days
8
total PRs
1
open PRs
0
closed PRs
7
merged PRs
12
total issues
0
open issues
12
closed issues
43
commits

RequirementsExperimental

  • Claude Code

  • Codex CLI

  • Gemini CLI

Latest Version

5 days ago

Changelog

  • Keep the note-folder working directory inside the vault; escape attempts fall back to the vault root.
  • Validate the configured terminal executable (reject empty values and control characters) without a hard allowlist.
  • Add a README "Permissions and disclosures" section for shell execution and temp-script filesystem use.
  • Correct changelog wording: temporary launch scripts are used on macOS and Windows.

README file from

Github

Open in Terminal

Open your Obsidian vault in a terminal, or launch Claude Code, Codex, Gemini CLI, and other coding agents inside it, directly from the command palette.

Features

  • Open the vault in your terminal — Run a single command to open your terminal at the vault root or at the folder of your active note.
  • Launch coding agents in your vault — Dedicated commands for Claude Code, Codex CLI, GitHub Copilot, Cursor CLI, Gemini CLI, and OpenCode. Enable only the agents you use.
  • Pass the active note to your agent — Optionally include the current note path in the agent prompt with customizable prefix and suffix text.
  • One-command Git operations — Run Git: commit and push and Git: pull directly from the vault root.
  • Cross-platform support — Sensible defaults for macOS, Windows, and Linux, with per-platform settings storage so synced vaults work across machines.

Installation

In Obsidian, go to Settings → Community plugins → Browse, search for Open in Terminal, and click Install, then Enable. You can also install it from the plugin page by clicking Add to Obsidian.

Commands

Command What it does
Open in terminal Opens your terminal at the working directory
Open in Claude Code Runs claude
Open in Codex cli Runs codex
Open in GitHub Copilot Runs copilot
Open in Cursor cli Runs agent
Open in Gemini cli Runs gemini
Open in OpenCode Runs opencode
Git: commit and push Runs git add . && git commit -m "<default message>" && git push
Git: pull Runs git pull

Except for Open in terminal, all commands remain disabled until enabled in settings. The corresponding CLI tools must be installed on your system.

Settings

  • Terminal application — Enter the executable name or path, such as Terminal or iTerm on macOS, powershell or cmd.exe on Windows, or gnome-terminal or alacritty on Linux. Leave blank to use the platform default. Do not include command-line arguments.
  • Open at current note's folder — Uses the active note's directory as the working directory; falls back to the vault root when no note is open.
  • Include current note in prompt — Disabled by default. When enabled, coding agents launch with your prefix, the note path, and your suffix combined into a single prompt. Settings provides a live preview. Terminal and Git commands do not receive this prompt.
  • Reuse existing terminal instance (macOS) — Reuses the running terminal app; disable this option to launch a new instance.
  • Coding agents — Toggle switches for individual agent commands.
  • Git commands — Configure a default commit message (defaults to update) and toggle switches for Git commands.
  • Use WSL for commands (Windows) — Runs all configured commands inside Windows Subsystem for Linux (WSL).

Platform notes

  • macOS — Terminal and iTerm are fully supported. Coding agents launch using a temporary .command script in a login shell; other terminal emulators must support opening .command files.
  • Windows — Supports Command Prompt, Windows PowerShell, PowerShell 7, Windows Terminal, and Tabby, with or without WSL.
  • Linux — Requires Bash. GNOME Terminal and terminals accepting the -e flag work out of the box.

The plugin never bypasses CLI tool confirmation prompts or permission checks. When passing a note path into an agent prompt, the agent may begin processing that note immediately upon launch.

Permissions and disclosures

This plugin is isDesktopOnly: true and needs two desktop capabilities that automated review may flag. Both are required for the product to work; they are scoped as follows.

Shell execution (child_process)

Commands are started with Node spawn and shell: false. The executable is one of:

  • the terminal application name or path you configure in settings (validated to reject empty values and control characters; not a fixed allowlist, so custom terminals keep working);
  • a fixed CLI agent command such as claude, codex, copilot, agent, gemini, or opencode;
  • a git probe (git rev-parse) used only to detect whether the vault is a Git repository.

The working directory is the vault root, or — when enabled — the folder of the active note after resolving the path and confirming it still lies inside the vault. Paths that would escape the vault fall back to the vault root.

Direct filesystem access (fs)

On macOS and Windows the plugin writes a short-lived launch script (.command / .ps1, mode 0700) under a fresh directory in the OS temp folder, then deletes that directory after launch (or on failure). This is outside the vault because the system terminal APIs need a real script path; the Obsidian Vault API cannot substitute for it.

The plugin does not:

  • read or write vault note contents via fs;
  • walk your home directory or other arbitrary paths;
  • make network requests of its own (any network activity comes only from the terminal or CLI tools you choose to run);
  • put note body text into launch scripts (only an optional note path may be passed into an agent prompt).

See also Privacy below, and Obsidian’s Developer policies — Disclosures for vault-external file access.

Privacy

This desktop-only plugin launches programs on your local machine: it opens your terminal emulator and executes the commands you configure. On macOS and Windows, it writes a temporary script outside the vault and deletes it after launch; on Windows, that script runs under a process-scoped execution policy without changing system-wide execution policies. Git: commit and push stages all files under the vault root before committing.

The plugin does not transmit data over the network. Network activity depends entirely on the commands and coding agents you choose to run.

About the author

Built by chenfeng. I also created File Ignore to keep non-note directories like node_modules out of Obsidian's index, and Command Reopen, a focused Mac utility that restores minimized windows with Cmd+Tab. If you find this plugin helpful, you can buy me a coffee.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced Debug Mode
a year ago by mnaoumov
Obsidian plugin that enhances debugging experience.
Agent Client
5 months ago by rait-09
Bring AI agents into Obsidian via Agent Client Protocol (ACP), such as Claude Code, Codex and Gemini CLI.
Asciinema Player
9 months ago by Dinu Gherman
Asciinema player plugin to render asciicasts in Obsidian.
Claude Sidebar
2 months ago by derek-larson14
Run Claude Code, Codex, and other agent CLIs in Obsidian
Command Line
2 years ago by Steven Stallion
Copy command lines from your notes to the clipboard.
Console Markdown Plugin
4 years ago by Daniel Ellermann
An Obsidian plugin which renders console commands and their output.
GH Links Shortener
a year ago by David Barnett
Obsidian plugin to set shortened link text for pasted GitHub URLs
GitHub Integration
a year ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
Gnome Terminal Loader
3 years ago by David Carmichael
HK Code Block
3 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
Hot Reload
3 months ago by pjeby
Automatically reload Obsidian plugins in development when their files are changed
Lean Terminal
4 months ago by Sascha D. Kasper
Embedded terminal for Obsidian powered by xterm.js and node-pty
Markdown Formatting Assistant
6 years ago by Reocin
This Plugin provides a simple WYSIWYG Editor for Markdown and in addition a command line interface. The command line interface facilitate a faster workflow.
Pieces for Developers
3 years ago by Pieces For Developers
Pieces' powerful extension for Obsidian-MD that allows users to access their code snippets directly within the Obsidian workspace
Plugin REPL
2 years ago by readwithai
An in-note Read Evaluate Print Loop to execute JavaScript within Obsidian
Shell commands
5 years ago by Jarkko Linnanvirta
Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
Terminal
4 years ago by polyipseity
Integrate consoles, shells, and terminals.
Workbuddian
2 months ago by jiang198012
Obsidian 插件:把本地 CodeBuddy CLI 或 Hermes agent 变成 vault 内 AI 聊天——流式回复、@引用、双后端切换。Obsidian plugin turning local CodeBuddy CLI or Hermes agent into an in-vault AI chat with streaming, @-references, and dual backends.
YouTrack Fetcher
a year ago by Forketyfork
Obsidian plugin for creating notes out of YouTrack issues