UI Customization
About 460 wordsAbout 2 min
UI Customization collects the page elements .cnb/settings.yml can customize.
When to use: when a repository page should reflect your project's style — for example configuring workspace launch, Issue, Fork, and copy-repo buttons in one place, along with NPC, reaction images, and auto-tag. Add .cnb/settings.yml to the repository root to take effect; all parameters are optional.
The complete example below covers every category. Each one can be configured as needed, with unconfigured items falling back to defaults.
Workspace, Issue, Fork, Copy Repo buttons:
# Cloud-native development configuration (reads from the branch where the launch button is located)
workspace:
launch:
button:
name: Launch Cloud-Native Development
description: Click this button to launch the cloud-native development environment
hoverImage: .cnb/launch-hover.gif
cpus: 4
disabled: false
autoOpenWebIDE: false
# Issue configuration (reads from the default branch)
issue:
button:
description: ~bug~ Here you go!
hoverImage: https://cnb.cool/my/test/-/git/raw/main/issue-hover.png
# Fork configuration (reads from the default branch)
fork:
button:
description: Nice repo you've got. Now it's mine.
hoverImage: ".cnb/fork-hover.png"
# Copy Repo button configuration (reads from the default branch)
copyRepo:
button:
description: Your repo is great, now it's mine
hoverImage: ".cnb/copy-hover.png"Reaction image, Tag auto-generation:
# Reaction custom image
reaction:
bug:
image: .cnb/bug.gif
# Tag configuration (reads from the default branch)
tag:
auto_tag:
branch: hotfixNPC Configuration:
npc:
imports:
list:
- cnb/docs
roles:
- name: Code Assistant
slogan: code is cheap, show me your prompt
prompt: You are now Code Assistant, focused on helping write and optimize code
enableThinking: false
avatar:
src: ".cnb/knowledge-base-hover.png"
- name: Reviewer
prompt: |
You are a code reviewer, focused on code quality review and improvement suggestions.
defaultRepo: "cnb/docs"
defaultRole: "Reviewer"
button:
name: "Quick Ask AI"
description: "Click, start AI!"
hoverImage: ".cnb/knowledge-base-hover.png"Tips
If the file fails to parse or exceeds the size limit, the configuration will not take effect.
Customization Categories
Detailed configuration for each category:
| Category | Description | Config Branch |
|---|---|---|
| Cloud-Native Development Button | Button name, description, hover image, CPU cores, etc. | Current branch |
| Issue Button | Create Issue button description and hover image | Default branch |
| Fork Button | Fork button description and hover image | Default branch |
| Copy Repo Button | Copy Repo button description and hover image | Default branch |
| Reaction Custom Image | Replace the default image in the reaction feature | Default branch |
| Tag Auto-Generation | Branch that triggers automatic tag creation | Default branch |
| NPC Configuration | AI roles, knowledge base, prompts, etc. | Default branch |