This is the Obsidian desktop companion plugin for obshare-cli.
In V0.2.0, the plugin becomes the primary direct-share UI for obshare-cli: share the current note to Feishu from inside Obsidian, while the CLI remains the execution backend. Mermaid rendering inside a real Obsidian environment is still part of the plugin's runtime responsibilities.
Repository: https://github.com/SuShuheng/obshare-cli
Default plugin language: zh_cn
Supported plugin languages:
zh_cnen_us
The plugin shell is organized into four tabs:
Environment ConfigurationUpload ConfigurationDocument ManagementAbout
The plugin now exposes three direct-share entry points for Markdown notes:
- command palette:
Share Current Note To Feishu - file context menu:
Share To Feishu - ribbon button:
Share To Feishu
The direct-share flow is:
- validate the target note
- block if the current note has unsaved changes
- confirm share permissions
- run
obshare-cli --json upload ... - show staged progress
- show either the success URL or a failure summary
- allow failure log export to a user-selected folder
The first implemented functional tab is Environment Configuration, which detects:
- current platform
- Python
- pip
- Obsidian CLI
obshare-cli
It also persists:
- selected install mode
- bound Python executable
- bound CLI executable
- bound isolated environment path
- bridge directory and render timeout
Environment Configuration
- probes
conda,conda env: obsd, Python, pip, Obsidian CLI, andobshare-cli - prefers
conda (obsd)as the recommended runtime - supports two conda execution modes:
conda run -n obsdobsdPython absolute path with-m obshare_cli
- still supports compatibility paths for:
venv (obsd)system Python
- supports copy and optional direct execution of the generated install command
- shows Miniconda guidance when
condais missing
Upload Configuration
- loads real shared config values through
obshare-cli --json config export-runtime - saves updates through CLI config subcommands
- imports and exports the shared config file
- tests connectivity through
obshare-cli --json config test
Document Management
- reads
~/.obshare/history.json - opens recorded document URLs
- dispatches delete and permission updates through CLI JSON commands
Direct Share
- resolves the selected Markdown note to a filesystem path
- calls
obshare-cli --json upload ... - applies share permissions selected in the confirmation dialog
- shows a staged progress dialog during upload
- shows a success dialog with the Feishu URL
- shows a failure dialog with
.logexport
About
- shows plugin version
- shows detected CLI version
- links to the repository
- lets the user switch between
zh_cnanden_us - refreshes the plugin shell after language switching
- provides plugin update guidance
- generates and can execute the CLI upgrade command for the bound runtime
obshare-cli:process-render-request
This command is the one obshare-cli should trigger through the official Obsidian CLI for Mermaid bridge rendering:
obsidian command id=obshare-cli:process-render-request- Copy this folder into your vault plugin directory:
.obsidian/plugins/obshare-cli/ - Enable the plugin in Obsidian.
- Open the plugin settings and set the shared bridge directory.
- In
obshare-cli, configure the matching values:
obshare-cli config set-obsidian-cli obsidian
obshare-cli config set-obsidian-bridge-dir /path/to/shared/bridge
obshare-cli config set-obsidian-command-id obshare-cli:process-render-requestobshare-cli writes a *.request.json file into the bridge directory. The plugin reads the oldest request, renders Mermaid, then writes:
outputPngPathresultPath
The result JSON contains:
{
"status": "success",
"pngPath": "/path/to/rendered.png",
"width": 800,
"height": 600
}On failure it writes:
{
"status": "error",
"error": "..."
}