The community bot still flagged two sentence-case violations after 0.1.38. Both sit in the manifest.json description: the plural acronym "CLIs" and the multi-word product name "Claude Code" — neither is in the linter's known-acronym / proper-noun lists, so they get flagged mid-sentence. Reworded the description to "Run AI coding tools like Claude or Codex from a right sidebar terminal panel." in both manifest.json (the field the bot actually scans) and package.json (kept in sync for npm metadata). Also switched the local ESLint config from `recommended` to `recommendedWithLocalesEn` so future runs match the bot's severity, and added explicit ignores for non-source JSON / lockfiles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| .prompt-hub | ||
| img | ||
| tests | ||
| .gitignore | ||
| agents.md | ||
| CLAUDE.md | ||
| esbuild.config.mjs | ||
| eslint.config.mjs | ||
| LICENSE | ||
| main.js | ||
| main.ts | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| pty-bridge.py | ||
| pty-proxy.js | ||
| README.md | ||
| runtime-utils.ts | ||
| styles.css | ||
| tsconfig.json | ||
| versions.json | ||
| vitest.config.ts | ||
Obsidian Any AI Code
Obsidian desktop plugin that opens your local Claude Code CLI in a right sidebar panel.
Goal
Use Claude Code directly inside your active Obsidian vault without leaving Obsidian.
Features
- Dedicated CLI view in the right sidebar
- Embedded terminal (xterm)
- Quick actions:
Start,Stop,Restart,Clear,@Active file,@Active folder - Customizable runtime list — configure as many CLI runtimes as you want (Claude and Codex are pre-populated; add any others from settings) and switch between them via a dropdown in the sidebar
- Launches the selected runtime in the current active vault folder
- Visible UI status (
Status: ...) - Explicit runtime error messages in the panel
- Runtime fallbacks for macOS / Linux / Windows
Requirements
- Obsidian Desktop (
isDesktopOnlyplugin) - Node.js installed on the machine
- Claude Code CLI installed (
claudeavailable) - For advanced macOS/Linux fallback:
python3recommended
Install in a Vault
Recommended — from a GitHub release
-
Open the latest release.
-
Download
any-ai-cli-<version>.zip. -
Unzip it directly inside your vault's plugin folder so the resulting path is:
/PATH/TO/VAULT/.obsidian/plugins/any-ai-cli/ -
In Obsidian, enable the plugin:
Settings → Community plugins → Installed plugins → Any AI Code.
That's it. No commands required — the plugin uses an embedded Python PTY bridge fallback so it works out of the box on macOS / Linux (and falls back to direct pipe mode on Windows).
Optional — install the native PTY backend for best terminal fidelity
The bundle ships without node-pty (a native module that has to be compiled for your specific Node ABI). The plugin works without it, but installing it gives you a fully native PTY (better full-screen TUI rendering and resize behavior). To enable it:
cd "/PATH/TO/VAULT/.obsidian/plugins/any-ai-cli"
npm install --omit=dev
Reload the plugin afterwards.
Manual install / dev clone
- Clone or copy the repository into
/PATH/TO/VAULT/.obsidian/plugins/any-ai-cli/. - Run
npm installandnpm run buildinside the folder to producemain.js. - Enable the plugin in
Settings → Community plugins.
Required files
If you assemble the plugin folder by hand, make sure these are present:
manifest.jsonmain.jsstyles.cssversions.jsonpty-proxy.jspty-bridge.pypackage.jsonandpackage-lock.json(only needed if you plan to installnode-pty)
Usage
- Click the terminal ribbon icon, or run command:
Open Claude Code panel
- The panel opens on the right.
- Click
Startto launch Claude.
Plugin Settings
Default runtime: which configured runtime is selected when the panel opens (and used by auto-start).Auto-start: starts the default runtime automatically when the panel opens.Auto-restart on runtime switch: when you change the runtime from the sidebar dropdown while a process is running, restart it immediately to apply the new selection.Runtimes: a customizable list of CLIs that show up in the sidebar dropdown. Each entry has:Name: label shown in the dropdown.Command: the launch command (e.g.claude,codex --no-alt-screen ..., or any other CLI).- You can add as many runtimes as you want with
Add runtime, and remove unused ones (the list must keep at least one entry). Claude and Codex are pre-populated on first install.
Node executable:auto(recommended): automatic detection- or explicit path (
/opt/homebrew/bin/node,C:\Program Files\nodejs\node.exe, etc.)
Switching runtime from the sidebar
The sidebar toolbar exposes a runtime dropdown listing every entry from settings. Pick another runtime to switch the panel target — if a process is already running and Auto-restart on runtime switch is enabled, the running process is stopped and the newly selected one launches automatically.
Runtime Architecture (Fallback Chain)
The plugin tries multiple strategies to maximize startup success:
- PTY via
node-pty - Python PTY bridge fallback (
pty-bridge.py) on macOS/Linux - Direct pipe fallback (
child_process) scriptfallback (last resort on Unix)
Status and logs clearly show the active strategy (proxy-warn, proxy-info, etc.).
Troubleshooting
command not found: claude
Claude binary is not in Obsidian process PATH.
- Set
Commandto an absolute path, for example:/Users/<you>/.local/bin/claude
- Or adjust your shell/Obsidian environment.
Cannot find module 'node-pty'
Since 0.1.25, this no longer crashes the plugin — node-pty is optional and the proxy automatically falls back to the Python bridge (or direct pipe). If you want the native PTY backend anyway:
cd "/PATH/TO/VAULT/.obsidian/plugins/any-ai-cli"
npm install --omit=dev
posix_spawnp failed
Native PTY failed in the current runtime environment.
- Plugin should automatically fallback to Python/pipe mode.
- Ensure
python3is installed for Python PTY fallback.
Empty panel
- Ensure
main.jsandstyles.cssare up to date - Reload plugin (disable/enable)
- Open Obsidian developer console if needed
Local Development
npm install
npm run lint
npm run test
npm run build
npm run dev: esbuild watch modenpm run build: compilemain.ts->main.jsnpm run lint: run eslint-plugin-obsidianmd so violations of the Obsidian community-store guidelines are caught locally before submission
Test Stack
- Framework: Vitest
- Tests:
tests/**/*.test.ts - Commands:
npm run testnpm run test:watch
CI
GitHub Actions workflow: .github/workflows/ci.yml
Triggers:
pushpull_request
Steps:
npm cinpm run lintnpm run testnpm run build
Release
GitHub Actions workflow: .github/workflows/release.yml
Triggered by pushing a git tag (e.g. 0.1.25):
git tag 0.1.25
git push origin 0.1.25
The workflow:
- Checks out the repo and runs
npm ci+npm run build. - Stages every runtime-required file (
manifest.json,main.js,styles.css,versions.json,pty-proxy.js,pty-bridge.py,package.json,package-lock.json) into anany-ai-cli/folder. - Zips it as
any-ai-cli-<tag>.zipfor one-click install. - Publishes a GitHub Release attaching the zip plus standalone
main.js/manifest.json/styles.css(for Obsidian's plugin update protocol and BRAT). - Auto-generates release notes from the commit history.
Before tagging, keep these versions in sync: manifest.json, versions.json, package.json.
Main Files
main.ts: Obsidian plugin logicmain.js: built distribution filestyles.css: terminal panel stylingmanifest.json: Obsidian plugin metadatapty-proxy.js: runtime proxy (Node)pty-bridge.py: Python PTY fallbackruntime-utils.ts: testable shared utilitiestests/runtime-utils.test.ts: unit tests
Platform Notes
- macOS/Linux: full support with Python PTY fallback
- Windows: support via
node-ptyor pipe fallback - Obsidian Mobile: not supported (
isDesktopOnly)
License
MIT
