---
url: /en/repo/settings.md
---
You can customize certain UI elements of the page by adding a `.cnb/settings.yml` configuration file
to the root directory of your repository, unlocking more interesting possibilities.

## Configuration File Description

You need to add and commit the `.cnb/settings.yml` configuration file to the root directory of your repository. Below is an example of the configuration file:

```yaml title=".cnb/settings.yml"
# All parameters below are optional

# Cloud-native development configuration, reads the .cnb/settings.yml configuration from the current branch where the cloud-native launch button is located
workspace:
  launch:
    # Customize the cloud-native development launch button
    button:
      # Button name
      name: Launch Cloud-Native Development
      # Button description
      # If the value is null, the default description is not displayed
      description: Click this button to launch the cloud-native development environment
      # Image displayed when hovering over the button
      # 1.Use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/launch-hover.gif;
      # 2.Use the raw file address under the current domain name, for example: https://cnb.cool/my/test/-/git/raw/main/launch-hover.gif
      # Image maximum 10MB
      hoverImage: .cnb/launch-hover.gif
    # CPU core number, default is: 8. Only valid for the default template. If there is a custom cloud-native development launch pipeline, this configuration is invalid
    cpus: 4
    # Whether to disable the default button. The default is: false means not disabled. true means disabled
    disabled: false
    # Whether to automatically open the WebIDE after the environment is created. The default is: false
    # When openssh is not installed in the development environment (only supports WebIDE): regardless of the value of this parameter,
    # the WebIDE will be automatically opened after the environment is created
    autoOpenWebIDE: false

# Issue configuration, reads the .cnb/settings.yml configuration from the repository's default branch
issue:
  # Customize the create issue button
  button:
    # Button description
    description: ~bug~ Here you go!
    # Image displayed when hovering over the button
    # 1.Use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/issue-hover.png;
    # 2.Use the raw file address under the current domain name, for example: https://cnb.cool/my/test/-/git/raw/main/issue-hover.png
    # Image maximum 10MB
    hoverImage: https://cnb.cool/my/test/-/git/raw/main/issue-hover.png

# Fork configuration, reads the .cnb/settings.yml configuration from the repository's default branch
fork:
  # Customize the fork button
  button:
    # Button description
    description: Nice repo you've got. Now it's mine.
    # Image displayed when hovering over the button
    # 1.Use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/fork-hover.png;
    # 2.Use the raw file address under the current domain name, for example: https://cnb.cool/my/test/-/git/raw/main/.cnb/fork-hover.png
    # Image maximum 10MB
    hoverImage: ".cnb/fork-hover.png"

# Copy Repo Button Configuration, read from the .cnb/settings.yml file in the repository's default branch
# The "Copy Repo" button is not displayed by default on the repository homepage.
# Conditions for displaying the "Copy Repo" button: Add an example tag to the repository's homepage description (recommended for repositories that can serve as templates or examples)
copyRepo:
  # Customize the "Copy Repo" button
  button:
    # Button description
    description: Your repo is great, now it's mine
    # Image displayed when hovering over the button
    # 1.Use images from the current branch in the repository, specify the path relative to the repository root directory, e.g., .cnb/copy-hover.png;
    # 2.Use the raw file address under the current domain name, for example: https://cnb.cool/my/test/-/git/raw/main/copy-hover.png
    # Maximum image size: 10MB
    hoverImage: ".cnb/copy-hover.png"

# Reaction Custom Image
reaction:
  # Define the replacement image for the "bug" position of the reaction function
  # Only use images from the current branch of the repository,
  # provide a relative path from the repository root, e.g., .cnb/bug.gif
  bug:
    image: .cnb/bug.gif

# Tag configuration, reads the .cnb/settings.yml configuration from the repository's default branch
tag:
  # Auto tag generation configuration
  auto_tag:
    # Specify the branch name for triggering auto tag. If not configured, the repository's default branch is used
    branch: hotfix

# NPC Configuration
npc:
  # Import AI configurations from other repositories
  imports:
    # List of referenced repositories
    list:
      - cnb/docs
  # NPC role list for the current repository
  roles:
    - name: Xiao Li
      # slogan
      slogan: code is cheap, show me your prompt
      # Role description prompt
      prompt: You are now Xiao Li, a front-end development engineer
      # Whether to enable thinking mode, boolean type, default is true
      enableThinking: false
      # Role avatar information
      avatar:
        # Avatar image address
        # Only images from the repository's default branch can be used, fill in the path relative to the repository root directory, such as .cnb/knowledge-base-hover.png
        src: ".cnb/knowledge-base-hover.png"
    - name: Xiao Wang
      prompt: |
        You are a junior engineer,
        Being cute is your main business,
  # Default selected repository for knowledge base document popup
  defaultRepo: "cnb/docs"
  # Default role
  defaultRole: "Junior Engineer"
  # Web interface style for knowledge base button
  button:
    # Button name
    name: "Quick Ask AI"
    # Button description
    description: "Click, start AI!"
    # Only use images from the default branch of the repository, specify the path relative to the repository root directory, e.g., .cnb/knowledge-base-hover.png
    hoverImage: ".cnb/knowledge-base-hover.png"
```

:::tip
Note: If the file fails to parse or exceeds the limit, the configuration will not be used.
:::

## Copy Repo Button

The repository homepage does not display the `Copy Repo` button by default.
It is recommended for repositories that can serve as templates or examples to add this button.

How to add this button: Edit the repository description on the right side of the homepage and add the `example` tag to display the button.

What It Does: Clicking this button provides a quick way to copy the repository.
