No description
Find a file
RAIT-09 850e2e1557 fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV
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.
2026-06-05 13:16:28 +09:00
.claude fix: remove zero-width Unicode characters from skill file 2026-05-14 23:24:53 +09:00
.github fix: update actions versions in CI workflow 2026-05-19 23:44:37 +09:00
.vscode Enable Prettier formatting for CSS 2025-10-29 20:38:23 +09:00
.zed Enable Prettier formatting for CSS 2025-10-29 20:38:23 +09:00
docs fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
src fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
test fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
.editorconfig Initial commit 2025-09-18 18:47:14 +09:00
.gitignore chore: add plan/ to .gitignore 2026-03-22 01:56:14 +09:00
.npmrc Initial commit 2025-09-18 18:47:14 +09:00
.prettierignore Add VitePress documentation site for Agent Client 2025-12-14 01:53:46 +09:00
.prettierrc Add prettier and editor settings 2025-10-29 20:26:01 +09:00
AGENTS.md docs: update AGENTS.md to reflect current architecture after refactoring 2026-04-03 17:37:52 +09:00
ARCHITECTURE.md docs: update ARCHITECTURE.md to reflect current architecture after refactoring 2026-04-03 17:41:36 +09:00
CLAUDE.md chore: migrate claude-agent-acp references from @zed-industries to @agentclientprotocol 2026-03-26 20:48:40 +09:00
CONTRIBUTING.md docs: update CONTRIBUTING.md architecture section and naming conventions 2026-04-03 17:43:45 +09:00
esbuild.config.mjs Replace builtin-modules with node:module builtinModules 2025-12-14 19:34:37 +09:00
eslint.config.mjs fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
GEMINI.md chore: migrate claude-agent-acp references from @zed-industries to @agentclientprotocol 2026-03-26 20:48:40 +09:00
LICENSE Add license 2025-09-24 22:35:19 +09:00
manifest.json Update version to 0.10.6 2026-05-30 23:50:39 +09:00
package-lock.json fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
package.json fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
README.ja.md fix: add target blank to Add to Obsidian badge link 2026-05-15 20:58:51 +09:00
README.md fix: add target blank to Add to Obsidian badge link 2026-05-15 20:58:51 +09:00
styles.css style: add CSS for the banner "Learn more" link 2026-05-30 22:25:38 +09:00
tsconfig.eslint.json fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00
tsconfig.json Move source files into src 2025-09-24 17:42:57 +09:00
version-bump.mjs Use double quotes and import process in version-bump.mjs 2025-12-14 19:35:46 +09:00
versions.json Initial commit 2025-09-18 18:47:14 +09:00
vitest.config.mts fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV 2026-06-05 13:16:28 +09:00

Agent Client Plugin for Obsidian

GitHub Downloads License GitHub release GitHub last commit GitHub Discussions

日本語はこちら

Add to Obsidian

Buy Me A Coffee

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 @notename syntax
  • 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

  1. Open Settings → Community Plugins → Browse
  2. Search for "Agent Client"
  3. Click Install, then Enable

Via BRAT (Pre-release Versions)

To try pre-release versions before they are published to Community Plugins:

  1. Install the BRAT plugin
  2. Go to Settings → BRAT → Add Beta Plugin
  3. Paste: https://github.com/RAIT-09/obsidian-agent-client
  4. Enable Agent Client from the plugin list

Manual Installation

  1. Download main.js, manifest.json, styles.css from Releases
  2. Place them in VaultFolder/.obsidian/plugins/agent-client/
  3. Enable the plugin in Settings → Community Plugins

Quick Start

Open a terminal (Terminal on macOS/Linux, PowerShell on Windows) and run the following commands.

  1. 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
    
  2. Login (skip if using API key):

    claude
    

    Follow the prompts to authenticate with your Anthropic account.

  3. Find the paths:

    which node   # macOS/Linux
    which claude-agent-acp
    
    where.exe node   # Windows
    where.exe claude-agent-acp
    
  4. 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 (not claude)
    • API key: Add your key, or leave empty if logged in via CLI
  5. Start chatting: Click the robot icon in the ribbon

Setup Guides

Full Documentation

Development

npm install
npm run dev

For production builds:

npm run build

License

Apache License 2.0 - see LICENSE for details.

Star History

Star History Chart