返回排行榜

YishenTu/claudian

TypeScript

An Obsidian plugin that embeds Claude Code/Codex as an AI collaborator in your vault

claude-codeobsidianobsidian-pluginproductivityidecodex
Star 增长趋势
Star
14.2k
Forks
913
周增长
Issues
56
5k10k
25年12月26年2月26年5月26年7月
制品库npmnpm install claudian
README

Claudian

GitHub stars GitHub release License

Preview

An Obsidian plugin that embeds AI coding agents (Claude Code, Codex, Opencode, Pi, and more to come) in your vault. Your vault becomes the agent's working directory — file read/write, search, bash, and multi-step workflows all work out of the box.

Features & Usage

Open the chat sidebar from the ribbon icon or command palette. Select text and use the hotkey for inline edit. Everything works like your familiar coding agent, Claude Code, Codex, Opencode, and Pi — talk to the agent, and it reads, writes, edits, and searches files in your vault.

Inline Edit — Select text or start at the cursor position + hotkey to edit directly in notes with word-level diff preview.

Slash Commands & Skills — Type / or $ for reusable prompt templates or Skills from user- and vault-level scopes.

@mention - Type @ to mention anything you want the agent to work with, vault files, subagents, MCP servers, or files in external directories.

Plan Mode — Toggle via Shift+Tab. The agent explores and designs before implementing, then presents a plan for approval.

Instruction Mode (#) — Refined custom instructions added from the chat input.

MCP Servers — Connect external tools via Model Context Protocol (stdio, SSE, HTTP). Claude manages vault MCP in-app; Codex uses its own CLI-managed MCP configuration.

Multi-Tab & Conversations — Multiple chat tabs, conversation history, fork, resume, and compact.

Requirements

Installation

  1. Open Obsidian → Settings → Community plugins → Browse
  2. Search for "Claudian" and click Install
  3. Enable the plugin

Or install directly from the community plugin page.

From GitHub Release

  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"

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

Privacy & Data Use

  • Sent to API: Your input, attached files, images, and tool call outputs. Default: Anthropic (Claude), OpenAI (Codex), or the provider configured in Opencode/Pi; configurable via provider settings and environment variables.
  • Local storage: Claudian settings and session metadata in vault/.claudian/; Claude provider files in vault/.claude/; transcripts in ~/.claude/projects/ (Claude), ~/.codex/sessions/ (Codex), and .pi/agent/sessions/ or ~/.pi/agent/sessions/ (Pi).
  • Environment variables: Provider subprocesses inherit the Obsidian process environment plus any variables you configure in Claudian. This is needed for CLI authentication, proxies, certificates, and PATH resolution.
  • Device-specific paths: Per-device CLI paths use an opaque local key stored in browser local storage, not your system hostname.
  • Background activity: Claudian does not run telemetry beacons. UI polling timers read local Obsidian/editor selection state only. Network activity is limited to explicit provider runtime work, configured MCP endpoints, and provider SDK/CLI calls needed to answer your requests.

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: Leave the setting empty first so Claudian can auto-detect Claude Code. If auto-detection fails, find your CLI path and set it in Settings → Advanced → Claude CLI path.

Platform Command Example Path
macOS/Linux which claude /Users/you/.volta/bin/claude
Windows (native) where.exe claude C:\Users\you\AppData\Local\Claude\claude.exe
Windows (npm) npm root -g {root}\@anthropic-ai\claude-code\cli-wrapper.cjs

Note: On Windows, avoid .cmd and .ps1 wrappers. Use claude.exe for native installs, or cli-wrapper.cjs for package-manager installs. cli.js is only a legacy fallback for older Claude Code npm packages.

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

Other providers

Codex, Opencode, and Pi support are live but features might be incomplete, and still need more testing across platforms and installation methods. If you have feature request or run into any bugs, please submit a GitHub issue.

Architecture

src/
├── main.ts                      # Plugin entry point
├── app/                         # Shared defaults and plugin-level storage
├── core/                        # Provider-neutral runtime, registry, and type contracts
│   ├── runtime/                 # ChatRuntime interface and approval types
│   ├── providers/               # Provider registry and workspace services
│   ├── auxiliary/               # Shared provider auxiliary services
│   ├── bootstrap/               # Plugin bootstrap wiring
│   ├── security/                # Approval utilities
│   └── ...                      # commands, mcp, prompt, storage, tools, types
├── providers/
│   ├── claude/                  # Claude SDK adaptor, prompt encoding, storage, MCP, plugins
│   ├── codex/                   # Codex app-server adaptor, JSON-RPC transport, JSONL history
│   ├── opencode/                # Opencode adaptor
│   ├── pi/                      # Pi RPC adaptor, model discovery, JSONL history
│   └── acp/                     # Agent Client Protocol shared transport
├── features/
│   ├── chat/                    # Sidebar chat: tabs, controllers, renderers
│   ├── inline-edit/             # Inline edit modal and provider-backed edit services
│   └── settings/                # Settings shell with provider tabs
├── shared/                      # Reusable UI components and modals
├── i18n/                        # Internationalization (10 locales)
├── types/                       # Shared ambient types
├── utils/                       # Cross-cutting utilities
└── style/                       # Modular CSS

License

Licensed under the MIT License.

Sponsorship

Ke Holdings Inc. (BEIKE)

MOMA

Claudian is proudly sponsored by Ke Holdings Inc. (BEIKE) and the MOMA team. Their support helps Claudian continue to improve through ongoing development and maintenance.

Want to support Claudian or appear here? Contact me: tysk01213@gmail.com.

Star History

Star History Chart

Acknowledgments

相关仓库
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

JavaScriptnpmMIT Licenseai-agentsanthropic
ecc.tools
231.9k35.4k
NousResearch/hermes-agent

The agent that grows with you

PythonPyPIMIT Licenseaiai-agent
hermes-agent.nousresearch.com
218.5k41.3k
farion1231/cc-switch

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Rustcrates.ioMIT Licenseai-toolsclaude-code
ccswitch.io
119.8k8k
nextlevelbuilder/ui-ux-pro-max-skill

An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms

PythonPyPIMIT Licenseai-skillsantigravity
uupm.cc
108.6k11.6k
Graphify-Labs/graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

PythonPyPIMIT Licenseclaude-codegraphrag
graphify.com
93.3k9k
JuliusBrussee/caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

JavaScriptnpmMIT Licenseaianthropic
caveman.so
91.8k5.2k
thedotmack/claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

JavaScriptnpmApache License 2.0aiai-agents
claude-mem.ai
88.2k7.7k
DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

JavaScriptnpmMIT Licenseagent-skillsai-agents
ponytail.dev
87.4k4.8k
addyosmani/agent-skills

Production-grade engineering skills for AI coding agents.

JavaScriptnpmMIT Licenseagent-skillsantigravity
skills.addy.ie
79.7k8.6k
Egonex-AI/Understand-Anything

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

TypeScriptnpmMIT Licenseclaude-codeclaude-skills
understand-anything.com
75.5k6.3k
rtk-ai/rtk

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Rustcrates.ioApache License 2.0agentic-codingai-coding
rtk-ai.app
72.4k4.5k
shareAI-lab/learn-claude-code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

PythonPyPIMIT Licenseagentclaude-code
learn.shareai.run
71.9k11.7k