Skip to content

Commit dd28e5f

Browse files
authored
feat(cli): add info command and modularize cli (#563)
Signed-off-by: Richard Chien <[email protected]>
1 parent 6e3c5f9 commit dd28e5f

File tree

22 files changed

+205
-20
lines changed

22 files changed

+205
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Only write entries that are worth mentioning to users.
1414
- ACP: Route file reads/writes and shell commands through ACP clients for synced edits/output
1515
- Shell: Add `/model` slash command to switch default models and reload when using the default config
1616
- Skills: Add `/skill:<name>` slash commands to load `SKILL.md` instructions on demand
17+
- CLI: Add `kimi info` subcommand for version/protocol details (supports `--json`)
1718
- CLI: Add `kimi term` to launch the Toad terminal UI
1819
- Python: Bump the default tooling/CI version to 3.14
1920

docs/.vitepress/config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ export default defineConfig({
7171
text: '参考手册',
7272
items: [
7373
{ text: 'kimi 命令', link: '/zh/reference/kimi-command' },
74-
{ text: 'kimi acp 命令', link: '/zh/reference/kimi-acp' },
74+
{ text: 'kimi info 子命令', link: '/zh/reference/kimi-info' },
75+
{ text: 'kimi acp 子命令', link: '/zh/reference/kimi-acp' },
7576
{ text: 'kimi mcp 子命令', link: '/zh/reference/kimi-mcp' },
76-
{ text: 'kimi term 命令', link: '/zh/reference/kimi-term' },
77+
{ text: 'kimi term 子命令', link: '/zh/reference/kimi-term' },
7778
{ text: '斜杠命令', link: '/zh/reference/slash-commands' },
7879
{ text: '键盘快捷键', link: '/zh/reference/keyboard' },
7980
],
@@ -149,9 +150,10 @@ export default defineConfig({
149150
text: 'Reference',
150151
items: [
151152
{ text: 'kimi Command', link: '/en/reference/kimi-command' },
152-
{ text: 'kimi acp Command', link: '/en/reference/kimi-acp' },
153-
{ text: 'kimi mcp Subcommands', link: '/en/reference/kimi-mcp' },
154-
{ text: 'kimi term Command', link: '/en/reference/kimi-term' },
153+
{ text: 'kimi info Subcommand', link: '/en/reference/kimi-info' },
154+
{ text: 'kimi acp Subcommand', link: '/en/reference/kimi-acp' },
155+
{ text: 'kimi mcp Subcommand', link: '/en/reference/kimi-mcp' },
156+
{ text: 'kimi term Subcommand', link: '/en/reference/kimi-term' },
155157
{ text: 'Slash Commands', link: '/en/reference/slash-commands' },
156158
{ text: 'Keyboard Shortcuts', link: '/en/reference/keyboard' },
157159
],

docs/en/reference/kimi-acp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `kimi acp` Command
1+
# `kimi acp` Subcommand
22

33
The `kimi acp` command starts a multi-session ACP (Agent Client Protocol) server.
44

docs/en/reference/kimi-command.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,11 @@ Thinking mode requires model support. If not specified, uses the last session's
125125
| `--skills-dir PATH` | Specify skills directory (default `~/.kimi/skills`) |
126126

127127
See [Agent Skills](../customization/skills.md) for details.
128+
129+
## Subcommands
130+
131+
| Subcommand | Description |
132+
|------------|-------------|
133+
| [`kimi info`](./kimi-info.md) | Display version and protocol information |
134+
| [`kimi acp`](./kimi-acp.md) | Start multi-session ACP server |
135+
| [`kimi mcp`](./kimi-mcp.md) | Manage MCP server configuration |

docs/en/reference/kimi-info.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# `kimi info` Subcommand
2+
3+
`kimi info` displays version and protocol information for Kimi CLI.
4+
5+
```sh
6+
kimi info [--json]
7+
```
8+
9+
## Options
10+
11+
| Option | Description |
12+
|--------|-------------|
13+
| `--json` | Output in JSON format |
14+
15+
## Output
16+
17+
| Field | Description |
18+
|-------|-------------|
19+
| `kimi_cli_version` | Kimi CLI version number |
20+
| `agent_spec_versions` | List of supported agent spec versions |
21+
| `wire_protocol_version` | Wire protocol version |
22+
| `python_version` | Python runtime version |
23+
24+
## Examples
25+
26+
**Text output**
27+
28+
```sh
29+
$ kimi info
30+
kimi-cli version: 0.70
31+
agent spec versions: 1
32+
wire protocol: 1
33+
python version: 3.13.1
34+
```
35+
36+
**JSON output**
37+
38+
```sh
39+
$ kimi info --json
40+
{"kimi_cli_version": "0.70", "agent_spec_versions": ["1"], "wire_protocol_version": "1", "python_version": "3.13.1"}
41+
```

docs/en/reference/kimi-mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `kimi mcp` Subcommands
1+
# `kimi mcp` Subcommand
22

33
`kimi mcp` is used to manage MCP (Model Context Protocol) server configurations. For concepts and usage of MCP, see [Model Context Protocol](../customization/mcp.md).
44

docs/en/reference/kimi-term.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `kimi term` command
1+
# `kimi term` Subcommand
22

33
The `kimi term` command launches the [Toad](https://github.com/batrachianai/toad) terminal UI, a modern terminal interface built with [Textual](https://textual.textualize.io/).
44

docs/en/release-notes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This page documents the changes in each Kimi CLI release.
77
- ACP: Route file reads/writes and shell commands through ACP clients for synced edits/output
88
- Shell: Add `/model` slash command to switch default models and reload when using the default config
99
- Skills: Add `/skill:<name>` slash commands to load `SKILL.md` instructions on demand
10+
- CLI: Add `kimi info` subcommand for version/protocol details (supports `--json`)
1011
- CLI: Add `kimi term` to launch the Toad terminal UI
1112
- Python: Bump the default tooling/CI version to 3.14
1213

docs/zh/reference/kimi-acp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `kimi acp` 命令
1+
# `kimi acp` 子命令
22

33
`kimi acp` 命令启动一个支持多会话的 ACP (Agent Client Protocol) 服务器。
44

docs/zh/reference/kimi-command.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,11 @@ Thinking 模式需要模型支持。如果不指定,使用上次会话的设
125125
| `--skills-dir PATH` | 指定 skills 目录(默认 `~/.kimi/skills`|
126126

127127
详见 [Agent Skills](../customization/skills.md)
128+
129+
## 子命令
130+
131+
| 子命令 | 说明 |
132+
|--------|------|
133+
| [`kimi info`](./kimi-info.md) | 显示版本和协议信息 |
134+
| [`kimi acp`](./kimi-acp.md) | 启动多会话 ACP 服务器 |
135+
| [`kimi mcp`](./kimi-mcp.md) | 管理 MCP 服务器配置 |

0 commit comments

Comments
 (0)