ClaudeCode Bridge

pending

by cwjohnpark

AI-powered terminal bringing Claude Code into your knowledge vault.

Updated 27d agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

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 UserPromptSubmit hook — no manual steps needed
  • Smart sendCmd+Shift+L sends 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

Installation

Manual

  1. Download the latest release (main.js, manifest.json, styles.css)
  2. Create a folder <vault>/.obsidian/plugins/claudecode-bridge/
  3. Copy the three files into the folder
  4. 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

CommandDefault HotkeyDescription
ClaudeCode Bridge: Open terminalOpen the terminal panel
ClaudeCode Bridge: Launch ClaudeStart Claude Code in the terminal
ClaudeCode Bridge: Send to terminalCmd+Shift+LSend selected text, or insert active file path if nothing is selected

Settings

SettingDescription
Shell pathAbsolute path to your shell (default: /bin/zsh)
Font sizeTerminal font size in px
Terminal themeDark or Light
Auto-launch ClaudeAutomatically run Claude when the terminal opens
Claude argumentsExtra CLI flags (e.g. --permission-mode trust)
Prompt languageDefault language for the system prompt (Korean / English)
System promptEditable vault-specific prompt injected via --append-system-prompt

How the system prompt works

When you launch Claude through ClaudeCode Bridge, the plugin:

  1. Writes the system prompt to a temporary file
  2. Passes it to Claude Code via --append-system-prompt
  3. 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:

  1. Tracks the active file and writes its path to a temporary JSON file (claudecode-bridge-context.json)
  2. Adds a UserPromptSubmit hook to <vault>/.claude/settings.json that runs cat on the JSON file
  3. 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.