1. 加载全局配置: 首先尝试加载 ~/.kimi/AGENTS.md 或 ~/.kimi/agents.md || 1. Load global configuration: First try to load ~/.kimi/AGENTS.md or ~/.kimi/agents.md#1590
Draft
jie023 wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
2. 加载本地配置: 然后尝试加载工作目录的 AGENTS.md 或 agents.md
3. 智能合并:
• 如果两者都存在,会合并内容,并用标题区分来源:
# Global AGENTS.md (from ~/.kimi/)
[全局规则内容]
---
# Local AGENTS.md (from [工作目录])
[本地规则内容]
• 如果只有其中一个存在,只返回那个的内容
• 如果都不存在,返回 None
使用方法
只需在 ~/.kimi/AGENTS.md 创建你的全局个人规则文件,CLI 启动时会自动加载:
mkdir -p ~/.kimi
echo "# 我的全局规则" > ~/.kimi/AGENTS.md
这样每次启动 Kimi CLI 时,无论在哪个工作目录,都会自动加载你的全局个人规则。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
加载全局配置: 首先尝试加载 ~/.kimi/AGENTS.md 或 ~/.kimi/agents.md
加载本地配置: 然后尝试加载工作目录的 AGENTS.md 或 agents.md
智能合并: • 如果两者都存在,会合并内容,并用标题区分来源: # Global AGENTS.md (from ~/.kimi/)
[全局规则内容]
Local AGENTS.md (from [工作目录])
[本地规则内容]
• 如果只有其中一个存在,只返回那个的内容
• 如果都不存在,返回 None
使用方法
只需在 ~/.kimi/AGENTS.md 创建你的全局个人规则文件,CLI 启动时会自动加载:
mkdir -p ~/.kimi
echo "# 我的全局规则" > ~/.kimi/AGENTS.md
这样每次启动 Kimi CLI 时,无论在哪个工作目录,都会自动加载你的全局个人规则。
Load global configuration: First try to load ~/.kimi/AGENTS.md or ~/.kimi/agents.md
Load local configuration: Then try to load AGENTS.md or agents.md in the working directory
Smart merge: • If both exist, the content will be merged and the source will be distinguished with titles: # Global AGENTS.md (from ~/.kimi/)
[Global rule content]
Local AGENTS.md (from [working directory])
[Content of local rules]
• If only one of them exists, only the contents of that one are returned
• If neither exists, return None
How to use
Just create your global personal rules file in ~/.kimi/AGENTS.md and it will be loaded automatically when the CLI starts:
mkdir -p ~/.kimi
echo "#My global rules" > ~/.kimi/AGENTS.md
In this way, every time you start Kimi CLI, your global personal rules will be automatically loaded no matter which working directory you are in.