kimi-cli 0.77__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. kimi_cli-0.77/PKG-INFO +200 -0
  2. kimi_cli-0.77/README.md +171 -0
  3. kimi_cli-0.77/pyproject.toml +93 -0
  4. kimi_cli-0.77/src/kimi_cli/CHANGELOG.md +701 -0
  5. kimi_cli-0.77/src/kimi_cli/__init__.py +6 -0
  6. kimi_cli-0.77/src/kimi_cli/acp/AGENTS.md +91 -0
  7. kimi_cli-0.77/src/kimi_cli/acp/__init__.py +13 -0
  8. kimi_cli-0.77/src/kimi_cli/acp/convert.py +111 -0
  9. kimi_cli-0.77/src/kimi_cli/acp/kaos.py +270 -0
  10. kimi_cli-0.77/src/kimi_cli/acp/mcp.py +46 -0
  11. kimi_cli-0.77/src/kimi_cli/acp/server.py +335 -0
  12. kimi_cli-0.77/src/kimi_cli/acp/session.py +445 -0
  13. kimi_cli-0.77/src/kimi_cli/acp/tools.py +158 -0
  14. kimi_cli-0.77/src/kimi_cli/acp/types.py +13 -0
  15. kimi_cli-0.77/src/kimi_cli/agents/default/agent.yaml +24 -0
  16. kimi_cli-0.77/src/kimi_cli/agents/default/sub.yaml +12 -0
  17. kimi_cli-0.77/src/kimi_cli/agents/default/system.md +130 -0
  18. kimi_cli-0.77/src/kimi_cli/agents/okabe/agent.yaml +17 -0
  19. kimi_cli-0.77/src/kimi_cli/agentspec.py +143 -0
  20. kimi_cli-0.77/src/kimi_cli/app.py +323 -0
  21. kimi_cli-0.77/src/kimi_cli/cli/__init__.py +583 -0
  22. kimi_cli-0.77/src/kimi_cli/cli/__main__.py +8 -0
  23. kimi_cli-0.77/src/kimi_cli/cli/info.py +63 -0
  24. kimi_cli-0.77/src/kimi_cli/cli/mcp.py +349 -0
  25. kimi_cli-0.77/src/kimi_cli/config.py +293 -0
  26. kimi_cli-0.77/src/kimi_cli/constant.py +7 -0
  27. kimi_cli-0.77/src/kimi_cli/exception.py +37 -0
  28. kimi_cli-0.77/src/kimi_cli/flow.py +304 -0
  29. kimi_cli-0.77/src/kimi_cli/llm.py +214 -0
  30. kimi_cli-0.77/src/kimi_cli/metadata.py +79 -0
  31. kimi_cli-0.77/src/kimi_cli/platforms.py +262 -0
  32. kimi_cli-0.77/src/kimi_cli/prompts/__init__.py +6 -0
  33. kimi_cli-0.77/src/kimi_cli/prompts/compact.md +73 -0
  34. kimi_cli-0.77/src/kimi_cli/prompts/init.md +21 -0
  35. kimi_cli-0.77/src/kimi_cli/py.typed +0 -0
  36. kimi_cli-0.77/src/kimi_cli/session.py +273 -0
  37. kimi_cli-0.77/src/kimi_cli/share.py +10 -0
  38. kimi_cli-0.77/src/kimi_cli/skill.py +145 -0
  39. kimi_cli-0.77/src/kimi_cli/skills/kimi-cli-help/SKILL.md +55 -0
  40. kimi_cli-0.77/src/kimi_cli/skills/skill-creator/SKILL.md +351 -0
  41. kimi_cli-0.77/src/kimi_cli/soul/__init__.py +204 -0
  42. kimi_cli-0.77/src/kimi_cli/soul/agent.py +282 -0
  43. kimi_cli-0.77/src/kimi_cli/soul/approval.py +137 -0
  44. kimi_cli-0.77/src/kimi_cli/soul/compaction.py +116 -0
  45. kimi_cli-0.77/src/kimi_cli/soul/context.py +175 -0
  46. kimi_cli-0.77/src/kimi_cli/soul/denwarenji.py +39 -0
  47. kimi_cli-0.77/src/kimi_cli/soul/kimisoul.py +701 -0
  48. kimi_cli-0.77/src/kimi_cli/soul/message.py +76 -0
  49. kimi_cli-0.77/src/kimi_cli/soul/slash.py +72 -0
  50. kimi_cli-0.77/src/kimi_cli/soul/toolset.py +406 -0
  51. kimi_cli-0.77/src/kimi_cli/toad.py +74 -0
  52. kimi_cli-0.77/src/kimi_cli/tools/AGENTS.md +5 -0
  53. kimi_cli-0.77/src/kimi_cli/tools/__init__.py +93 -0
  54. kimi_cli-0.77/src/kimi_cli/tools/display.py +25 -0
  55. kimi_cli-0.77/src/kimi_cli/tools/dmail/__init__.py +38 -0
  56. kimi_cli-0.77/src/kimi_cli/tools/dmail/dmail.md +17 -0
  57. kimi_cli-0.77/src/kimi_cli/tools/file/__init__.py +27 -0
  58. kimi_cli-0.77/src/kimi_cli/tools/file/glob.md +17 -0
  59. kimi_cli-0.77/src/kimi_cli/tools/file/glob.py +146 -0
  60. kimi_cli-0.77/src/kimi_cli/tools/file/grep.md +5 -0
  61. kimi_cli-0.77/src/kimi_cli/tools/file/grep_local.py +314 -0
  62. kimi_cli-0.77/src/kimi_cli/tools/file/read.md +32 -0
  63. kimi_cli-0.77/src/kimi_cli/tools/file/read.py +223 -0
  64. kimi_cli-0.77/src/kimi_cli/tools/file/replace.md +7 -0
  65. kimi_cli-0.77/src/kimi_cli/tools/file/replace.py +151 -0
  66. kimi_cli-0.77/src/kimi_cli/tools/file/utils.py +282 -0
  67. kimi_cli-0.77/src/kimi_cli/tools/file/write.md +5 -0
  68. kimi_cli-0.77/src/kimi_cli/tools/file/write.py +140 -0
  69. kimi_cli-0.77/src/kimi_cli/tools/multiagent/__init__.py +7 -0
  70. kimi_cli-0.77/src/kimi_cli/tools/multiagent/create.md +11 -0
  71. kimi_cli-0.77/src/kimi_cli/tools/multiagent/create.py +50 -0
  72. kimi_cli-0.77/src/kimi_cli/tools/multiagent/task.md +26 -0
  73. kimi_cli-0.77/src/kimi_cli/tools/multiagent/task.py +160 -0
  74. kimi_cli-0.77/src/kimi_cli/tools/shell/__init__.py +120 -0
  75. kimi_cli-0.77/src/kimi_cli/tools/shell/bash.md +30 -0
  76. kimi_cli-0.77/src/kimi_cli/tools/shell/powershell.md +25 -0
  77. kimi_cli-0.77/src/kimi_cli/tools/test.py +55 -0
  78. kimi_cli-0.77/src/kimi_cli/tools/think/__init__.py +21 -0
  79. kimi_cli-0.77/src/kimi_cli/tools/think/think.md +1 -0
  80. kimi_cli-0.77/src/kimi_cli/tools/todo/__init__.py +33 -0
  81. kimi_cli-0.77/src/kimi_cli/tools/todo/set_todo_list.md +15 -0
  82. kimi_cli-0.77/src/kimi_cli/tools/utils.py +190 -0
  83. kimi_cli-0.77/src/kimi_cli/tools/web/__init__.py +4 -0
  84. kimi_cli-0.77/src/kimi_cli/tools/web/fetch.md +1 -0
  85. kimi_cli-0.77/src/kimi_cli/tools/web/fetch.py +150 -0
  86. kimi_cli-0.77/src/kimi_cli/tools/web/search.md +1 -0
  87. kimi_cli-0.77/src/kimi_cli/tools/web/search.py +127 -0
  88. kimi_cli-0.77/src/kimi_cli/ui/__init__.py +0 -0
  89. kimi_cli-0.77/src/kimi_cli/ui/acp/__init__.py +89 -0
  90. kimi_cli-0.77/src/kimi_cli/ui/print/__init__.py +141 -0
  91. kimi_cli-0.77/src/kimi_cli/ui/print/visualize.py +179 -0
  92. kimi_cli-0.77/src/kimi_cli/ui/shell/__init__.py +351 -0
  93. kimi_cli-0.77/src/kimi_cli/ui/shell/console.py +31 -0
  94. kimi_cli-0.77/src/kimi_cli/ui/shell/debug.py +192 -0
  95. kimi_cli-0.77/src/kimi_cli/ui/shell/keyboard.py +187 -0
  96. kimi_cli-0.77/src/kimi_cli/ui/shell/prompt.py +803 -0
  97. kimi_cli-0.77/src/kimi_cli/ui/shell/replay.py +169 -0
  98. kimi_cli-0.77/src/kimi_cli/ui/shell/setup.py +197 -0
  99. kimi_cli-0.77/src/kimi_cli/ui/shell/slash.py +422 -0
  100. kimi_cli-0.77/src/kimi_cli/ui/shell/update.py +212 -0
  101. kimi_cli-0.77/src/kimi_cli/ui/shell/usage.py +271 -0
  102. kimi_cli-0.77/src/kimi_cli/ui/shell/visualize.py +613 -0
  103. kimi_cli-0.77/src/kimi_cli/ui/wire/__init__.py +267 -0
  104. kimi_cli-0.77/src/kimi_cli/ui/wire/jsonrpc.py +142 -0
  105. kimi_cli-0.77/src/kimi_cli/ui/wire/protocol.py +1 -0
  106. kimi_cli-0.77/src/kimi_cli/utils/__init__.py +0 -0
  107. kimi_cli-0.77/src/kimi_cli/utils/aiohttp.py +12 -0
  108. kimi_cli-0.77/src/kimi_cli/utils/aioqueue.py +72 -0
  109. kimi_cli-0.77/src/kimi_cli/utils/broadcast.py +37 -0
  110. kimi_cli-0.77/src/kimi_cli/utils/changelog.py +108 -0
  111. kimi_cli-0.77/src/kimi_cli/utils/clipboard.py +12 -0
  112. kimi_cli-0.77/src/kimi_cli/utils/datetime.py +37 -0
  113. kimi_cli-0.77/src/kimi_cli/utils/environment.py +58 -0
  114. kimi_cli-0.77/src/kimi_cli/utils/envvar.py +12 -0
  115. kimi_cli-0.77/src/kimi_cli/utils/frontmatter.py +44 -0
  116. kimi_cli-0.77/src/kimi_cli/utils/logging.py +19 -0
  117. kimi_cli-0.77/src/kimi_cli/utils/message.py +17 -0
  118. kimi_cli-0.77/src/kimi_cli/utils/path.py +113 -0
  119. kimi_cli-0.77/src/kimi_cli/utils/pyinstaller.py +30 -0
  120. kimi_cli-0.77/src/kimi_cli/utils/rich/__init__.py +33 -0
  121. kimi_cli-0.77/src/kimi_cli/utils/rich/columns.py +99 -0
  122. kimi_cli-0.77/src/kimi_cli/utils/rich/markdown.py +961 -0
  123. kimi_cli-0.77/src/kimi_cli/utils/rich/markdown_sample.md +108 -0
  124. kimi_cli-0.77/src/kimi_cli/utils/rich/markdown_sample_short.md +2 -0
  125. kimi_cli-0.77/src/kimi_cli/utils/signals.py +43 -0
  126. kimi_cli-0.77/src/kimi_cli/utils/slashcmd.py +124 -0
  127. kimi_cli-0.77/src/kimi_cli/utils/string.py +22 -0
  128. kimi_cli-0.77/src/kimi_cli/utils/term.py +168 -0
  129. kimi_cli-0.77/src/kimi_cli/utils/typing.py +20 -0
  130. kimi_cli-0.77/src/kimi_cli/wire/__init__.py +139 -0
  131. kimi_cli-0.77/src/kimi_cli/wire/serde.py +45 -0
  132. kimi_cli-0.77/src/kimi_cli/wire/types.py +299 -0
kimi_cli-0.77/PKG-INFO ADDED
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.3
2
+ Name: kimi-cli
3
+ Version: 0.77
4
+ Summary: Kimi CLI is your next CLI agent.
5
+ Requires-Dist: agent-client-protocol==0.7.0
6
+ Requires-Dist: aiofiles>=24.0,<26.0
7
+ Requires-Dist: aiohttp==3.13.3
8
+ Requires-Dist: typer==0.21.1
9
+ Requires-Dist: kosong[contrib]==0.38.0
10
+ Requires-Dist: loguru>=0.6.0,<0.8
11
+ Requires-Dist: prompt-toolkit==3.0.52
12
+ Requires-Dist: pillow==12.1.0
13
+ Requires-Dist: pyyaml==6.0.3
14
+ Requires-Dist: rich==14.2.0
15
+ Requires-Dist: ripgrepy==2.2.0
16
+ Requires-Dist: streamingjson==0.0.5
17
+ Requires-Dist: trafilatura==2.0.0
18
+ Requires-Dist: lxml==6.0.2
19
+ Requires-Dist: tenacity==9.1.2
20
+ Requires-Dist: fastmcp==2.12.5
21
+ Requires-Dist: pydantic==2.12.5
22
+ Requires-Dist: httpx[socks]==0.28.1
23
+ Requires-Dist: pykaos==0.6.0
24
+ Requires-Dist: batrachian-toad==0.5.23 ; python_full_version >= '3.14'
25
+ Requires-Dist: tomlkit==0.13.3
26
+ Requires-Dist: jinja2==3.1.4
27
+ Requires-Python: >=3.12
28
+ Description-Content-Type: text/markdown
29
+
30
+ # Kimi CLI
31
+
32
+ [![Commit Activity](https://img.shields.io/github/commit-activity/w/MoonshotAI/kimi-cli)](https://github.com/MoonshotAI/kimi-cli/graphs/commit-activity)
33
+ [![Checks](https://img.shields.io/github/check-runs/MoonshotAI/kimi-cli/main)](https://github.com/MoonshotAI/kimi-cli/actions)
34
+ [![Version](https://img.shields.io/pypi/v/kimi-cli)](https://pypi.org/project/kimi-cli/)
35
+ [![Downloads](https://img.shields.io/pypi/dw/kimi-cli)](https://pypistats.org/packages/kimi-cli)
36
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MoonshotAI/kimi-cli)
37
+
38
+ [Kimi Code](https://www.kimi.com/code/) | [Documentation](https://moonshotai.github.io/kimi-cli/en/) | [文档](https://moonshotai.github.io/kimi-cli/zh/)
39
+
40
+ Kimi CLI is an AI agent that runs in the terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute shell commands, search and fetch web pages, and autonomously plan and adjust actions during execution.
41
+
42
+ > [!IMPORTANT]
43
+ > Kimi CLI is currently in technical preview.
44
+
45
+ ## Getting Started
46
+
47
+ See [Getting Started](https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html) for how to install and start using Kimi CLI.
48
+
49
+ ## Key Features
50
+
51
+ ### Shell command mode
52
+
53
+ Kimi CLI is not only a coding agent, but also a shell. You can switch the shell command mode by pressing `Ctrl-X`. In this mode, you can directly run shell commands without leaving Kimi CLI.
54
+
55
+ ![](./docs/media/shell-mode.gif)
56
+
57
+ > [!NOTE]
58
+ > Built-in shell commands like `cd` are not supported yet.
59
+
60
+ ### IDE integration via ACP
61
+
62
+ Kimi CLI supports [Agent Client Protocol] out of the box. You can use it together with any ACP-compatible editor or IDE.
63
+
64
+ [Agent Client Protocol]: https://github.com/agentclientprotocol/agent-client-protocol
65
+
66
+ To use Kimi CLI with ACP clients, make sure to run Kimi CLI in the terminal and send `/setup` to complete the setup first. Then, you can configure your ACP client to start Kimi CLI as an ACP agent server with command `kimi acp`.
67
+
68
+ For example, to use Kimi CLI with [Zed](https://zed.dev/) or [JetBrains](https://blog.jetbrains.com/ai/2025/12/bring-your-own-ai-agent-to-jetbrains-ides/), add the following configuration to your `~/.config/zed/settings.json` or `~/.jetbrains/acp.json` file:
69
+
70
+ ```json
71
+ {
72
+ "agent_servers": {
73
+ "Kimi CLI": {
74
+ "command": "kimi",
75
+ "args": ["acp"],
76
+ "env": {}
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ Then you can create Kimi CLI threads in IDE's agent panel.
83
+
84
+ ![](./docs/media/acp-integration.gif)
85
+
86
+ ### Zsh integration
87
+
88
+ You can use Kimi CLI together with Zsh, to empower your shell experience with AI agent capabilities.
89
+
90
+ Install the [zsh-kimi-cli](https://github.com/MoonshotAI/zsh-kimi-cli) plugin via:
91
+
92
+ ```sh
93
+ git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \
94
+ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli
95
+ ```
96
+
97
+ > [!NOTE]
98
+ > If you are using a plugin manager other than Oh My Zsh, you may need to refer to the plugin's README for installation instructions.
99
+
100
+ Then add `kimi-cli` to your Zsh plugin list in `~/.zshrc`:
101
+
102
+ ```sh
103
+ plugins=(... kimi-cli)
104
+ ```
105
+
106
+ After restarting Zsh, you can switch to agent mode by pressing `Ctrl-X`.
107
+
108
+ ### MCP support
109
+
110
+ Kimi CLI supports MCP (Model Context Protocol) tools.
111
+
112
+ **`kimi mcp` sub-command group**
113
+
114
+ You can manage MCP servers with `kimi mcp` sub-command group. For example:
115
+
116
+ ```sh
117
+ # Add streamable HTTP server:
118
+ kimi mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: ctx7sk-your-key"
119
+
120
+ # Add streamable HTTP server with OAuth authorization:
121
+ kimi mcp add --transport http --auth oauth linear https://mcp.linear.app/mcp
122
+
123
+ # Add stdio server:
124
+ kimi mcp add --transport stdio chrome-devtools -- npx chrome-devtools-mcp@latest
125
+
126
+ # List added MCP servers:
127
+ kimi mcp list
128
+
129
+ # Remove an MCP server:
130
+ kimi mcp remove chrome-devtools
131
+
132
+ # Authorize an MCP server:
133
+ kimi mcp auth linear
134
+ ```
135
+
136
+ **Ad-hoc MCP configuration**
137
+
138
+ Kimi CLI also supports ad-hoc MCP server configuration via CLI option.
139
+
140
+ Given an MCP config file in the well-known MCP config format like the following:
141
+
142
+ ```json
143
+ {
144
+ "mcpServers": {
145
+ "context7": {
146
+ "url": "https://mcp.context7.com/mcp",
147
+ "headers": {
148
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
149
+ }
150
+ },
151
+ "chrome-devtools": {
152
+ "command": "npx",
153
+ "args": ["-y", "chrome-devtools-mcp@latest"]
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ Run `kimi` with `--mcp-config-file` option to connect to the specified MCP servers:
160
+
161
+ ```sh
162
+ kimi --mcp-config-file /path/to/mcp.json
163
+ ```
164
+
165
+ ### More
166
+
167
+ See more features in the [Documentation](https://moonshotai.github.io/kimi-cli/en/).
168
+
169
+ ## Development
170
+
171
+ To develop Kimi CLI, run:
172
+
173
+ ```sh
174
+ git clone https://github.com/MoonshotAI/kimi-cli.git
175
+ cd kimi-cli
176
+
177
+ make prepare # prepare the development environment
178
+ ```
179
+
180
+ Then you can start working on Kimi CLI.
181
+
182
+ Refer to the following commands after you make changes:
183
+
184
+ ```sh
185
+ uv run kimi # run Kimi CLI
186
+
187
+ make format # format code
188
+ make check # run linting and type checking
189
+ make test # run tests
190
+ make test-kimi-cli # run Kimi CLI tests only
191
+ make test-kosong # run kosong tests only
192
+ make test-pykaos # run pykaos tests only
193
+ make build # build python packages
194
+ make build-bin # build standalone binary
195
+ make help # show all make targets
196
+ ```
197
+
198
+ ## Contributing
199
+
200
+ We welcome contributions to Kimi CLI! Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.
@@ -0,0 +1,171 @@
1
+ # Kimi CLI
2
+
3
+ [![Commit Activity](https://img.shields.io/github/commit-activity/w/MoonshotAI/kimi-cli)](https://github.com/MoonshotAI/kimi-cli/graphs/commit-activity)
4
+ [![Checks](https://img.shields.io/github/check-runs/MoonshotAI/kimi-cli/main)](https://github.com/MoonshotAI/kimi-cli/actions)
5
+ [![Version](https://img.shields.io/pypi/v/kimi-cli)](https://pypi.org/project/kimi-cli/)
6
+ [![Downloads](https://img.shields.io/pypi/dw/kimi-cli)](https://pypistats.org/packages/kimi-cli)
7
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MoonshotAI/kimi-cli)
8
+
9
+ [Kimi Code](https://www.kimi.com/code/) | [Documentation](https://moonshotai.github.io/kimi-cli/en/) | [文档](https://moonshotai.github.io/kimi-cli/zh/)
10
+
11
+ Kimi CLI is an AI agent that runs in the terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute shell commands, search and fetch web pages, and autonomously plan and adjust actions during execution.
12
+
13
+ > [!IMPORTANT]
14
+ > Kimi CLI is currently in technical preview.
15
+
16
+ ## Getting Started
17
+
18
+ See [Getting Started](https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html) for how to install and start using Kimi CLI.
19
+
20
+ ## Key Features
21
+
22
+ ### Shell command mode
23
+
24
+ Kimi CLI is not only a coding agent, but also a shell. You can switch the shell command mode by pressing `Ctrl-X`. In this mode, you can directly run shell commands without leaving Kimi CLI.
25
+
26
+ ![](./docs/media/shell-mode.gif)
27
+
28
+ > [!NOTE]
29
+ > Built-in shell commands like `cd` are not supported yet.
30
+
31
+ ### IDE integration via ACP
32
+
33
+ Kimi CLI supports [Agent Client Protocol] out of the box. You can use it together with any ACP-compatible editor or IDE.
34
+
35
+ [Agent Client Protocol]: https://github.com/agentclientprotocol/agent-client-protocol
36
+
37
+ To use Kimi CLI with ACP clients, make sure to run Kimi CLI in the terminal and send `/setup` to complete the setup first. Then, you can configure your ACP client to start Kimi CLI as an ACP agent server with command `kimi acp`.
38
+
39
+ For example, to use Kimi CLI with [Zed](https://zed.dev/) or [JetBrains](https://blog.jetbrains.com/ai/2025/12/bring-your-own-ai-agent-to-jetbrains-ides/), add the following configuration to your `~/.config/zed/settings.json` or `~/.jetbrains/acp.json` file:
40
+
41
+ ```json
42
+ {
43
+ "agent_servers": {
44
+ "Kimi CLI": {
45
+ "command": "kimi",
46
+ "args": ["acp"],
47
+ "env": {}
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ Then you can create Kimi CLI threads in IDE's agent panel.
54
+
55
+ ![](./docs/media/acp-integration.gif)
56
+
57
+ ### Zsh integration
58
+
59
+ You can use Kimi CLI together with Zsh, to empower your shell experience with AI agent capabilities.
60
+
61
+ Install the [zsh-kimi-cli](https://github.com/MoonshotAI/zsh-kimi-cli) plugin via:
62
+
63
+ ```sh
64
+ git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \
65
+ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli
66
+ ```
67
+
68
+ > [!NOTE]
69
+ > If you are using a plugin manager other than Oh My Zsh, you may need to refer to the plugin's README for installation instructions.
70
+
71
+ Then add `kimi-cli` to your Zsh plugin list in `~/.zshrc`:
72
+
73
+ ```sh
74
+ plugins=(... kimi-cli)
75
+ ```
76
+
77
+ After restarting Zsh, you can switch to agent mode by pressing `Ctrl-X`.
78
+
79
+ ### MCP support
80
+
81
+ Kimi CLI supports MCP (Model Context Protocol) tools.
82
+
83
+ **`kimi mcp` sub-command group**
84
+
85
+ You can manage MCP servers with `kimi mcp` sub-command group. For example:
86
+
87
+ ```sh
88
+ # Add streamable HTTP server:
89
+ kimi mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: ctx7sk-your-key"
90
+
91
+ # Add streamable HTTP server with OAuth authorization:
92
+ kimi mcp add --transport http --auth oauth linear https://mcp.linear.app/mcp
93
+
94
+ # Add stdio server:
95
+ kimi mcp add --transport stdio chrome-devtools -- npx chrome-devtools-mcp@latest
96
+
97
+ # List added MCP servers:
98
+ kimi mcp list
99
+
100
+ # Remove an MCP server:
101
+ kimi mcp remove chrome-devtools
102
+
103
+ # Authorize an MCP server:
104
+ kimi mcp auth linear
105
+ ```
106
+
107
+ **Ad-hoc MCP configuration**
108
+
109
+ Kimi CLI also supports ad-hoc MCP server configuration via CLI option.
110
+
111
+ Given an MCP config file in the well-known MCP config format like the following:
112
+
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "context7": {
117
+ "url": "https://mcp.context7.com/mcp",
118
+ "headers": {
119
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
120
+ }
121
+ },
122
+ "chrome-devtools": {
123
+ "command": "npx",
124
+ "args": ["-y", "chrome-devtools-mcp@latest"]
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ Run `kimi` with `--mcp-config-file` option to connect to the specified MCP servers:
131
+
132
+ ```sh
133
+ kimi --mcp-config-file /path/to/mcp.json
134
+ ```
135
+
136
+ ### More
137
+
138
+ See more features in the [Documentation](https://moonshotai.github.io/kimi-cli/en/).
139
+
140
+ ## Development
141
+
142
+ To develop Kimi CLI, run:
143
+
144
+ ```sh
145
+ git clone https://github.com/MoonshotAI/kimi-cli.git
146
+ cd kimi-cli
147
+
148
+ make prepare # prepare the development environment
149
+ ```
150
+
151
+ Then you can start working on Kimi CLI.
152
+
153
+ Refer to the following commands after you make changes:
154
+
155
+ ```sh
156
+ uv run kimi # run Kimi CLI
157
+
158
+ make format # format code
159
+ make check # run linting and type checking
160
+ make test # run tests
161
+ make test-kimi-cli # run Kimi CLI tests only
162
+ make test-kosong # run kosong tests only
163
+ make test-pykaos # run pykaos tests only
164
+ make build # build python packages
165
+ make build-bin # build standalone binary
166
+ make help # show all make targets
167
+ ```
168
+
169
+ ## Contributing
170
+
171
+ We welcome contributions to Kimi CLI! Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.
@@ -0,0 +1,93 @@
1
+ [project]
2
+ name = "kimi-cli"
3
+ version = "0.77"
4
+ description = "Kimi CLI is your next CLI agent."
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "agent-client-protocol==0.7.0",
9
+ "aiofiles>=24.0,<26.0",
10
+ "aiohttp==3.13.3",
11
+ "typer==0.21.1",
12
+ "kosong[contrib]==0.38.0",
13
+ # loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+.
14
+ "loguru>=0.6.0,<0.8",
15
+ "prompt-toolkit==3.0.52",
16
+ "pillow==12.1.0",
17
+ "pyyaml==6.0.3",
18
+ "rich==14.2.0",
19
+ "ripgrepy==2.2.0",
20
+ "streamingjson==0.0.5",
21
+ "trafilatura==2.0.0",
22
+ # lxml is used by trafilatura/htmldate/justext; keep pinned for binary wheels.
23
+ "lxml==6.0.2",
24
+ "tenacity==9.1.2",
25
+ "fastmcp==2.12.5",
26
+ "pydantic==2.12.5",
27
+ "httpx[socks]==0.28.1",
28
+ "pykaos==0.6.0",
29
+ "batrachian-toad==0.5.23; python_version >= \"3.14\"",
30
+ "tomlkit==0.13.3",
31
+ "jinja2==3.1.4",
32
+ ]
33
+
34
+ [dependency-groups]
35
+ dev = [
36
+ "pyinstaller==6.17.0",
37
+ "inline-snapshot[black]>=0.31.1",
38
+ "pyright>=1.1.407",
39
+ "ty>=0.0.9",
40
+ "pytest>=9.0.2",
41
+ "pytest-asyncio>=1.3.0",
42
+ "ruff>=0.14.10",
43
+ ]
44
+
45
+ [build-system]
46
+ requires = ["uv_build>=0.8.5,<0.10.0"]
47
+ build-backend = "uv_build"
48
+
49
+ [tool.uv.build-backend]
50
+ module-name = ["kimi_cli"]
51
+ source-exclude = ["examples/**/*", "tests/**/*", "src/kimi_cli/deps/**/*"]
52
+
53
+ [tool.uv.workspace]
54
+ members = ["packages/kosong", "packages/kaos", "sdks/kimi-sdk"]
55
+
56
+ [tool.uv.sources]
57
+ kosong = { workspace = true }
58
+ pykaos = { workspace = true }
59
+
60
+ [project.scripts]
61
+ kimi = "kimi_cli.cli:cli"
62
+ kimi-cli = "kimi_cli.cli:cli"
63
+
64
+ [tool.ruff]
65
+ line-length = 100
66
+
67
+ [tool.ruff.lint]
68
+ select = [
69
+ "E", # pycodestyle
70
+ "F", # Pyflakes
71
+ "UP", # pyupgrade
72
+ "B", # flake8-bugbear
73
+ "SIM", # flake8-simplify
74
+ "I", # isort
75
+ ]
76
+
77
+ [tool.pyright]
78
+ typeCheckingMode = "standard"
79
+ pythonVersion = "3.14"
80
+ include = ["src/**/*.py", "tests/**/*.py", "tests_ai/scripts/**/*.py"]
81
+ strict = ["src/kimi_cli/**/*.py"]
82
+
83
+ [tool.ty.environment]
84
+ python-version = "3.14"
85
+
86
+ [tool.ty.src]
87
+ include = ["src/**/*.py", "tests/**/*.py", "tests_ai/scripts/**/*.py"]
88
+
89
+ [tool.typos.files]
90
+ extend-exclude = ["kimi.spec", "pyinstaller.py"]
91
+
92
+ [tool.typos.default.extend-words]
93
+ datas = "datas"