ClaudeCode Bridge
pendingby cwjohnpark
AI-powered terminal bringing Claude Code into your knowledge vault.
ClaudeCode Bridge
AI-powered terminal bringing Claude Code into your knowledge vault.
ClaudeCode Bridge embeds a fully interactive Claude Code terminal directly inside Obsidian. It injects a vault-aware system prompt so Claude understands wikilinks, tags, frontmatter, and your vault's structure out of the box.
Features
- Embedded terminal — xterm.js-based terminal running inside an Obsidian side panel
- One-click Claude launch — Start Claude Code with a single button press or command
- Vault-aware system prompt — Automatically injects Obsidian markdown rules (wikilinks, tags, frontmatter, embeds, callouts) so Claude respects your vault conventions
- Editor context auto-injection — Automatically feeds the active file info to Claude on every prompt via a
UserPromptSubmithook — no manual steps needed - Smart send —
Cmd+Shift+Lsends selected text to the terminal, or inserts the active file path if nothing is selected - Customizable system prompt — Edit the injected prompt freely or switch between language presets (Korean / English)
- i18n settings UI — Settings panel automatically adapts to your system language (English, Korean, Japanese, Chinese)
- Dark / Light theme — Terminal theme follows your preference
Prerequisites
- Obsidian v1.0.0+
- Claude Code CLI installed and available in your
PATH
Installation
Manual
- Download the latest release (
main.js,manifest.json,styles.css) - Create a folder
<vault>/.obsidian/plugins/claudecode-bridge/ - Copy the three files into the folder
- Restart Obsidian and enable ClaudeCode Bridge in Settings > Community plugins
Build from source
git clone https://github.com/cwJohnPark/claudecode-bridge.git
cd claudecode-bridge
npm install
npm run build
Copy main.js, manifest.json, and styles.css into your vault's plugin directory.
Commands
| Command | Default Hotkey | Description |
|---|---|---|
| ClaudeCode Bridge: Open terminal | — | Open the terminal panel |
| ClaudeCode Bridge: Launch Claude | — | Start Claude Code in the terminal |
| ClaudeCode Bridge: Send to terminal | Cmd+Shift+L | Send selected text, or insert active file path if nothing is selected |
Settings
| Setting | Description |
|---|---|
| Shell path | Absolute path to your shell (default: /bin/zsh) |
| Font size | Terminal font size in px |
| Terminal theme | Dark or Light |
| Auto-launch Claude | Automatically run Claude when the terminal opens |
| Claude arguments | Extra CLI flags (e.g. --permission-mode trust) |
| Prompt language | Default language for the system prompt (Korean / English) |
| System prompt | Editable vault-specific prompt injected via --append-system-prompt |
How the system prompt works
When you launch Claude through ClaudeCode Bridge, the plugin:
- Writes the system prompt to a temporary file
- Passes it to Claude Code via
--append-system-prompt - Claude then understands Obsidian conventions — preserving
[[wikilinks]],#tags, YAML frontmatter, and your vault's folder structure
You can fully customize the prompt in settings or switch between the Korean and English presets.
Editor context hook
ClaudeCode Bridge automatically registers a Claude Code hook so that Claude always knows which file you are looking at.
On plugin load, the plugin:
- Tracks the active file and writes its path to a temporary JSON file (
claudecode-bridge-context.json) - Adds a
UserPromptSubmithook to<vault>/.claude/settings.jsonthat runscaton the JSON file - Every time you send a prompt, Claude Code automatically injects the current editor context — no manual command needed
The hook is idempotent; reloading the plugin will not create duplicates.
Project Structure
src/
main.ts # Plugin entry point
types.ts # Settings interface
constants.ts # Defaults, themes, system prompts
i18n/ # Internationalization (en, ko, ja, zh)
settings/
SettingsTab.ts # Settings UI
services/
ShellSpawner.ts # PTY process management
VaultContext.ts # Vault path and file utilities
ActiveFileTracker.ts # Active file tracking and context file sync
ClaudeHookInstaller.ts # UserPromptSubmit hook registration
views/
TerminalView.ts # Terminal view with xterm.js
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.