Updated on 2026-09-15 GMT+08:00

Repository Indexing

In CodeArts Agent CLI, you can build an index for your project to improve the speed and accuracy of AI-powered code search, making the results more aligned with your needs.

Indexing Modes

Two indexing modes are provided. Choose the one that best suits your workflow.

  • Local indexing: In this mode, the system builds a graph index locally by parsing local project code files, and precisely retrieving calls, dependencies, and inheritance between functions, classes, and files.
  • Cloud indexing: In this mode, the system builds a vector index, enabling intelligent, feature-level retrieval and precise matching based on code semantics. If you are using the free/basic/professional edition, ensure that your account has been assigned a seat. If not, cloud indexing will fail.
Table 1 Comparison of local and cloud indexing modes

Dimension

Local Index

Cloud Index

Storage location

Index files are stored locally (under .codegraph in the current project's root directory).

For the initial build, the complete index package is uploaded and stored in the cloud. Incremental indexes generated due to code changes are stored locally (under .codeartsdoer/.codebase in the current project's root directory).

Search capabilities

Search by keyword, symbol, and file name is supported.

Semantic understanding and repository-wide code logic analysis are supported.

Build rules

Triggered by command

Update rules

Triggered by command

Constraints

Table 2 Constraints

Category

Description

Language

Java, JavaScript, TypeScript, Go, ArkTS, C, C++, Python, Vue, and Lua.

Total number of indexed code files

  • Free edition: ≤ 5,000
  • Basic edition: ≤ 50,000
  • Professional edition: ≤ 100,000

Function

  • The creation of team and enterprise repository indexes in the cloud is supported only in the basic and professional editions.
  • Local indexes can be created only on Windows and Linux.

Repository Indexing Commands

Table 3 Repository indexing commands

Command (TUI)

Command (CLI)

Function

/codebase/init

codearts codebase --init

Creates a cloud index.

/codebase/detail

codearts codebase --detail

Views the cloud index build progress.

/codebase/update

codearts codebase --update

Incrementally updates a cloud index.

/codebase/delete

codearts codebase --delete

Deletes a cloud index.

/codebase-local/status

codearts codebase-local --status

Views the local index status.

/codebase-local/index

codearts codebase-local --index

Starts local indexing.

/codebase-local/sync

codearts codebase-local --sync

Incrementally updates a local index.

/codebase-local/disable

codearts codebase-local --disable

Disables local indexing.

/codebase-local/enable

codearts codebase-local --enable

Enables local indexing.

NOTE:

If you disable local indexing in the TUI and later re-enable it, restart CodeArts Agent CLI.

Building a Repository Index

The following steps show how to build a repository index using the TUI.

  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. In the terminal, enter codearts and press Enter to enter the TUI environment.

  2. (Optional) Specify the ignore files to be excluded from indexing.

    Go to the .codeartsdoer folder in the project, open the .codebaseignore file, and specify the files to ignore. Ignored files will be completely excluded from indexing to protect your sensitive data.

  3. Build a local index.

    1. In the chat box, type / and select /codebase-local/index to start building the local index.
    2. Enter the /codebase-local/status command. If output similar to the following is displayed, the local index has been built.
      Figure 1 Local index built

  4. Build a cloud index.

    1. In the chat box, type / and select /codebase/init to start building the cloud index.
    2. Enter the /codebase/detail command. If output similar to the following is displayed, the cloud index has been built.
      Figure 2 Cloud index built

  5. Enter what you want to search for to view the code search results.

    Find all calls to is_input_required in the repository, including cross-file call relationships.