Updated on 2026-08-03 GMT+08:00

Repository Indexing

CodeArts Agent provides a repository index function to help you quickly search and retrieve code-related information. This function supports creating both local user indexes and cloud-shared indexes, flexibly adapting to the requirements of different scenarios.

Constraints

Table 1 Constraints

Category

Description

Language

Java, JavaScript, TypeScript, and Go are supported.

Total number of code files

  • Basic edition: Up to 50,000 code files can be indexed.
  • Professional edition: Up to 100,000 code files can be indexed.

Differences Between Local User Indexes and Cloud Indexes

Table 2 Differences between local user indexes and cloud indexes

Dimension

Local User Index

Cloud Index

Used by

Current user

  • Enterprise: available to all enterprise members and created by the enterprise administrator, team administrator, enterprise members, or team members.
  • Team: available only to team members and created by the enterprise administrator, team administrator, or team members.
  • User: available only to members themselves.

Repository type

Unlimited

Git and GitHub repositories are supported.

Repository Indexing Commands

The following table lists the commands for managing the lifecycle of repository indexes.

Table 3 Repository indexing commands

Command

Description

codearts codebase --init

Creates repository indexes.

Run this command in the project directory to create repository indexes.

codearts codebase --detail

Queries the repository indexing progress.

codearts codebase --update

Incrementally updates repository indexes.

codearts codebase --delete

Deletes repository indexes.

Creating Repository Indexes

You can create local user indexes and cloud indexes.

Creating Local User Indexes

  1. Enter the TUI development environment.

    1. Open the root directory of the target project.
    2. Right-click in the blank area and select Open Windows Terminal here.
    3. Enter /codearts in the terminal and press Enter to enter the TUI development environment.

  2. Create codebase indexes. In the dialog box, enter /codebase/init and press Enter to start creating indexes.

    Figure 1 Entering the index creation command

  3. View the index creation progress. In the dialog box, enter /codebase/detail and press Enter to view the index creation progress.

    Figure 2 Viewing the index creation progress

  4. Incrementally update repository indexes. In the dialog box, enter /codebase/update and press Enter to index added or modified content.

    The system compares the current status with the result of the last incremental update, indexes the added or modified code files, and skips unchanged files to save time.

  5. Delete codebase indexes. In the dialog box, enter /codebase/delete and press Enter to delete all indexes.

Creating Cloud Indexes

  1. Log in to the CodeArts Agent console.
  2. In the navigation pane on the left, choose Agent Settings > Repository Index.
  3. Click Create Index.
  4. Set basic index information by referring to Table 4 and click Next.

    Table 4 Repository index parameters

    Parameter

    Description

    Visible To

    Visible scope of the repository index.

    • User: available only to members themselves.
    • Team: available only to team members and created by the enterprise administrator, team administrator, or team members.
    • Enterprise: available to all enterprise members and created by the enterprise administrator, team administrator, enterprise members, or team members.

    Teams

    This parameter is displayed only when Visible To is set to Team.

    Select a team from the drop-down list; only the teams which the current account belongs to are displayed.

    Code Source

    Source of the code repository that you want to index.

    • Git: a general Git repository.
    • GitHub: a GitHub repository, which can be a public repository or an authorized private repository.

    Authorization Method

    Method to authorize the system to access your code source.

    • Authorize by Service: Select a service endpoint from the drop-down list. The endpoint corresponds to the connection information of the GitHub or Git repository.

      If no service endpoint has been created, click Add to create one by referring to Table 5.

    • Authorize by Personal Token: Authorize access requests using an access token generated from your personal account.

    Default Branch

    This parameter is displayed only when Code Source is set to Git.

    Enter the branch name of a Git repository. The branch name can contain a maximum of 200 characters.

    Figure 3 Creating a service endpoint
    Table 5 Service endpoint parameters

    Parameter

    Description

    Connection Name

    Name of the custom repository to be connected.

    Naming rules: The name can contain letters, digits, underscores (_), and hyphens (-), but cannot start with an underscore.

    Git URL

    This parameter is displayed only when Code Source is set to Git.

    HTTPS access address of the Git repository

    User Name

    This parameter is displayed only when Code Source is set to Git.

    User name for HTTPS authentication of the Git repository.

    Password or Access Token

    This parameter is displayed only when Code Source is set to Git.

    Password or access token for HTTPS authentication of the Git repository.

    Access Token

    This parameter is displayed only when Code Source is set to Github.

    Access token for HTTPS authentication of the GitHub repository.

  5. Select the repository and language, and click OK to finish creating the index.

    On the repository index page, view the newly created repository index. When its status changes from parsing to parsing completed, the repository index has been successfully parsed.

  6. View the index creation progress.

    1. In the root directory of the Git/Github repository project, right-click in the blank area and select Open Windows Terminal here.
    2. Enter /codearts and press Enter to enter the TUI development environment. The system automatically downloads team repository indexes from the cloud.
    3. In the TUI dialog box, enter /codebase/detail and press Enter to view the index creation progress.