The Problem
Claude Code and Codex are powerful terminal tools, but they operate outside your notes. Claudian embeds them directly in Obsidian, making your vault the agent's working directory. Users avoid context-switching to a terminal and get AI assistance where their knowledge lives.
What This Does
Claudian is an Obsidian plugin that runs Claude Code and Codex as AI collaborators. It provides a chat sidebar, inline editing with word-level diffs, slash commands, skills, MCP server support, and multi-tab conversation management. The vault becomes the agent's workspace — it can read, write, and search files there.
The codebase is substantial: 430 TypeScript files, with src/main.ts as the plugin entry point. A provider abstraction in src/core/providers/ handles both Claude and Codex runtimes, each with their own chat runtime, history store, and settings. The UI layer in src/features/chat/ manages tabs, input, rendering, and controllers.
How It Is Wired
Control flow starts at src/main.ts (onload), which sets up the view and commands. The applyEnvironmentVariables function at src/main.ts:357 reaches 342 functions and reads the filesystem via fs.promises.unlink after routing through saveMetadata and deleteLegacyMetadataIfPresent. deleteConversation at src/main.ts:573 reaches 294 functions and deletes session files via fs.unlink.
The core hub is src/core/types/index.ts — 73 modules depend on it, making changes there high-blast-radius. src/core/providers/types.ts is similar with 62 dependents, but it's inside a circular dependency cycle along with src/main.ts and ProviderRegistry.ts. Breaking that cycle requires extracting shared types or deferring imports.
The runtime layer is where the real work happens. src/providers/claude/runtime/ClaudeChatRuntime.ts (73 functions) and src/providers/codex/runtime/CodexChatRuntime.ts (72 functions) orchestrate agent sessions, with the Codex runtime handling file I/O directly. The CodexHistoryStore.ts manages conversation persistence. The InputController.ts coordinates the chat input, reading and writing files as part of its work.
Filesystem effects are concentrated in src/core/storage/HomeFileAdapter.ts (40 callers) and src/utils/path.ts (21 callers). The McpTester.ts entry point (start) reaches 57 functions and resolves the Claude CLI path through findClaudeCLIPath, ultimately reading fs.readFileSync on the nvm alias file.
How To Use It
Setup: Clone and build from source:
cd /path/to/vault/.obsidian/plugins
git clone https://github.com/moses-y/claudian.git
cd claudian
npm install
npm run build
Configuration: Requires the Claude Code CLI installed (native install recommended). Codex is optional. Copy .env.local.example to .env.local to configure the vault path for development auto-copy.
Running: Enable the plugin in Obsidian Settings → Community plugins. Open the chat sidebar via the ribbon icon or command palette. Select text and use the hotkey for inline edit. Use Shift+Tab for Plan Mode, / or $ for slash commands and skills.
Real-World Use
A researcher keeps meeting notes, literature reviews, and code snippets in a vault. With Claudian, they select a paragraph in a draft and hit the inline-edit hotkey — the agent rewrites it with word-level diff preview. They can also ask the agent to summarize all notes from the last week, with the agent reading and cross-referencing files across the vault.
Code Health & Issues
Static analysis found 193 issues: 122 high, 68 medium, 3 low. Key findings:
- High - Import cycle members (38 instances) —
src/core/providers/types.ts,src/main.ts,src/core/providers/ProviderRegistry.tsparticipate in circular imports. Fix: extract shared types or invert dependencies. - High - Hub modules (9) —
src/core/types/index.tshas 73 dependents; changes ripple widely. Keep it stable and small. - High - Oversized files (8) —
MessageRenderer.ts(626 lines),CodexHistoryStore.ts,ToolCallRenderer.tsare hard to maintain. Split by responsibility. - Medium - High branching density (5) —
src/utils/path.ts,src/utils/env.ts,claude/settings.tshave 85 branch points over 270 lines. Consider strategy dispatch.
SDLC observations from the workflow files:
- Critical -
CLAUDE_CODE_OAUTH_TOKENexposed in.github/workflows/claude.yml— a fork-triggered PR could exfiltrate publish/cloud credentials. Move secret-using steps toworkflow_run. - High - Third-party actions unpinned (
anthropics/claude-code-action@v1) in workflows — tag moves are a known supply-chain vector. Pin to commit SHAs. - Medium - CI lacks dependency vulnerability scanning,
persist-credentials: false, and least-privilegeGITHUB_TOKENpermissions. - Medium -
postinstallscript inpackage.json— disable scripts in CI and run explicitly.
The Bottom Line
Claudian is a serious, well-tested plugin (197 test files) that bridges Obsidian and AI coding agents. The architecture is sound but the circular imports and hub modules will make changes costly. The CI secrets issue is the one thing to fix before using this in any shared or public context.