CLI tool for uploading Obsidian Markdown documents to Feishu cloud documents
Project description
obshare-cli
A command-line interface tool for uploading Obsidian Markdown documents to Feishu cloud documents.
Installation
pip install obshare-cli
Optional: Mermaid Support
For Mermaid diagram rendering, install Puppeteer:
npm install -g puppeteer
Configuration
First, configure your Feishu credentials:
# Set App ID
obshare-cli config set-app-id "cli_xxx"
# Set App Secret
obshare-cli config set-app-secret "xxx"
# Set User ID
obshare-cli config set-user-id "xxx"
# Set Folder Token
obshare-cli config set-folder "fldcnxxx"
# Show current configuration
obshare-cli config show
# Test connection
obshare-cli config test
Usage
Upload a Document
# Basic upload
obshare-cli upload document.md
# Upload with JSON output (for AI agents)
obshare-cli upload document.md --json
# Upload with permissions
obshare-cli upload document.md --public --allow-copy --allow-download
View Upload History
obshare-cli list history
obshare-cli list history --json
Set Document Permissions
obshare-cli permission set <token> --public --allow-copy --allow-download
Delete a Document
obshare-cli delete <token>
JSON Output Example
{
"success": true,
"document": {
"title": "My Note",
"token": "doxcnAbcDefGhi",
"url": "https://feishu.cn/docx/doxcnAbcDefGhi"
},
"permissions": {
"isPublic": false,
"allowCopy": false,
"allowCreateCopy": false
},
"uploadTime": "2024-01-15T10:30:00Z"
}
Features
- Upload Markdown documents to Feishu
- Support for YAML frontmatter
- Support for Obsidian Callouts
- Support for Mermaid diagrams (converted to images)
- Support for embedded images (Obsidian
![[image.png]]and Markdown) - Configurable document permissions
- Upload history tracking
- JSON output mode for AI/CLI integration
Requirements
- Python 3.8+
- Node.js >= 16 (optional, for Mermaid rendering)
Development
# Clone the repository
git clone https://github.com/SuShuHeng/obshare-cli.git
cd obshare-cli
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Build package
python -m build
License
MIT License - see LICENSE for details.
Author
SuShuHeng (code.sushuheng@gmail.com)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
obshare_cli-0.1.0.tar.gz
(22.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters