Code Wiki
About 304 wordsAbout 1 min
By configuring the CodeWiki pipeline, you can automatically generate Wiki documentation from your repository's code. A Wiki portal will appear on the repository homepage, enabling quick documentation center setup.

Usage
Step 1: Configure the Pipeline
Plugin image: cnbcool/codewiki
Configure the CodeWiki plugin in the repository's .cnb.yml. It is recommended to use the tag_push event to avoid frequent Wiki generation. For more event types, see Build Trigger Rules.
$:
tag_push:
- docker:
image: cnbcool/codewiki:latest
stages:
- name: generate codewiki
timeout: 10h
settings:
git_doc_dir: /data/codewiki/${CNB_REPO_SLUG}Key parameters:
| Parameter Name | Description | Default Value | Required |
|---|---|---|---|
git_doc_dir | Directory for generating Wiki documentation | None | Yes |
use_codebuddy | Whether to use the CodeBuddy endpoint; 1 for CodeBuddy, 0 for CNB AI | 1 | No |
llm_model_name | Name of the LLM model to use | deepseek-v3.1 | No |
knowledge_enabled | Whether to enable knowledge base ingestion | false | No |
knowledge_embedding_model | Knowledge base embedding model name | hunyuan | No |
knowledge_chunk_size | Text chunk size (token count) | 1500 | No |
knowledge_chunk_overlap | Overlapping token count between adjacent chunks | 0 | No |
When
knowledge_enabledis set totrue, generated Wiki docs are automatically ingested into the repository knowledge base.
For more information, see the cnbcool/codewiki plugin documentation.
Step 2: Access CodeWiki
Click the Wiki portal on the repository homepage to access the CodeWiki page.
Automatic Knowledge Base Integration
Content generated by CodeWiki is automatically synced to the repository's knowledge base. Once synced, the repository will be marked as a knowledge base, enabling AI-based Q&A on CodeWiki content.
For more details on knowledge base configuration and usage, see Knowledge Base.