Integrate consoles, shells, and terminals inside Obsidian.
Repository · Changelog · Community plugin · Related · Features · Installation · Usage · Contributing · Security

For first time users, read the installation section first!
This file is automatically opened on first install. You can reopen it in settings or command palette.
terminal under .obsidian/plugins of your vault.manifest.json, main.js, and styles.css from the latest release into the directory.bun. See https://bun.sh for installation.bun install in the root directory.bun run obsidian:install <vault directory> in the root directory.pip3 install psutil==5.9.5 pywinctl==0.0.50 typing_extensions==4.7.1. Open terminal ribbon.Ctrl+P or click on the Open command palette ribbon next to the left window border.Ctrl to edit the profile before use. The item (Temporary profile) starts a terminal with a temporary profile.More optionsThe keyboard shortcuts can be customized in hotkeys settings.
Global
Ctrl+Shift+`Terminal is focused
When a terminal is focused, other keyboard shortcuts (including Obsidian and plugin hotkeys) are disabled. Only the following keyboard shortcuts work. Thus you can ignore Obsidian complaining about conflicting keys for the following keyboard shortcuts.
Ctrl+Shift+K, Command+Shift+K (Apple)Ctrl+Shift+W, Command+Shift+W (Apple)Ctrl+Shift+F, Command+Shift+F (Apple)Ctrl+Shift+` (same as above)Theming is possible. However, there is no user-friendly interface for now.
Edit button labeled Data. It should open up a new modal in which there is a large textbox.terminalOptions in the text area labeled Data. Refer to the xterm.js documentation (ITerminalOptions) to set the options. Nested objects may need to be used.Profile defaults). Those options act as a fallback for every profile unless a profile explicitly overrides them.This plugin comes with several profile presets that you can reference.
When setting up a terminal profile, you need to distinguish between shells and terminal emulators. (Search online if needed.) Generally, integrated profiles only work with shells while external ones only work with terminal emulators.
Shells
bash --loginshcmddash<Git installation>\bin\bash.exe --login (e.g. C:\Program Files\Git\bin\bash.exe)pwshpowershellwsl or wsl -d <distribution name>zsh --loginTerminal emulators
cmdgnome-terminalkonsole/System/Applications/Utilities/Terminal.app/Contents/macOS/Terminal "$PWD"wt/Applications/iTerm.app/Contents/MacOS/iTerm2 "$PWD"xtermThis plugin patches require so that require("obsidian") and other Obsidian modules work in the developer console. It is toggleable as Expose internal modules in settings.
In the developer console, a context variable $$ is passed into the code, which can be used to dynamically change terminal options.
The full API is available from src/@types/obsidian-terminal.ts.
Ctrl+Shift+`, then you can use Obsidian hotkeys again.Contributions are welcome!
This project uses changesets to manage the changelog. When creating a pull request, please add a changeset describing the changes. Add multiple changesets if your pull request changes several things. End each changeset with ([PR number](PR link) by [author username](author link)). For example, the newly created file under the directory .changeset should look like:
---
"example": patch
---
This is an example change. ([GH#1](https://github.com/ghost/example/pull/1) by [@ghost](https://github.com/ghost))
This project uses the following tools to ensure code and commit quality:
bun run check (lint only) or bun run fix (auto-fix lint issues).bun run format (format all files) or bun run format:check (check formatting only).bun run markdownlint or auto-fix with bun run markdownlint:fix.lint-staged and pre-push runs commitlint.Lint-staged note: The lint-staged configuration (
.lintstagedrc.mjs) invokes formatter/linter binaries directly (for exampleprettier --write,eslint --cache --fix,markdownlint-cli2 --fix) so that the list of staged files is passed through to the tool. Invoking these viabun runwould prevent lint-staged from forwarding filenames and cause the tool to operate on its default glob (or the entire repo). Usebun run formatto format the entire repository when needed.
To set up locally:
bun install to install dependencies and set up hooks.You can manually run:
bun run check — lint all code (no formatting)bun run fix — auto-fix lint issues (no formatting)bun run format — format all code with Prettierbun run format:check — check formatting with Prettierbun run markdownlint — check all Markdown filesbun run markdownlint:fix — auto-fix Markdown filesbun run commitlint — check commit messages in rangeConfiguration files:
.eslintrc.* or eslint.config.mjs — ESLint rules.prettierrc — Prettier rules.prettierignore — Prettier ignore patterns.markdownlint.jsonc — markdownlint rules.commitlintrc.js — commitlint config.husky/ — Git hooksThis repository uses Vitest for fast unit tests. Tests live under tests/ and should be named *.spec.ts or *.spec.js.
bun run test (runs vitest run --coverage).bun run test:watch.bun run test (see .husky/pre-push) and will block pushes if tests fail.See vitest.config.mts for minimal config and further instructions.
The todos here, ordered alphabetically, are things planned for the plugin. There are no guarantees that they will be completed. However, we are likely to accept contributions for them.
We hope that there will never be any security vulnerabilities, but unfortunately it does happen. Please report them!
| Version | Supported |
|---|---|
| rolling | ✅ |
| latest | ✅ |
| outdated | ❌ |
Please report a vulnerability by opening an new issue. We will get back to you as soon as possible.