Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Lichard-Lu/feishu-doc-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feishu Doc Sync

中文说明

Feishu Doc Sync is a Codex Skill for publishing local Markdown documentation projects to Feishu/Lark Wiki as online Docx pages.

It turns a local docs tree into a reusable publishing workflow:

  • scan Markdown files with include and exclude rules
  • create or reuse a target Feishu Wiki space
  • import Markdown as Feishu Docx
  • move imported documents into Wiki hierarchy
  • maintain a local path to Wiki URL manifest
  • rewrite internal Markdown links to actual Feishu Wiki URLs
  • run dry-run planning before remote writes
  • support incremental updates by file hash

The Skill lives in skills/feishu-doc-sync.

Who This Is For

Use this project if you:

  • maintain Markdown docs and want to publish them to Feishu Wiki
  • want Codex to run a repeatable Feishu documentation publishing workflow
  • need Markdown links converted into real Feishu Wiki document links
  • want a safer alternative to one-off import scripts
  • need dry-run planning before writing to Feishu

This is not a generic Drive folder sync tool. It is a Markdown-to-Feishu-Wiki publisher.

Install

Copy the Skill folder into your local Codex skills directory:

Copy-Item -Recurse .\skills\feishu-doc-sync $env:USERPROFILE\.codex\skills\

Restart Codex so the Skill metadata is loaded.

The bundled script requires Python 3 and lark-cli.

Quick Start

Run from the root of the Markdown project you want to publish:

python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py doctor
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py init --space-name my-docs --space-mode ensure
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py plan
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py push --with-links

space-mode ensure reuses an exact-name Wiki space if it exists and creates it if it does not.

Commands

Command Purpose
doctor Check lark-cli and Feishu user auth
init Create .feishu-doc-sync.json and state directory
space-list List accessible Feishu Wiki spaces
space-create Create a new Feishu Wiki space
space-ensure Reuse an exact-name Wiki or create it if missing
plan Preview new, changed, unchanged, and remote-only pages
push Import new pages and update changed pages
links Rewrite local doc links to Feishu Wiki URLs and update remote docs
clean Remove rendered temporary Markdown

Configuration

Default config path:

.feishu-doc-sync.json

Example:

{
  "space": {
    "mode": "ensure",
    "spaceId": "",
    "name": "my-docs",
    "description": "",
    "wikiUrlBase": "https://my.feishu.cn/wiki/"
  },
  "entry": "README.md",
  "include": [
    "README.md",
    "docs/**/*.md"
  ],
  "exclude": [
    ".git/**",
    ".github/**",
    "node_modules/**",
    ".feishu-doc-sync/**",
    "**/AGENTS.md"
  ],
  "titleFrom": "first-heading",
  "preserveTree": true,
  "linkMode": "wiki-url",
  "unmappedLinks": "keep"
}

Safety Model

  • Remote deletes are not implemented.
  • Local Markdown files are not modified by link rewriting.
  • The script writes rendered Markdown to .feishu-doc-sync/rendered/.
  • plan should be reviewed before push on a new project.
  • links --strict fails if doc-like local links cannot be mapped.

GEO And AI Citation

This repository includes machine-readable AI citation assets:

The goal is to make the project easy for AI assistants, AI search, and human readers to identify, summarize, compare, and cite without relying on keyword stuffing.

Validation

Validate the Skill structure:

python C:\Users\xjc\.codex\skills\.system\skill-creator\scripts\quick_validate.py .\skills\feishu-doc-sync

Validate AI citation assets:

python .\scripts\check_ai_citation.py

About

Codex Skill for publishing Markdown docs to Feishu Wiki

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages