Permissions
You can configure the permission file to control the execution permissions of CodeArts Agent CLI. Supported permission actions include automatic execution, approval required, and execution denied.
Configuration Path
Configuration path of the permission file: ~/.codeartsdoer/cli-data/storage/permission/global.json
Configuration Format
Permission configuration format:
[
{
"permission": "Permission name",
"pattern": "*",
"action": "Permission policy"
}
] For details about permission names, see Table 1. For details about permission policies, see Table 2.
Permission Policy Configuration Parameters
| Permission | Description |
|---|---|
| edit | Modify all files. This permission is triggered when the AI creates files, edits existing ones, or performs bulk code changes. |
| write | Write data to files. |
| deleteFile | Delete files. |
| bash | Run shell commands and match the fully parsed commands. For example, this permission is triggered when the AI executes commands such as git status, npm install, and python manage.py runserver. Bash command permissions must be used together with bash_mode, indicating the whitelisted commands in sandbox mode. bash_mode also needs to be configured in the ~\.codeartsdoer\cli-data\storage\permission\config.json file. For details about the configuration modes supported by bash_mode, see Table 3. |
| webfetch | Obtain URLs. This permission is triggered when the AI accesses external APIs, downloads files, or obtains web page content. |
| external_directory_read | Read paths outside the project directory. This permission is triggered when the AI reads files such as /etc/hosts and ~/.ssh/id_rsa that are not in the project working directory, . |
| external_directory_write | Modify paths outside the project directory. This permission is triggered when the AI writes data to or modifies system or user configuration files such as /etc or ~/.bashrc. |
| dotfile | Modify dotfiles (configuration files starting with a dot). This permission is triggered when the AI modifies hidden configuration files such as .gitignore, .env, .vscode, or settings.json. |
| doom_loop | Loop protection for tool calls. This permission is triggered when the same tool (for example, read) is called three consecutive times with the same input to prevent infinite loops. |
| Action | Description |
|---|---|
| allow | Direct execution. |
| ask | Approval required. When you configure ask, the following options are displayed:
|
| deny | Execution denied |
- In TUI development mode, the sandbox mode is used by default. The options Allow once, Allow always, and Reject are returned.
- In CLI development mode, the execution is automatically denied. To enable the execution, set the action to allow.
Whitelist Configuration Example
Example:
[
{
"permission": "bash",
"pattern": "git *",
"action": "allow"
},
{
"permission": "bash",
"pattern": "npm *",
"action": "allow"
},
{
"permission": "bash",
"pattern": "ls *",
"action": "allow"
}
] This example contains three JSON objects and supports automatic execution of all commands starting with git, npm, and ls.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot