Back
gh

YishenTu/claudian: An Obsidian plugin that embeds Claude Code as an AI collaborator in your vault

An Obsidian plugin that embeds Claude Code as an AI collaborator in your vault - YishenTu/claudian

by YishenTu github.com 1,674 words
View original

Claudian

GitHub stars GitHub release License

Preview

An Obsidian plugin that embeds Claude Code as an AI collaborator in your vault. Your vault becomes Claude’s working directory, giving it full agentic capabilities: file read/write, search, bash commands, and multi-step workflows.

Features

Requirements

Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder called claudian in your vault’s plugins folder:
    /path/to/vault/.obsidian/plugins/claudian/
  3. Copy the downloaded files into the claudian folder
  4. Enable the plugin in Obsidian:
    • Settings → Community plugins → Enable “Claudian”

Using BRAT

BRAT (Beta Reviewers Auto-update Tester) allows you to install and automatically update plugins directly from GitHub.

  1. Install the BRAT plugin from Obsidian Community Plugins
  2. Enable BRAT in Settings → Community plugins
  3. Open BRAT settings and click “Add Beta plugin”
  4. Enter the repository URL: https://github.com/YishenTu/claudian
  5. Click “Add Plugin” and BRAT will install Claudian automatically
  6. Enable Claudian in Settings → Community plugins

Tip: BRAT will automatically check for updates and notify you when a new version is available.

From source (development)

  1. Clone this repository into your vault’s plugins folder:
    cd /path/to/vault/.obsidian/plugins
    git clone https://github.com/YishenTu/claudian.git
    cd claudian
  2. Install dependencies and build:
    npm install
    npm run build
  3. Enable the plugin in Obsidian:
    • Settings → Community plugins → Enable “Claudian”

Development

# Watch mode
npm run dev

# Production build
npm run build

Tip: Copy .env.local.example to .env.local or npm install and setup your vault path to auto-copy files during development.

Usage

Two modes:

  1. Click the bot icon in ribbon or use command palette to open chat
  2. Select text + hotkey for inline edit

Use it like Claude Code—read, write, edit, search files in your vault.

Context

Features

Configuration

Settings

Customization

Hotkeys

Slash Commands

MCP Servers

Claude Code Plugins

Safety

Environment

Advanced

Safety and Permissions

ScopeAccess
VaultFull read/write (symlink-safe via realpath)
Export pathsWrite-only (e.g., ~/Desktop, ~/Downloads)
External contextsFull read/write (session-only, added via folder icon)

Troubleshooting

Claude CLI not found

If you encounter spawn claude ENOENT or Claude CLI not found, the plugin can’t auto-detect your Claude installation. Common with Node version managers (nvm, fnm, volta).

Solution: Find your CLI path and set it in Settings → Advanced → Claude CLI path.

PlatformCommandExample Path
macOS/Linuxwhich claude/Users/you/.volta/bin/claude
Windows (native)where.exe claudeC:\Users\you\AppData\Local\Claude\claude.exe
Windows (npm)npm root -g{root}\@anthropic-ai\claude-code\cli.js

Note: On Windows, avoid .cmd wrappers. Use claude.exe or cli.js.

Alternative: Add your Node.js bin directory to PATH in Settings → Environment → Custom variables.

npm CLI and Node.js not in same directory

If using npm-installed CLI, check if claude and node are in the same directory:

dirname $(which claude)
dirname $(which node)

If different, GUI apps like Obsidian may not find Node.js.

Solutions:

  1. Install native binary (recommended)
  2. Add Node.js path to Settings → Environment: PATH=/path/to/node/bin

Still having issues? Open a GitHub issue with your platform, CLI path, and error message.

Architecture

src/
├── main.ts                      # Plugin entry point
├── core/                        # Core infrastructure
│   ├── agent/                   # Claude Agent SDK wrapper (ClaudianService)
│   ├── agents/                  # Custom agent management (AgentManager)
│   ├── commands/                # Slash command management (SlashCommandManager)
│   ├── hooks/                   # PreToolUse/PostToolUse hooks
│   ├── images/                  # Image caching and loading
│   ├── mcp/                     # MCP server config, service, and testing
│   ├── plugins/                 # Claude Code plugin discovery and management
│   ├── prompts/                 # System prompts for agents
│   ├── sdk/                     # SDK message transformation
│   ├── security/                # Approval, blocklist, path validation
│   ├── storage/                 # Distributed storage system
│   ├── tools/                   # Tool constants and utilities
│   └── types/                   # Type definitions
├── features/                    # Feature modules
│   ├── chat/                    # Main chat view + UI, rendering, controllers, tabs
│   ├── inline-edit/             # Inline edit service + UI
│   └── settings/                # Settings tab UI
├── shared/                      # Shared UI components and modals
│   ├── components/              # Input toolbar bits, dropdowns, selection highlight
│   ├── mention/                 # @-mention dropdown controller
│   ├── modals/                  # Instruction modal
│   └── icons.ts                 # Shared SVG icons
├── i18n/                        # Internationalization (10 locales)
├── utils/                       # Modular utility functions
└── style/                       # Modular CSS (→ styles.css)

Roadmap

License

Licensed under the MIT License.

Star History Chart