Lark CLI Skill: Wiki — Knowledge Base Management
Lark/Feishu CLI skill for knowledge base. Create and manage knowledge spaces, organize document nodes and shortcuts.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install a5eb9344-208c-4032-9cca-2a17f53fc271 --target codexStages files first; activation requires review of the staged README and plan.
What it is
This Lark CLI skill provides programmatic access to Lark/Feishu knowledge bases (Wiki). It lets you create and manage knowledge spaces, organize document nodes, add shortcuts, and query the knowledge base structure. All operations happen from the terminal or through automation scripts.
The skill targets developers and knowledge managers who want to automate wiki organization, bulk create documentation, or integrate knowledge base management into CI/CD pipelines.
How it saves time or tokens
Manual wiki management in Lark requires navigating the web UI for each operation. This CLI skill automates bulk operations: creating multiple knowledge spaces, reorganizing document trees, or adding batch shortcuts. For AI agents, the skill provides the APIs needed to publish generated documentation directly into the team wiki.
Automating wiki structure management saves hours of manual drag-and-drop organization.
How to use
- Configure the Lark CLI with your app credentials
- Use the wiki commands to create spaces, nodes, and shortcuts
- Organize documents with move and reorder operations
- Query the knowledge base structure for navigation and auditing
Example
# Create a new knowledge space
lark wiki create-space --name 'Engineering Docs' --description 'Technical documentation'
# Add a document node to the space
lark wiki create-node --space-id 'wiki_abc123' --title 'API Reference' --type 'doc'
# List all nodes in a space
lark wiki list-nodes --space-id 'wiki_abc123'
# Add a shortcut to an existing document
lark wiki create-shortcut --space-id 'wiki_abc123' --target-node 'node_xyz789'
# Move a node to a different parent
lark wiki move-node --node-id 'node_001' --parent-id 'node_002'
Related on TokRepo
- Documentation tools -- Knowledge management tools
- Automation tools -- Workflow automation
Common pitfalls
- Wiki API access requires 'wiki:wiki' scope permissions on your Lark app; missing permissions return 403 errors
- Document nodes and shortcuts are different types; moving a shortcut does not move the underlying document
- Rate limits apply to batch operations; add delays when creating or moving many nodes in sequence
Frequently Asked Questions
A knowledge space is a top-level container in Lark Wiki, similar to a workspace or project. It contains document nodes organized in a tree structure. Each space can have its own access permissions.
The CLI creates document nodes (containers). To add content, you create the node first, then use the Lark Docs API to write content into the document. The wiki skill handles the structural organization.
Yes. The skill supports both Feishu (Chinese version) and Lark (international version). The API endpoints differ but the CLI handles the routing based on your app configuration.
The wiki skill provides structure queries (list nodes, get node details). Content export requires the Lark Docs API. You can combine both to export complete knowledge bases with structure and content.
Space permissions are managed through the Lark admin console or the wiki API. The CLI skill can query but not modify permissions. Set permissions in the web UI before automating content creation.
Citations (3)
- Lark Developer Docs— Lark/Feishu Wiki API for knowledge base management
- Lark Open Platform— Lark Open Platform API
- Lark Developer Docs— Knowledge base organization and document management APIs
Related on TokRepo
Source & Thanks
Created by LarkSuite. Licensed under MIT. larksuite/cli — 4,100+ GitHub stars
Part of the Lark CLI Official Skills Collection on TokRepo.
Discussion
Related Assets
Lark CLI Skill: Skill Maker — Create Custom Skills
Lark/Feishu CLI skill for creating reusable custom skills. Wrap atomic APIs or orchestrate multi-step workflows.
Lark CLI Skill: Docs — Document Creation & Editing
Lark/Feishu CLI skill for cloud documents. Create from Markdown, read/update content, insert images, search documents.
Lark CLI Skill: Tasks — Todo & Project Management
Lark/Feishu CLI skill for task management. Create todos, track progress, manage subtasks, assign members, set reminders.
Lark CLI Skill: Shared — Auth, Config & Security
Lark/Feishu CLI shared foundation skill. App config, auth login, identity switching, scope management, and security rules.