Skip to content

docs: add Homebrew installation - #531

Merged
liruifengv merged 6 commits into
MoonshotAI:mainfrom
thedavidweng:add-homebrew-install
Jun 8, 2026
Merged

docs: add Homebrew installation#531
liruifengv merged 6 commits into
MoonshotAI:mainfrom
thedavidweng:add-homebrew-install

Conversation

@thedavidweng

@thedavidweng thedavidweng commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Add Homebrew as an installation option for macOS/Linux users in both English and Chinese READMEs.

Homebrew formula is now available in homebrew-core: brew install kimi-code

Closes #130

Add Homebrew as an installation option for macOS/Linux users in both
English and Chinese READMEs.

Closes MoonshotAI#130
@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e9a6545

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

When kimi-code is installed via Homebrew, the update system now detects
the installation source and uses 'brew upgrade kimi-code' instead of
falling back to 'npm install -g'. This prevents duplicate installations
when Homebrew users receive update prompts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 487e653e34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/cli/update/source.ts Outdated
Comment thread apps/kimi-code/src/cli/update/preflight.ts
Comment thread apps/kimi-code/src/cli/update/preflight.ts Outdated
- Only match /cellar/ path segment (not /homebrew/) to avoid false
  positives on Apple Silicon where npm global installs live under
  /opt/homebrew/lib/node_modules/
- Disable background auto-update for Homebrew: brew upgrade may mutate
  dependents silently and the formula can lag behind CDN releases
@liruifengv

Copy link
Copy Markdown
Collaborator

Detection logic looks great — /cellar/ over /homebrew/ correctly avoids the Apple Silicon npm false positive, and disabling auto-install in favor of a manual brew upgrade prompt is the right call.

One miss: InstallSource gained 'homebrew', but the Zod enum in apps/kimi-code/src/cli/update/install-state.ts wasn't updated to match (the z.ZodType annotation won't flag it — Zod output types
are covariant, so CI stays green). It's harmless today since 'homebrew' never gets persisted (auto-install is disabled), but worth adding the one line to keep the schema in sync and avoid a silent state reset
if auto-install is ever enabled for Homebrew later.

Otherwise LGTM 👍

@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@027f156
npx https://pkg.pr.new/@moonshot-ai/kimi-code@027f156

commit: 027f156

Keeps the persistence schema in sync with the TypeScript type. Currently
harmless since Homebrew auto-install is disabled, but prevents a silent
state reset if it is ever enabled later.
@thedavidweng

Copy link
Copy Markdown
Contributor Author

Detection logic looks great — /cellar/ over /homebrew/ correctly avoids the Apple Silicon npm false positive, and disabling auto-install in favor of a manual brew upgrade prompt is the right call.

One miss: InstallSource gained 'homebrew', but the Zod enum in apps/kimi-code/src/cli/update/install-state.ts wasn't updated to match (the z.ZodType annotation won't flag it — Zod output types are covariant, so CI stays green). It's harmless today since 'homebrew' never gets persisted (auto-install is disabled), but worth adding the one line to keep the schema in sync and avoid a silent state reset if auto-install is ever enabled for Homebrew later.

Otherwise LGTM 👍

Thanks for reviewing, added.

@thedavidweng thedavidweng changed the title docs: add Homebrew installation instructions docs: add Homebrew installation Jun 8, 2026
@liruifengv
liruifengv merged commit b47734c into MoonshotAI:main Jun 8, 2026
@github-actions github-actions Bot mentioned this pull request Jun 8, 2026
@thedavidweng
thedavidweng deleted the add-homebrew-install branch June 8, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

submit to Homebrew core

2 participants