mirror of
https://github.com/rait-09/obsidian-agent-client.git
synced 2026-07-22 06:43:37 +00:00
No description
WSL agent launch previously wrapped the command in a nested `sh -c "<baked string>"` construction. In some environments (e.g. RHEL8) this fails before ACP connects (the process exits 1), and command paths/args with spaces broke because the command was interpolated unescaped. Launch agents instead with: wsl.exe [--exec] /bin/sh -c '<constant launcher>' sh <pathDir> <cwd> <command> <args...> This skips wsl's default-shell layer (--exec), runs under the user's login shell so ~/.profile is sourced (environment preserved, unlike a bare --exec), and passes command/args as argv (no quoting of user data). Also forward configured env vars (API keys, custom agent env, tool env) into WSL via WSLENV (buildWslEnv), so the plugin's API key field works in WSL mode without requiring keys in ~/.profile. Defensive: skips empty values and invalid names, merges existing WSLENV, never throws. Add a vitest unit-test suite for the platform WSL helpers (39 cases, incl. exact argv-ordering checks), with an obsidian stub alias and a dedicated tsconfig for typed linting of tests. Builds on #304 (direct WSL exec for absolute-path commands); this retains the environment that a bare --exec would drop and also fixes paths/args with spaces. Terminal launch keeps the existing wrapper for now (env forwarding is applied); a terminal-specific hybrid follows separately. |
||
|---|---|---|
| .claude | ||
| .github | ||
| .vscode | ||
| .zed | ||
| docs | ||
| src | ||
| test | ||
| .editorconfig | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| AGENTS.md | ||
| ARCHITECTURE.md | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| esbuild.config.mjs | ||
| eslint.config.mjs | ||
| GEMINI.md | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.ja.md | ||
| README.md | ||
| styles.css | ||
| tsconfig.eslint.json | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
| vitest.config.mts | ||
Agent Client Plugin for Obsidian
Bring AI agents (Claude Code, Codex, Gemini CLI) directly into Obsidian. Chat with your AI assistant right from your vault.
Built on Agent Client Protocol (ACP) by Zed.
https://github.com/user-attachments/assets/1c538349-b3fb-44dd-a163-7331cbca7824
Features
- Note Mentions: Reference your notes with
@notenamesyntax - Image Attachments: Paste or drag-and-drop images into the chat
- Slash Commands: Use
/commands provided by your agent - Multi-Agent Support: Switch between Claude Code, Codex, Gemini CLI, and custom agents
- Multi-Session: Run multiple agents simultaneously in separate views
- Floating Chat: A persistent, collapsible chat window for quick access
- Mode & Model Switching: Change AI models and agent modes from the chat
- Session History: Resume or fork previous conversations
- Chat Export: Save conversations as Markdown notes
- Terminal Integration: Let agents execute commands and return results
- MCP Support: Agents use their configured MCP servers — no extra setup needed in the plugin
Installation
From Community Plugins (Recommended)
- Open Settings → Community Plugins → Browse
- Search for "Agent Client"
- Click Install, then Enable
Via BRAT (Pre-release Versions)
To try pre-release versions before they are published to Community Plugins:
- Install the BRAT plugin
- Go to Settings → BRAT → Add Beta Plugin
- Paste:
https://github.com/RAIT-09/obsidian-agent-client - Enable Agent Client from the plugin list
Manual Installation
- Download
main.js,manifest.json,styles.cssfrom Releases - Place them in
VaultFolder/.obsidian/plugins/agent-client/ - Enable the plugin in Settings → Community Plugins
Quick Start
Open a terminal (Terminal on macOS/Linux, PowerShell on Windows) and run the following commands.
-
Install an agent and its ACP adapter (e.g., Claude Code):
curl -fsSL https://claude.ai/install.sh | bash # Install Claude Code npm install -g @agentclientprotocol/claude-agent-acp # Install ACP adapter -
Login (skip if using API key):
claudeFollow the prompts to authenticate with your Anthropic account.
-
Find the paths:
which node # macOS/Linux which claude-agent-acp where.exe node # Windows where.exe claude-agent-acp -
Configure in Settings → Agent Client:
- Node.js path: e.g.,
/usr/local/bin/node - Built-in agents → Claude Code → Path: e.g.,
/usr/local/bin/claude-agent-acp(notclaude) - API key: Add your key, or leave empty if logged in via CLI
- Node.js path: e.g.,
-
Start chatting: Click the robot icon in the ribbon
Setup Guides
- Claude Code
- Codex
- Gemini CLI
- Custom Agents (OpenCode, Qwen Code, Kiro, Mistral Vibe, etc.)
Development
npm install
npm run dev
For production builds:
npm run build
License
Apache License 2.0 - see LICENSE for details.
