Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ local defaults = {
cursor = {},
gemini = {},
grok = {},
kimi = {},
opencode = {},
pi = {},
qwen = {},
Expand Down Expand Up @@ -725,6 +726,7 @@ Sidekick preconfigures popular AI CLIs. Run `:checkhealth sidekick` to see which
| [`cursor`](https://cursor.com/cli) | Cursor CLI agent | See [Cursor docs](https://cursor.com/cli) |
| [`gemini`](https://github.com/google-gemini/gemini-cli) | Google Gemini CLI | See [repo](https://github.com/google-gemini/gemini-cli) |
| [`grok`](https://github.com/superagent-ai/grok-cli) | xAI Grok CLI | See [repo](https://github.com/superagent-ai/grok-cli) |
| [`kimi`](https://github.com/MoonshotAI/kimi-code) | Moonshot Kimi CLI | `npm install -g @moonshot-ai/kimi-code` |
| [`opencode`](https://github.com/sst/opencode) | OpenCode CLI | `npm install -g opencode` |
| [`qwen`](https://github.com/QwenLM/qwen-code) | Alibaba Qwen Code | See [repo](https://github.com/QwenLM/qwen-code) |

Expand Down
1 change: 1 addition & 0 deletions lua/sidekick/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ local defaults = {
cursor = {},
gemini = {},
grok = {},
kimi = {},
opencode = {},
pi = {},
qwen = {},
Expand Down
22 changes: 22 additions & 0 deletions sk/cli/kimi.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---@type sidekick.cli.Config
return {
cmd = { "kimi" },
is_proc = "\\<kimi\\>",
url = "https://github.com/MoonshotAI/kimi-code",
resume = { "--session" },
continue = { "--continue" },
format = function(text)
local Text = require("sidekick.text")

Text.transform(text, function(str)
return str:find("[^%w/_%.%-]") and ('"' .. str .. '"') or str
end, "SidekickLocFile")

local ret = Text.to_string(text)

-- transform line ranges to a format that Kimi Code understands
ret = ret:gsub("@([^@]-) :L(%d+)%-L(%d+)", "@%1#L%2-%3")

return ret
end,
}