kimi-cli 0.35__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.

Potentially problematic release.


This version of kimi-cli might be problematic. Click here for more details.

Files changed (75) hide show
  1. kimi_cli-0.35/PKG-INFO +24 -0
  2. kimi_cli-0.35/README.md +1 -0
  3. kimi_cli-0.35/pyproject.toml +58 -0
  4. kimi_cli-0.35/src/kimi_cli/CHANGELOG.md +304 -0
  5. kimi_cli-0.35/src/kimi_cli/__init__.py +374 -0
  6. kimi_cli-0.35/src/kimi_cli/agent.py +261 -0
  7. kimi_cli-0.35/src/kimi_cli/agents/koder/README.md +3 -0
  8. kimi_cli-0.35/src/kimi_cli/agents/koder/agent.yaml +24 -0
  9. kimi_cli-0.35/src/kimi_cli/agents/koder/sub.yaml +11 -0
  10. kimi_cli-0.35/src/kimi_cli/agents/koder/system.md +72 -0
  11. kimi_cli-0.35/src/kimi_cli/config.py +138 -0
  12. kimi_cli-0.35/src/kimi_cli/llm.py +8 -0
  13. kimi_cli-0.35/src/kimi_cli/metadata.py +117 -0
  14. kimi_cli-0.35/src/kimi_cli/prompts/metacmds/__init__.py +4 -0
  15. kimi_cli-0.35/src/kimi_cli/prompts/metacmds/compact.md +74 -0
  16. kimi_cli-0.35/src/kimi_cli/prompts/metacmds/init.md +21 -0
  17. kimi_cli-0.35/src/kimi_cli/py.typed +0 -0
  18. kimi_cli-0.35/src/kimi_cli/share.py +8 -0
  19. kimi_cli-0.35/src/kimi_cli/soul/__init__.py +59 -0
  20. kimi_cli-0.35/src/kimi_cli/soul/approval.py +69 -0
  21. kimi_cli-0.35/src/kimi_cli/soul/context.py +142 -0
  22. kimi_cli-0.35/src/kimi_cli/soul/denwarenji.py +37 -0
  23. kimi_cli-0.35/src/kimi_cli/soul/kimisoul.py +248 -0
  24. kimi_cli-0.35/src/kimi_cli/soul/message.py +76 -0
  25. kimi_cli-0.35/src/kimi_cli/soul/toolset.py +25 -0
  26. kimi_cli-0.35/src/kimi_cli/soul/wire.py +101 -0
  27. kimi_cli-0.35/src/kimi_cli/tools/__init__.py +85 -0
  28. kimi_cli-0.35/src/kimi_cli/tools/bash/__init__.py +97 -0
  29. kimi_cli-0.35/src/kimi_cli/tools/bash/bash.md +31 -0
  30. kimi_cli-0.35/src/kimi_cli/tools/dmail/__init__.py +38 -0
  31. kimi_cli-0.35/src/kimi_cli/tools/dmail/dmail.md +15 -0
  32. kimi_cli-0.35/src/kimi_cli/tools/file/__init__.py +21 -0
  33. kimi_cli-0.35/src/kimi_cli/tools/file/glob.md +17 -0
  34. kimi_cli-0.35/src/kimi_cli/tools/file/glob.py +149 -0
  35. kimi_cli-0.35/src/kimi_cli/tools/file/grep.md +5 -0
  36. kimi_cli-0.35/src/kimi_cli/tools/file/grep.py +285 -0
  37. kimi_cli-0.35/src/kimi_cli/tools/file/patch.md +8 -0
  38. kimi_cli-0.35/src/kimi_cli/tools/file/patch.py +131 -0
  39. kimi_cli-0.35/src/kimi_cli/tools/file/read.md +14 -0
  40. kimi_cli-0.35/src/kimi_cli/tools/file/read.py +139 -0
  41. kimi_cli-0.35/src/kimi_cli/tools/file/replace.md +7 -0
  42. kimi_cli-0.35/src/kimi_cli/tools/file/replace.py +132 -0
  43. kimi_cli-0.35/src/kimi_cli/tools/file/write.md +5 -0
  44. kimi_cli-0.35/src/kimi_cli/tools/file/write.py +107 -0
  45. kimi_cli-0.35/src/kimi_cli/tools/mcp.py +85 -0
  46. kimi_cli-0.35/src/kimi_cli/tools/task/__init__.py +156 -0
  47. kimi_cli-0.35/src/kimi_cli/tools/task/task.md +26 -0
  48. kimi_cli-0.35/src/kimi_cli/tools/test.py +55 -0
  49. kimi_cli-0.35/src/kimi_cli/tools/think/__init__.py +21 -0
  50. kimi_cli-0.35/src/kimi_cli/tools/think/think.md +1 -0
  51. kimi_cli-0.35/src/kimi_cli/tools/todo/__init__.py +27 -0
  52. kimi_cli-0.35/src/kimi_cli/tools/todo/set_todo_list.md +15 -0
  53. kimi_cli-0.35/src/kimi_cli/tools/utils.py +150 -0
  54. kimi_cli-0.35/src/kimi_cli/tools/web/__init__.py +4 -0
  55. kimi_cli-0.35/src/kimi_cli/tools/web/fetch.md +1 -0
  56. kimi_cli-0.35/src/kimi_cli/tools/web/fetch.py +94 -0
  57. kimi_cli-0.35/src/kimi_cli/tools/web/search.md +1 -0
  58. kimi_cli-0.35/src/kimi_cli/tools/web/search.py +126 -0
  59. kimi_cli-0.35/src/kimi_cli/ui/__init__.py +68 -0
  60. kimi_cli-0.35/src/kimi_cli/ui/acp/__init__.py +441 -0
  61. kimi_cli-0.35/src/kimi_cli/ui/print/__init__.py +176 -0
  62. kimi_cli-0.35/src/kimi_cli/ui/shell/__init__.py +326 -0
  63. kimi_cli-0.35/src/kimi_cli/ui/shell/console.py +3 -0
  64. kimi_cli-0.35/src/kimi_cli/ui/shell/liveview.py +158 -0
  65. kimi_cli-0.35/src/kimi_cli/ui/shell/metacmd.py +309 -0
  66. kimi_cli-0.35/src/kimi_cli/ui/shell/prompt.py +574 -0
  67. kimi_cli-0.35/src/kimi_cli/ui/shell/setup.py +192 -0
  68. kimi_cli-0.35/src/kimi_cli/ui/shell/update.py +204 -0
  69. kimi_cli-0.35/src/kimi_cli/utils/changelog.py +101 -0
  70. kimi_cli-0.35/src/kimi_cli/utils/logging.py +18 -0
  71. kimi_cli-0.35/src/kimi_cli/utils/message.py +8 -0
  72. kimi_cli-0.35/src/kimi_cli/utils/path.py +23 -0
  73. kimi_cli-0.35/src/kimi_cli/utils/provider.py +64 -0
  74. kimi_cli-0.35/src/kimi_cli/utils/pyinstaller.py +24 -0
  75. kimi_cli-0.35/src/kimi_cli/utils/string.py +12 -0
kimi_cli-0.35/PKG-INFO ADDED
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.3
2
+ Name: kimi-cli
3
+ Version: 0.35
4
+ Summary: Kimi CLI is your next CLI agent.
5
+ Requires-Dist: agent-client-protocol>=0.4.9
6
+ Requires-Dist: aiofiles>=25.1.0
7
+ Requires-Dist: aiohttp>=3.13.1
8
+ Requires-Dist: click>=8.3.0
9
+ Requires-Dist: kosong>=0.14.1
10
+ Requires-Dist: loguru>=0.7.3
11
+ Requires-Dist: patch-ng>=1.19.0
12
+ Requires-Dist: prompt-toolkit>=3.0.52
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: tenacity>=9.1.2
19
+ Requires-Dist: fastmcp>=2.12.5
20
+ Requires-Dist: pydantic>=2.12.3
21
+ Requires-Python: >=3.13
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Kimi CLI
@@ -0,0 +1 @@
1
+ # Kimi CLI
@@ -0,0 +1,58 @@
1
+ [project]
2
+ name = "kimi-cli"
3
+ version = "0.35"
4
+ description = "Kimi CLI is your next CLI agent."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ dependencies = [
8
+ "agent-client-protocol>=0.4.9",
9
+ "aiofiles>=25.1.0",
10
+ "aiohttp>=3.13.1",
11
+ "click>=8.3.0",
12
+ "kosong>=0.14.1",
13
+ "loguru>=0.7.3",
14
+ "patch-ng>=1.19.0",
15
+ "prompt-toolkit>=3.0.52",
16
+ "pyyaml>=6.0.3",
17
+ "rich>=14.2.0",
18
+ "ripgrepy>=2.2.0",
19
+ "streamingjson>=0.0.5",
20
+ "trafilatura>=2.0.0",
21
+ "tenacity>=9.1.2",
22
+ "fastmcp>=2.12.5",
23
+ "pydantic>=2.12.3",
24
+ ]
25
+
26
+ [dependency-groups]
27
+ dev = [
28
+ "inline-snapshot[black]>=0.30.1",
29
+ "pyinstaller>=6.16.0",
30
+ "pyright>=1.1.406",
31
+ "pytest>=8.4.2",
32
+ "pytest-asyncio>=1.2.0",
33
+ "ruff>=0.14.1",
34
+ ]
35
+
36
+ [build-system]
37
+ requires = ["uv_build>=0.8.5,<0.9.0"]
38
+ build-backend = "uv_build"
39
+
40
+ [tool.uv.build-backend]
41
+ module-name = ["kimi_cli"]
42
+ source-exclude = ["tests/**/*", "src/kimi_cli/deps/**/*"]
43
+
44
+ [project.scripts]
45
+ kimi = "kimi_cli:main"
46
+
47
+ [tool.ruff]
48
+ line-length = 100
49
+
50
+ [tool.ruff.lint]
51
+ select = [
52
+ "E", # pycodestyle
53
+ "F", # Pyflakes
54
+ "UP", # pyupgrade
55
+ "B", # flake8-bugbear
56
+ "SIM", # flake8-simplify
57
+ "I", # isort
58
+ ]
@@ -0,0 +1,304 @@
1
+ # Changelog
2
+
3
+ <!--
4
+ Release notes will be parsed and available as /release-notes
5
+ The parser extracts for each version:
6
+ - a short description (first paragraph after the version header)
7
+ - bullet entries beginning with "- " under that version (across any subsections)
8
+ Internal builds may append content to the Unreleased section.
9
+ Only write entries that are worth mentioning to users.
10
+ -->
11
+
12
+ ## [0.35] - 2025-10-22
13
+
14
+ ### Changed
15
+
16
+ - Minor UI improvements
17
+ - Auto download ripgrep if not found in the system
18
+ - Always approve tool calls in `--print` mode
19
+ - Add `/feedback` meta command
20
+
21
+ ## [0.34] - 2025-10-21
22
+
23
+ ### Added
24
+
25
+ - Add `/update` meta command to check for updates and auto-update in background
26
+ - Support running interactive shell commands in raw shell mode
27
+ - Add `/setup` meta command to setup LLM provider and model
28
+ - Add `/reload` meta command to reload configuration
29
+
30
+ ## [0.33] - 2025-10-18
31
+
32
+ ### Added
33
+
34
+ - Add `/version` meta command
35
+ - Add raw shell mode, which can be switched to by Ctrl-K
36
+ - Show shortcuts in bottom status line
37
+
38
+ ### Fixed
39
+
40
+ - Fix logging redirection
41
+ - Merge duplicated input histories
42
+
43
+ ## [0.32] - 2025-10-16
44
+
45
+ ### Added
46
+
47
+ - Add bottom status line
48
+ - Support file path auto-completion (`@filepath`)
49
+
50
+ ### Fixed
51
+
52
+ - Do not auto-complete meta command in the middle of user input
53
+
54
+ ## [0.31] - 2025-10-14
55
+
56
+ ### Fixed
57
+
58
+ - Fix step interrupting by Ctrl-C, for real
59
+
60
+ ## [0.30] - 2025-10-14
61
+
62
+ ### Added
63
+
64
+ - Add `/compact` meta command to allow manually compacting context
65
+
66
+ ### Fixed
67
+
68
+ - Fix `/clear` meta command when context is empty
69
+
70
+ ## [0.29] - 2025-10-14
71
+
72
+ ### Added
73
+
74
+ - Support Enter key to accept completion in shell mode
75
+ - Remember user input history across sessions in shell mode
76
+ - Add `/reset` meta command as an alias for `/clear`
77
+
78
+ ### Fixed
79
+
80
+ - Fix step interrupting by Ctrl-C
81
+
82
+ ### Changed
83
+
84
+ - Disable `SendDMail` tool in Kimi Koder agent
85
+
86
+ ## [0.28] - 2025-10-13
87
+
88
+ ### Added
89
+
90
+ - Add `/init` meta command to analyze the codebase and generate an `AGENTS.md` file
91
+ - Add `/clear` meta command to clear the context
92
+
93
+ ### Fixed
94
+
95
+ - Fix `ReadFile` output
96
+
97
+ ## [0.27] - 2025-10-11
98
+
99
+ ### Added
100
+
101
+ - Add `--mcp-config-file` and `--mcp-config` options to load MCP configs
102
+
103
+ ### Changed
104
+
105
+ - Rename `--agent` option to `--agent-file`
106
+
107
+ ## [0.26] - 2025-10-11
108
+
109
+ ### Fixed
110
+
111
+ - Fix possible encoding error in `--output-format stream-json` mode
112
+
113
+ ## [0.25] - 2025-10-11
114
+
115
+ ### Changed
116
+
117
+ - Rename package name `ensoul` to `kimi-cli`
118
+ - Rename `ENSOUL_*` builtin system prompt arguments to `KIMI_*`
119
+ - Further decouple `App` with `Soul`
120
+ - Split `Soul` protocol and `KimiSoul` implementation for better modularity
121
+
122
+ ## [0.24] - 2025-10-10
123
+
124
+ ### Fixed
125
+
126
+ - Fix ACP `cancel` method
127
+
128
+ ## [0.23] - 2025-10-09
129
+
130
+ ### Added
131
+
132
+ - Add `extend` field to agent file to support agent file extension
133
+ - Add `exclude_tools` field to agent file to support excluding tools
134
+ - Add `subagents` field to agent file to support defining subagents
135
+
136
+ ## [0.22] - 2025-10-09
137
+
138
+ ### Changed
139
+
140
+ - Improve `SearchWeb` and `FetchURL` tool call visualization
141
+ - Improve search result output format
142
+
143
+ ## [0.21] - 2025-10-09
144
+
145
+ ### Added
146
+
147
+ - Add `--print` option as a shortcut for `--ui print`, `--acp` option as a shortcut for `--ui acp`
148
+ - Support `--output-format stream-json` to print output in JSON format
149
+ - Add `SearchWeb` tool with `services.moonshot_search` configuration. You need to configure it with `"services": {"moonshot_search": {"api_key": "your-search-api-key"}}` in your config file.
150
+ - Add `FetchURL` tool
151
+ - Add `Think` tool
152
+ - Add `PatchFile` tool, not enabled in Kimi Koder agent
153
+ - Enable `SendDMail` and `Task` tool in Kimi Koder agent with better tool prompts
154
+ - Add `ENSOUL_NOW` builtin system prompt argument
155
+
156
+ ### Changed
157
+
158
+ - Better-looking `/release-notes`
159
+ - Improve tool descriptions
160
+ - Improve tool output truncation
161
+
162
+ ## [0.20] - 2025-09-30
163
+
164
+ ### Added
165
+
166
+ - Add `--ui acp` option to start Agent Client Protocol (ACP) server
167
+
168
+ ## [0.19] - 2025-09-29
169
+
170
+ ### Added
171
+
172
+ - Support piped stdin for print UI
173
+ - Support `--input-format=stream-json` for piped JSON input
174
+
175
+ ### Fixed
176
+
177
+ - Do not include `CHECKPOINT` messages in the context when `SendDMail` is not enabled
178
+
179
+ ## [0.18] - 2025-09-29
180
+
181
+ ### Added
182
+
183
+ - Support `max_context_size` in LLM model configurations to configure the maximum context size (in tokens)
184
+
185
+ ### Improved
186
+
187
+ - Improve `ReadFile` tool description
188
+
189
+ ## [0.17] - 2025-09-29
190
+
191
+ ### Fixed
192
+
193
+ - Fix step count in error message when exceeded max steps
194
+ - Fix history file assertion error in `kimi_run`
195
+ - Fix error handling in print mode and single command shell mode
196
+ - Add retry for LLM API connection errors and timeout errors
197
+
198
+ ### Changed
199
+
200
+ - Increase default max-steps-per-run to 100
201
+
202
+ ## [0.16.0] - 2025-09-26
203
+
204
+ ### Tools
205
+
206
+ - Add `SendDMail` tool (disabled in Kimi Koder, can be enabled in custom agent)
207
+
208
+ ### SDK
209
+
210
+ - Session history file can be specified via `_history_file` parameter when creating a new session
211
+
212
+ ## [0.15.0] - 2025-09-26
213
+
214
+ - Improve tool robustness
215
+
216
+ ## [0.14.0] - 2025-09-25
217
+
218
+ ### Added
219
+
220
+ - Add `StrReplaceFile` tool
221
+
222
+ ### Improved
223
+
224
+ - Emphasize the use of the same language as the user
225
+
226
+ ## [0.13.0] - 2025-09-25
227
+
228
+ ### Added
229
+
230
+ - Add `SetTodoList` tool
231
+ - Add `User-Agent` in LLM API calls
232
+
233
+ ### Improved
234
+
235
+ - Better system prompt and tool description
236
+ - Better error messages for LLM
237
+
238
+ ## [0.12.0] - 2025-09-24
239
+
240
+ ### Added
241
+
242
+ - Add `print` UI mode, which can be used via `--ui print` option
243
+ - Add logging and `--debug` option
244
+
245
+ ### Changed
246
+
247
+ - Catch EOF error for better experience
248
+
249
+ ## [0.11.1] - 2025-09-22
250
+
251
+ ### Changed
252
+
253
+ - Rename `max_retry_per_step` to `max_retries_per_step`
254
+
255
+ ## [0.11.0] - 2025-09-22
256
+
257
+ ### Added
258
+
259
+ - Add `/release-notes` command
260
+ - Add retry for LLM API errors
261
+ - Add loop control configuration, e.g. `{"loop_control": {"max_steps_per_run": 50, "max_retry_per_step": 3}}`
262
+
263
+ ### Changed
264
+
265
+ - Better extreme cases handling in `read_file` tool
266
+ - Prevent Ctrl-C from exiting the CLI, force the use of Ctrl-D or `exit` instead
267
+
268
+ ## [0.10.1] - 2025-09-18
269
+
270
+ - Make slash commands look slightly better
271
+ - Improve `glob` tool
272
+
273
+ ## [0.10.0] - 2025-09-17
274
+
275
+ ### Added
276
+
277
+ - Add `read_file` tool
278
+ - Add `write_file` tool
279
+ - Add `glob` tool
280
+ - Add `task` tool
281
+
282
+ ### Changed
283
+
284
+ - Improve tool call visualization
285
+ - Improve session management
286
+ - Restore context usage when `--continue` a session
287
+
288
+ ## [0.9.0] - 2025-09-15
289
+
290
+ - Remove `--session` and `--continue` options
291
+
292
+ ## [0.8.1] - 2025-09-14
293
+
294
+ - Fix config model dumping
295
+
296
+ ## [0.8.0] - 2025-09-14
297
+
298
+ - Add `shell` tool and basic system prompt
299
+ - Add tool call visualization
300
+ - Add context usage count
301
+ - Support interrupting the agent loop
302
+ - Support project-level `AGENTS.md`
303
+ - Support custom agent defined with YAML
304
+ - Support oneshot task via `kimi -c`