Skip to content

docs(cli): add configuration section referencing OpenCode docs#5679

Open
kiloconnect[bot] wants to merge 1 commit intomainfrom
session/agent_0f0287d4-6b73-4241-bbcb-9490b88294d5
Open

docs(cli): add configuration section referencing OpenCode docs#5679
kiloconnect[bot] wants to merge 1 commit intomainfrom
session/agent_0f0287d4-6b73-4241-bbcb-9490b88294d5

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Feb 5, 2026

Summary

Add a concise configuration section to the CLI documentation that helps users understand how to configure Kilo CLI.

Changes

  • Added new "Configuration" section to the CLI docs
  • Documented config file locations (global ~/.kilocode/config.json and project-level kilocode.json)
  • Added example showing key configuration options (model, provider, permissions, instructions)
  • Explained variable substitution syntax ({env:VAR} and {file:path})
  • Added link to OpenCode's comprehensive configuration documentation

Context

Since Kilo CLI is a fork of OpenCode, it supports the same JSON configuration format. Rather than duplicating all of OpenCode's documentation, this update provides a concise overview of the key options and links to OpenCode's docs for full details.

Testing

Documentation-only change - no code changes.


Built for Brendan by Kilo for Slack

Add a concise configuration section to the CLI documentation that:
- Documents config file locations (global and project-level)
- Shows key configuration options with examples
- Explains variable substitution syntax
- Links to OpenCode docs for comprehensive coverage

Since Kilo CLI is a fork of OpenCode, it supports the same JSON
configuration format. This update helps users understand the
configuration options without duplicating OpenCode's documentation.
@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

⚠️ No Changeset found

Latest commit: c0aa4b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


| Scope | Location |
|-------|----------|
| Global | `~/.kilocode/config.json` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Global config path looks incorrect for the CLI

cli/src/config/persistence.ts uses ~/.kilocode/cli/config.json (via CONFIG_DIR/CONFIG_FILE), but this table lists ~/.kilocode/config.json. Users following this doc will likely edit the wrong file.

Suggested change
| Global | `~/.kilocode/config.json` |
| Global | `~/.kilocode/cli/config.json` |


- **Interactive CLI**: Run `kilocode config` or use `/config` during a session
- **Configuration file**: Edit `~/.kilocode/config.json` directly
- **Project-level config**: Create `kilocode.json` in your project root
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Project-level kilocode.json config may not be supported

I couldn’t find any CLI code paths that read ./kilocode.json (searching the CLI source for kilocode.json returns no hits). Current config persistence appears to be centered on a single home-directory config file. If project config isn’t implemented yet, consider clarifying/removing this to avoid users assuming it works.


### Key Configuration Options

```json
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Example config format/options don’t match the current CLI config schema

The CLI config code uses a providers: [...] array + a selected provider id (see cli/src/config/persistence.ts + cli/src/config/mapper.ts), whereas this example shows a provider: { anthropic: { ... } } map and includes permission/instructions. This may be copy-pasted and then fail validation / be silently ignored. Consider either updating the example to match the actual CLI schema or explicitly labeling it as OpenCode-only.


### Variable Substitution

Config files support variable substitution:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: {env:...} / {file:...} variable substitution may not be implemented

I couldn’t find config placeholder substitution in the CLI config loader; if this isn’t supported, readers may expect placeholders like {env:ANTHROPIC_API_KEY} to work and end up with invalid config. Consider confirming support in code or adjusting the docs to recommend standard environment variable usage instead.

@kiloconnect
Copy link
Contributor Author

kiloconnect bot commented Feb 5, 2026

Code Review Summary

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 4
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/kilocode-docs/pages/code-with-ai/platforms/cli.md 407 Project-level kilocode.json config may not be supported in the CLI
apps/kilocode-docs/pages/code-with-ai/platforms/cli.md 413 Global config location likely incorrect (CLI uses ~/.kilocode/cli/config.json)
apps/kilocode-docs/pages/code-with-ai/platforms/cli.md 420 Example config schema/options appear mismatched with current CLI config implementation
apps/kilocode-docs/pages/code-with-ai/platforms/cli.md 449 {env:...} / {file:...} variable substitution may not be implemented in CLI config loader
Files Reviewed (1 files)
  • apps/kilocode-docs/pages/code-with-ai/platforms/cli.md - 4 issues

Fix these issues in Kilo Cloud

@kevinvandijk kevinvandijk added the documentation Improvements or additions to documentation label Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants