Skip to main content

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.

PyPI version Python License: MIT

中文翻译点此

Installation

pip-install-obshare-cli

pip install obshare-cli

Optional: Mermaid Support

For Mermaid diagram rendering, install Puppeteer:

npm install -g puppeteer

Configuration

First, configure your Feishu credentials:

You can get these token by the guidance:

feishu_config_guidance

# 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 "xxxxxxx"

# 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 ![](image.png))
  • Configurable document permissions
  • Upload history tracking
  • JSON output mode for AI/CLI integration

Claude Code Plugin

This project includes a Claude Code Plugin for AI-assisted usage. The plugin provides skills for environment setup, configuration, uploading notes, managing permissions, and viewing upload history.

Install Plugin

# Step 1: Add marketplace
/plugin marketplace add SuShuHeng/obshare-cli

# Step 2: Install plugin
/plugin install obshare-cli

Available Skills

Skill Invocation Description
Main /obshare-cli:obshare-cli Environment setup & CLI overview
Config /obshare-cli:config Manage Feishu configuration
Upload /obshare-cli:upload Upload documents to Feishu
Permission /obshare-cli:permission Manage document permissions
List /obshare-cli:list Query upload history
Delete /obshare-cli:delete Delete Feishu documents

Usage with Claude Code

# In Claude Code, invoke skills with plugin namespace
/obshare-cli:obshare-cli     # Get environment setup guide
/obshare-cli:config          # Configure Feishu credentials
/obshare-cli:upload note.md  # Upload a document
/obshare-cli:list            # View upload history

Local Development

To test the plugin locally:

claude --plugin-dir /path/to/obshare-cli

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)

Thanks

  • Obsidian - The best AI-powered note-taking software

  • Lark Open Platform - Provides technical platform support

  • ObShare - A significant source for this project, thank you.

Links

Project details


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.4.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obshare_cli-0.1.4-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file obshare_cli-0.1.4.tar.gz.

File metadata

  • Download URL: obshare_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for obshare_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 17d55fe3e85f107f43780f8d9b5ad3015d2814222e35f964a00d5cdc88d6d7f4
MD5 c32438f87abddd579b8dce628fe22a10
BLAKE2b-256 d254f37f9f041883a6065f6f2b95194eee7ca0e3900098c680062df9634faa21

See more details on using hashes here.

File details

Details for the file obshare_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: obshare_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for obshare_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 033ccceda233472ef3903d88a612f8c0f4962a17a9b8e54c571d842267641b6e
MD5 b20df37349b4de1b4e58f1dafb690237
BLAKE2b-256 2d0427d328a7913615fb841a5f5a232d9b06e08cf363eee88d9c6d4ac417ab33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page