Open in Terminal

by ChenFeng
5
4
3
2
1
Score: 63/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
41,726
downloads
16
forks
328
days
38
days
39
days
9
total PRs
1
open PRs
0
closed PRs
8
merged PRs
14
total issues
1
open issues
13
closed issues
37
commits

RequirementsExperimental

  • Claude Code

  • Codex CLI

  • Gemini CLI

Latest Version

a month ago

Changelog

  • Fix WSL launches failing with --cd: command not found by keeping option tokens unquoted.
  • Allow note folders whose names begin with two dots, such as ..archive.
  • Handle Git detection failures and limit the check to ten seconds.
  • Expand release checks for command toggles, settings compatibility, temporary-script cleanup, plugin bundle loading and release notes.
  • Require Linux, macOS and Windows checks before publishing; verify release assets before and after publication.

README file from

Github

Why

Your vault is a folder of Markdown files, which is exactly what coding agents and Git work best with. Getting there normally means opening a terminal, finding the vault path and typing cd. This plugin turns that into one command, and it can hand the note you are looking at to the agent.

Features

  • Open the vault in your terminal: one command opens your terminal at the vault root, or at the folder of the active note.
  • Launch coding agents in your vault: dedicated commands for Claude Code, Codex CLI, GitHub Copilot, Cursor CLI, Gemini CLI and OpenCode. Turn on only the ones you use.
  • Pass the active note to your agent: optionally include the current note path in the prompt, with your own prefix and suffix text and a live preview.
  • One-command Git: Git: commit and push and Git: pull run from the vault root.
  • Cross-platform: sensible defaults for macOS, Windows (including WSL) and Linux, stored per platform so a synced vault works on every machine.

Quick start

  1. Install the plugin (see Installation) and enable it.
  2. Press Cmd/Ctrl+P and run Open in terminal.
  3. To use an agent, open Settings → Open in Terminal → Coding agents, turn on the agent you have installed (for example Claude Code), then run Open in Claude Code from the command palette.

If this saves you a few cds a day, a ⭐ on GitHub is the easiest way to help other Obsidian users find it.

Installation

Community plugins (recommended) In Obsidian, open Settings → Community plugins → Browse, search for Open in Terminal, click Install, then Enable. Or open the plugin page and click Add to Obsidian.

Manual

  1. Download main.js and manifest.json from the latest release.
  2. Put them in <your vault>/.obsidian/plugins/open-in-terminal/.
  3. Reload Obsidian and enable Open in Terminal under Settings → Community plugins.

Beta versions (BRAT) Install BRAT, choose Add beta plugin, and enter Feng6611/Obsidian-open-in-Teminal.

Requires Obsidian 1.5.0 or later, desktop only. Agent and Git commands need the matching CLI (claude, codex, git, …) installed on your system.

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, every command stays off until you enable it in settings.

Settings

  • Terminal application: the executable name or path, such as Terminal or iTerm on macOS, powershell or cmd.exe on Windows, gnome-terminal or alacritty on Linux. Leave blank for the platform default. Do not include command-line arguments.
  • Open at current note's folder: uses the active note's folder as the working directory; falls back to the vault root when no note is open.
  • Include current note in prompt: off by default. When on, coding agents launch with your prefix, the note path and your suffix combined into one prompt. Terminal and Git commands never receive this prompt.
  • Reuse existing terminal instance (macOS): reuses the running terminal app; turn off to launch a new instance.
  • Coding agents: toggles for each agent command.
  • Git commands: default commit message (update by default) and toggles for the Git commands.
  • Use WSL for commands (Windows): runs every configured command inside WSL.

Platform notes

  • macOS: Terminal and iTerm are fully supported. Coding agents launch through a temporary .command script in a login shell; other terminal emulators must be able to open .command files.
  • Windows: Command Prompt, Windows PowerShell, PowerShell 7, Windows Terminal and Tabby, with or without WSL.
  • Linux: requires Bash. GNOME Terminal and terminals that accept the -e flag work out of the box.

FAQ

I don't see "Open in Claude Code" in the command palette. Agent and Git commands are off by default. Turn them on in Settings → Open in Terminal.

The agent command opens a terminal but nothing runs. The CLI must be installed and on your login shell's PATH. Run claude --version (or the matching command) in a normal terminal first.

Does the plugin send my notes anywhere? No. The plugin makes no network requests of its own. Only an optional note path, never note contents, can be passed to an agent prompt. Whatever the agent or CLI does after launch is up to that tool.

Does it skip the agent's permission prompts? No. The plugin never bypasses CLI confirmation prompts or permission checks.

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 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 runs 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 policies. Git: commit and push stages all files under the vault root before committing.

Support the project

Open in Terminal is free and MIT-licensed. If it's part of your daily workflow:

More from the author

Built by chenfeng.

  • File Ignore: keep node_modules, build output and other non-note folders out of Obsidian's index.
  • Command Reopen: a small Mac utility that makes Cmd+Tab restore minimized windows.

License

MIT

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Terminal
4 years ago by polyipseity
Integrate consoles, shells, and terminals.
Console Markdown Plugin
4 years ago by Daniel Ellermann
An Obsidian plugin which renders console commands and their output.
HK Code Block
4 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
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
Gnome Terminal Loader
3 years ago by David Carmichael
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.
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.
Plugin REPL
2 years ago by readwithai
An in-note Read Evaluate Print Loop to execute JavaScript within Obsidian
Command Line
2 years ago by Steven Stallion
Copy command lines from your notes to the clipboard.
Advanced Debug Mode
2 years ago by mnaoumov
Obsidian plugin that enhances debugging experience.
YouTrack Fetcher
2 years ago by Forketyfork
Obsidian plugin for creating notes out of YouTrack issues
GitHub Integration
2 years ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
GH Links Shortener
a year ago by David Barnett
Obsidian plugin to set shortened link text for pasted GitHub URLs
Asciinema Player
a year ago by Dinu Gherman
Asciinema player plugin to render asciicasts in Obsidian.
Agent Client
6 months ago by rait-09
Bring AI agents into Obsidian via Agent Client Protocol (ACP), such as Claude Code, Codex and Gemini CLI.
Lean Terminal
6 months ago by Sascha D. Kasper
Embedded terminal for Obsidian powered by xterm.js and node-pty
Hot Reload
5 months ago by pjeby
Automatically reload Obsidian plugins in development when their files are changed
Claude Sidebar
4 months ago by derek-larson14
Run Claude Code, Codex, and other agent CLIs in Obsidian
Workbuddian
4 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.