📝 docs(obsidian-cli): Add troubleshooting guide for CLI connection issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-05-27 18:13:32 +08:00
parent 687ab5ee28
commit ba2c096323

View File

@@ -191,6 +191,19 @@ obsidian restart # Restart app
--- ---
## Troubleshooting: CLI Connection Issues
When `obsidian` commands return empty output (with exit code 0) or are unresponsive, the CLI bridge connection is likely broken. Follow this procedure:
1. **Detect the issue**: If a command produces empty output with exit code 0, the bridge connection is broken
2. **Ask the user**: Use AskUserQuestion to ask the user whether they allow running `obsidian reload` to reload the Obsidian window and restore the connection
3. **If the user agrees**: Run `obsidian reload`, wait about 3 seconds, then retry the original command
4. **If the user declines**: Fall back to reading/writing vault files directly via the filesystem (locate the vault path from `%APPDATA%/obsidian/obsidian.json`, then use Read/Edit/Write tools to operate on .md files directly)
> **Note**: `obsidian reload` reloads the Obsidian window. It does not affect unsaved data, but will briefly interrupt the current editing state.
---
## Tips ## Tips
- **Clipboard:** Add `--copy` to any command to copy output. - **Clipboard:** Add `--copy` to any command to copy output.