Skip to content

Add Kimi as a selectable default coding agent - #7261

Merged
dhh merged 7 commits into
omacom:quattrofrom
sorenmat:add-kimi-agent
Oct 14, 2026
Merged

dhh merged 7 commits into
omacom:quattrofrom
sorenmat:add-kimi-agent

Conversation

@sorenmat

@sorenmat sorenmat commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Kimi Code is missing from Omarchy's coding-agent picker. Add it under Setup → Defaults → Agent and accept kimi or kimi-code through omarchy default agent, using the official npm:@moonshot-ai/kimi-code package through mise.

Provisioning and Refresh Applications recreate the mise wrappers unconditionally, including Kimi, Cursor CLI, and Muse. The Kimi migration creates a lazy launcher only when the command is absent and respects the preinstall opt-out. Migration and Remove Preinstalls preserve independently installed Kimi commands; removal deletes only Omarchy's wrapper.

Interactive launches use kimi --yolo. Initial prompts use Kimi's noninteractive --prompt mode, separately from --yolo, as required by its CLI. The manual and agent/menu coverage include Kimi; usage collection is handled separately by #7274.

Kimi Code (kimi) joins the default agent picker: omarchy-default-agent
installs it through mise as npm:@moonshot-ai/kimi-code, the launcher
runs it with --yolo unattended (falling back to non-interactive
--prompt for initial prompts, since kimi has no interactive-prompt
flag), and the Defaults > Agent menu gains a Kimi entry.
Copilot AI balanced review requested due to automatic review settings August 17, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Kimi as a supported “default coding agent” across the launcher, menu, and shell-based test suite.

Changes:

  • Adds Kimi to the menu definitions and alphabetical agent list assertions.
  • Extends omarchy-default-agent and omarchy-agent to recognize and launch Kimi (and kimi-code alias).
  • Updates default-agent tests to cover selection, package resolution, prompt launch, and permission-bypass behavior for Kimi.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/shell.d/menu-test.sh Updates expected agent set and sorted menu labels to include Kimi
test/shell.d/default-agent-test.sh Adds Kimi package/selection mappings and launch/bypass assertions
default/omarchy/omarchy-menu.jsonc Adds Kimi to the default-agent selection menu
bin/omarchy-default-agent Adds Kimi (and alias) to supported agent parsing + help metadata
bin/omarchy-agent Adds Kimi launch command construction for prompt vs bypass modes

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

install/user/mise.sh gains an omarchy-mise-install entry for
npm:@moonshot-ai/kimi-code, so fresh installs get the ~/.local/bin/kimi
lazy wrapper alongside the other agents. Migration 1786967403 adds the
stub on existing systems, respecting the preinstalls-removed opt-out,
and omarchy-remove-preinstalls deletes it again.
Copilot AI review requested due to automatic review settings August 17, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 9 changed files in this pull request and generated no new comments.

Suppressed comments (1)

migrations/1786967403.sh:3

  • The $HOME path should be quoted to avoid word-splitting/globbing issues in shells (even if uncommon for HOME). Update the file test to use a quoted path, e.g., [[ ! -f \"$HOME/.local/state/omarchy/preinstalls-removed\" ]].
if [[ ! -f $HOME/.local/state/omarchy/preinstalls-removed ]]; then
  omarchy-mise-install npm:@moonshot-ai/kimi-code kimi
fi

@sorenmat

Copy link
Copy Markdown
Contributor Author

Follow-up: #7274 adds a Kimi usage collector, so the agents panel gains a Kimi tab (weekly quota + session limits) through the existing collector discovery.

@kyryl-bogach

Copy link
Copy Markdown

This would be really nice!

# Conflicts:
#	bin/omarchy-default-agent
#	bin/omarchy-remove-preinstalls
#	test/shell.d/default-agent-test.sh
#	test/shell.d/menu-test.sh
dhh and others added 2 commits October 14, 2026 03:50
Setup and migration create a lazy wrapper only when Kimi is missing. Removing preinstalls deletes only the Omarchy mise wrapper, preserving native executables, scripts, and symlinks. Exercise repeated operations with real helpers and a home path containing spaces; keep Kimi after Hermes in the current agent menu.

Co-Authored-By: GPT-6 in Codex <[email protected]>

Co-Authored-By: Codex Medium (GPT-6.1-sol) <[email protected]>
@omarchybot

Copy link
Copy Markdown
Collaborator

Pushed 8ecc34b. The branch now applies cleanly to current quattro. Setup and migration preserve an existing Kimi command, and Remove Preinstalls removes only Omarchy's generated wrapper. Repeated-run regressions cover user scripts, binaries, and symlinks with a HOME containing spaces. Kimi appears after Hermes in the menu.

GPT-6 in Codex reviewed the change and verified it on disposable Omarchy ISO workers. The focused ownership, agent, and menu tests passed, and restoring each faulty source file made its regression fail. The full ./test/all run produced 6,010 passing assertions, with eight of 408 shell test files failing; all eight failures were reproduced on a separately linked clean quattro at 62c5165: ASCII width, branding animation, cold compositor startup, menu guard readers, plugin section validation, screenshot sanity, web-app window class, and WebP background migration. Five checks skipped for unavailable hardware, locale, Kitty, or package fixtures; none concerns Kimi.

The live menu's cold-install path installed the official Kimi 2.1.1 package, saved the default, showed its checkmark, and opened onboarding. Both ordinary and dash-prefixed prompts parsed correctly in an empty home and working directory with networking disabled, then stopped at the expected missing-model error. Authenticated model responses were not exercised. Usage collection remains the separate #7274.

Codex Medium (GPT-6.1-sol) confirmed the installation-ownership findings and reviewed the corrected published head with no actionable findings remaining. Review independence is not guaranteed. Copilot's suppressed HOME-quoting suggestion was rejected: [[ ]] does not perform word splitting, and the preservation tests cover paths with spaces.

The PR description reflects the final implementation. This is awaiting the maintainer's decision.

dhh and others added 2 commits October 14, 2026 04:20
Provisioning and an explicit application refresh restore Omarchy’s lazy wrappers for every tool. Kimi, Cursor CLI, and Muse follow the same policy as the other preinstalls. Keep existing-install protection in migrations and removal, and verify repeated provisioning replaces scripts, binaries, and symlinks consistently.

Co-Authored-By: GPT-6 in Codex <[email protected]>
@omarchybot

Copy link
Copy Markdown
Collaborator

Pushed 4fbcf5b. Provisioning and an explicit Refresh Applications now recreate every mise wrapper unconditionally. Kimi, Cursor CLI, and Muse follow the same policy as the other tools, including replacement of an existing launcher. Automatic Kimi migration and Remove Preinstalls continue preserving independently installed commands.

GPT-6 in Codex verified the revision on a disposable Omarchy ISO worker. Ten provisioning checks exercise real wrapper regeneration over scripts, binaries, and symlinks on repeated runs. Nine Kimi migration/removal checks, 48 default-agent checks, and 161 menu checks passed. Restoring the prior guarded setup makes the regeneration regression fail.

The full ./test/all run produced 6,016 passing assertions, with the same eight baseline failures among 409 shell test files and the same five skipped checks described above. The failing tests and their source are unchanged between the previously tested clean base and current quattro.

Codex Medium (GPT-6.1-sol) reviewed the published head and found no actionable issues. Review independence is not guaranteed. The PR description reflects this consistent setup policy; it is awaiting the maintainer's decision.

@dhh
dhh merged commit 9099461 into omacom:quattro Oct 14, 2026
omarchybot added a commit to mrdavidlaing/omarchy that referenced this pull request Oct 14, 2026
quattro dropped OMARCHY_TEST_MISSING_COMMAND from the install/user/mise.sh source line in default-agent-test.sh when Kimi became a selectable agent (omacom#7261); take its line and keep this branch's resolved-path assertion above it.

quattro's new kimi-agent-test.sh expects the wrapper to call mise twice; the wrapper now asks `mise which kimi` in between, so the expected sequence includes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Codex Medium <[email protected]>
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants