|
|
3 месяцев назад | |
|---|---|---|
| .. | ||
| docs | 3 месяцев назад | |
| src | 3 месяцев назад | |
| .gitignore | 4 месяцев назад | |
| CHANGELOG.md | 3 месяцев назад | |
| README.md | 3 месяцев назад | |
| esbuild.config.mjs | 3 месяцев назад | |
| eslint.config.mjs | 4 месяцев назад | |
| package.dist.json | 3 месяцев назад | |
| package.json | 3 месяцев назад | |
| tsconfig.json | 4 месяцев назад | |
| turbo.json | 4 месяцев назад | |
Terminal User Interface for Kilo Code
npm install -g @kilocode/cli
Then, make sure you place your Kilo Code API token in the CLI config:
kilocode config # this opens up your editor
You can find your Kilo Code API token on your profile page at app.kilocode.ai, and place it in the kilocodeToken field in the CLI config.
We don't detect the theme of your terminal, and are aware the the current theme doesn't work well on light mode terminals. Switch to the light theme using using kilocode config.
When installing Kilo Code CLI you'll be greeted by some scary looking dependency deprecation warnings. We're aware of the issue and will resolve it shortly.
We've only tested the CLI on Mac and Linux, and are aware that there are some issues on Windows. For now, if you can, we advise you to use a WSL environment to run the CLI.
# Start interactive chat session
kilocode
# Start with a specific mode
kilocode --mode architect
# Start with a specific workspace
kilocode --workspace /path/to/project
Autonomous mode allows Kilo Code to run in automated environments like CI/CD pipelines without requiring user interaction.
# Run in autonomous mode with a prompt
kilocode --auto "Implement feature X"
# Run in autonomous mode with piped input
echo "Fix the bug in app.ts" | kilocode --auto
# Run in autonomous mode with timeout (in seconds)
kilocode --auto "Run tests" --timeout 300
When running in Autonomous mode (--auto flag):
Autonomous mode respects your auto-approval configuration. Edit your config file with kilocode config to customize:
{
"autoApproval": {
"enabled": true,
"read": {
"enabled": true,
"outside": true
},
"write": {
"enabled": true,
"outside": false,
"protected": false
},
"execute": {
"enabled": true,
"allowed": ["npm", "git", "pnpm"],
"denied": ["rm -rf", "sudo"]
},
"browser": {
"enabled": false
},
"mcp": {
"enabled": true
},
"mode": {
"enabled": true
},
"subtasks": {
"enabled": true
},
"question": {
"enabled": false,
"timeout": 60
},
"retry": {
"enabled": true,
"delay": 10
},
"todo": {
"enabled": true
}
}
}
Configuration Options:
read: Auto-approve file read operations
outside: Allow reading files outside workspacewrite: Auto-approve file write operations
outside: Allow writing files outside workspaceprotected: Allow writing to protected files (e.g., package.json)execute: Auto-approve command execution
allowed: List of allowed command patterns (e.g., ["npm", "git"])denied: List of denied command patterns (takes precedence)browser: Auto-approve browser operationsmcp: Auto-approve MCP tool usagemode: Auto-approve mode switchingsubtasks: Auto-approve subtask creationquestion: Auto-approve follow-up questionsretry: Auto-approve API retry requeststodo: Auto-approve todo list updatesIn Autonomous mode, when the AI asks a follow-up question, it receives this response:
"This process is running in non-interactive Autonomous mode. The user cannot make decisions, so you should make the decision autonomously."
This instructs the AI to proceed without user input.
0: Success (task completed)124: Timeout (task exceeded time limit)1: Error (initialization or execution failure)# GitHub Actions example
- name: Run Kilo Code
run: |
echo "Implement the new feature" | kilocode --auto --timeout 600
In order to run the CLI with devtools, add DEV=true to your pnpm start command, and then run npx react-devtools to show the devtools inspector.