From 4fc4f19f89c1126c4a9a9b5b9ffaa5c4e8999e42 Mon Sep 17 00:00:00 2001 From: Kaiyi Date: Mon, 21 Sep 2026 22:26:58 +0800 Subject: [PATCH 1/2] chore: archive kimi-cli and point users to Kimi Code CLI --- .agents/skills/release/SKILL.md | 4 +- CHANGELOG.md | 5 ++ CONTRIBUTING.md | 28 ++------- README.md | 63 +++++++++++++++++--- SECURITY.md | 7 +-- docs/.vitepress/theme/EvolutionBanner.vue | 15 +++-- docs/en/guides/getting-started.md | 4 ++ docs/en/release-notes/breaking-changes.md | 7 +++ docs/en/release-notes/changelog.md | 7 +++ docs/zh/guides/getting-started.md | 4 ++ docs/zh/release-notes/breaking-changes.md | 7 +++ docs/zh/release-notes/changelog.md | 7 +++ flake.nix | 7 --- packages/kaos/README.md | 3 + packages/kimi-code/README.md | 29 ++++++++- packages/kimi-code/pyproject.toml | 12 +++- packages/kimi-code/src/kimi_code/__init__.py | 28 ++++++++- packages/kosong/README.md | 3 + pyproject.toml | 8 ++- sdks/kimi-sdk/README.md | 3 + tests/test_kimi_code_tombstone.py | 32 ++++++++++ uv.lock | 6 -- 22 files changed, 224 insertions(+), 65 deletions(-) mode change 120000 => 100644 packages/kimi-code/README.md create mode 100644 tests/test_kimi_code_tombstone.py diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md index 63f915203d..c73bc22ee5 100644 --- a/.agents/skills/release/SKILL.md +++ b/.agents/skills/release/SKILL.md @@ -33,7 +33,7 @@ The Rust implementation (`kagent`) lives in a separate repository and is **not** - Update `breaking-changes.md` in both languages if there are breaking changes. - If bumping `packages/kosong` or `packages/kaos`, also update the root `pyproject.toml` pinned dependency (`kosong[contrib]==` or `pykaos==`) so root validation keeps passing. -6. **Sync the `kimi-code` wrapper when the root version changes.** Bump `packages/kimi-code/pyproject.toml` `version` and its `kimi-cli==` dependency to match the new root version. +6. **Sync the `kimi-code` wrapper when the root version changes.** Bump `packages/kimi-code/pyproject.toml` `version` to match the new root version. It is a legacy stub with no dependencies — do not add a `kimi-cli` pin back. 7. **Run `uv sync`** to refresh the lockfile. @@ -41,7 +41,7 @@ The Rust implementation (`kagent`) lives in a separate repository and is **not** 9. **Confirm with the user before opening the PR.** Summarize the staged changes and ask the user to explicitly confirm: - **Version numbers** — every updated `pyproject.toml` (changed package + `packages/kimi-code` if the root moved) reflects the version agreed in step 3. - - **Dependency pins** — the root `pyproject.toml` pins (`kosong[contrib]==`, `pykaos==`) and `packages/kimi-code`'s `kimi-cli==` match the bumped versions. + - **Dependency pins** — the root `pyproject.toml` pins (`kosong[contrib]==`, `pykaos==`) match the bumped versions. - **Documentation** — CHANGELOG entries are added below `## Unreleased` (Unreleased still present and empty), `breaking-changes.md` is updated in both languages if applicable, and `gen-docs` left no inconsistencies. Wait for explicit user approval before proceeding. If the user flags anything, fix it and re-confirm — do not push. diff --git a/CHANGELOG.md b/CHANGELOG.md index 274994c8c4..cce354eeef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ Only write entries that are worth mentioning to users. ## Unreleased +**Highlights**: Kimi CLI is archived and no longer maintained, and this is the final release. Please migrate to [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code); see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration) + +- Build: Mark `kimi-cli` and all packages in this repository as archived — no further releases, bug fixes, or security updates are planned +- Build: Stop installing the legacy CLI from the `kimi-code` package on PyPI — running `kimi-code` now prints instructions for installing the new Kimi Code CLI and exits with status 1 + ## 1.50.0 (2026-09-02) - Kosong: Stop sending an empty `anthropic-beta` header when no beta features are declared — adaptive thinking removes the interleaved-thinking beta, which previously left an empty header value that some backends reject diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be3d72672e..9bac3a522f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,27 +1,7 @@ -# Contributing to Kimi Code CLI +# Contributing -Thank you for being interested in contributing to Kimi Code CLI! +This repository has been archived and no longer accepts issues or pull requests. -We welcome all kinds of contributions, including bug fixes, features, document improvements, typo fixes, etc. To maintain a high-quality codebase and user experience, we provide the following guidelines for contributions: +If you would like to contribute, please head over to [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) and read its contributing guide ([English](https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.md) | [中文](https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.zh-CN.md)). -1. We only merge pull requests that align with our roadmap. For any pull request that introduces changes larger than 100 lines of code, we highly recommend discussing with us by [raising an issue](https://github.com/MoonshotAI/kimi-cli/issues) or in an existing issue before you start working on it. Otherwise your pull request may be closed or ignored without review. -2. We insist on high code quality. Please ensure your code is as good as, if not better than, the code written by frontier coding agents. Changes may be requested before your pull request can be merged. - -## Prek hooks - -We use [prek](https://github.com/j178/prek) to run formatting and checks via git hooks. - -Recommended setup: -1. Run `make prepare` to sync dependencies and install the prek hooks. -2. Optionally run on all files before sending a PR: `prek run --all-files`. - -Manual setup (if you do not want to use `make prepare`): -1. Install prek (pick one): `uv tool install prek`, `pipx install prek`, or `pip install prek`. -2. Install the hooks in this repo: `prek install`. - -After installation, the hooks run on every commit. The repo uses prek workspace mode, so only the -projects with changed files run their hooks. You can skip them for an intermediate commit with -`git commit --no-verify`, or run them manually with `prek run --all-files`. - -The hooks execute the relevant `make format-*` and `make check-*` targets, so ensure dependencies -are installed (`make prepare` or `uv sync`). +Thank you to everyone who contributed to Kimi CLI. diff --git a/README.md b/README.md index 44bbde6d25..69c433bbb5 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,58 @@ -# Kimi CLI +# Kimi CLI (Archived) -[![Commit Activity](https://img.shields.io/github/commit-activity/w/MoonshotAI/kimi-cli)](https://github.com/MoonshotAI/kimi-cli/graphs/commit-activity) -[![Checks](https://img.shields.io/github/check-runs/MoonshotAI/kimi-cli/main)](https://github.com/MoonshotAI/kimi-cli/actions) -[![Version](https://img.shields.io/pypi/v/kimi-cli)](https://pypi.org/project/kimi-cli/) -[![Downloads](https://img.shields.io/pypi/dw/kimi-cli)](https://pypistats.org/packages/kimi-cli) -[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MoonshotAI/kimi-cli) +[Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) | [Migration Guide](https://moonshotai.github.io/kimi-code/en/guides/migration) | [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) | [Legacy Docs](https://moonshotai.github.io/kimi-cli/en/) -[Kimi Code](https://www.kimi.com/code/) | [Documentation](https://moonshotai.github.io/kimi-cli/en/) | [文档](https://moonshotai.github.io/kimi-cli/zh/) +> [!CAUTION] +> **This project has been archived and is no longer maintained.** Kimi CLI (Python) has been replaced by **[Kimi Code CLI](https://github.com/MoonshotAI/kimi-code)**, the next-generation terminal AI agent from the same team. +> +> - This repository is read-only. There will be no further releases, bug fixes, or security updates. +> - Existing installations are no longer supported and will stop working. Please migrate as soon as possible. +> - Please file issues, feature requests, and security reports for Kimi Code CLI at [MoonshotAI/kimi-code](https://github.com/MoonshotAI/kimi-code). +> +> 本项目已归档,不再维护。Python 版 Kimi CLI 已由 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) 取代,旧版将无法继续使用,请参考[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)尽快升级。 -> [!IMPORTANT] -> **Kimi CLI is evolving into [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code)** — the next-generation terminal AI agent from the same team. Installing Kimi Code CLI automatically migrates your configuration and sessions. This project will be gradually wound down; the docs and existing installations remain available. +## Migrate to Kimi Code CLI + +1. Install Kimi Code CLI: + + ```sh + # macOS / Linux + curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash + ``` + + ```powershell + # Windows (PowerShell) + irm https://code.kimi.com/kimi-code/install.ps1 | iex + ``` + + Also available via Homebrew (`brew install kimi-code`) and npm (`npm install -g @moonshot-ai/kimi-code`). + +2. Open a new terminal and run `kimi`. On first launch, it detects your Kimi CLI data in `~/.kimi/` and offers to migrate your config, MCP servers, input history, and sessions. You can also run `kimi migrate` at any time. Your original data in `~/.kimi/` is never modified or deleted. +3. Run `/login` again, and re-authorize your MCP servers. Login credentials, MCP authorizations, and Kimi CLI plugins are not migrated. +4. Uninstall the legacy CLI after migrating, e.g. `uv tool uninstall kimi-cli` or `brew uninstall kimi-cli`. + +See the full [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration) for details. + +## Packages in this repository + +All packages below are archived together with this repository. Published versions remain on PyPI, but will not receive any further updates. + +| Package | Status | +|---|---| +| [`kimi-cli`](https://pypi.org/project/kimi-cli/) | Archived. Replaced by Kimi Code CLI | +| [`kimi-code`](https://pypi.org/project/kimi-code/) on PyPI | Archived. A legacy alias of `kimi-cli`, **not** the new Kimi Code CLI | +| [`kosong`](https://pypi.org/project/kosong/) | Archived | +| [`pykaos`](https://pypi.org/project/pykaos/) | Archived | +| [`kimi-sdk`](https://pypi.org/project/kimi-sdk/) | Archived | + +## License + +The source code remains available under the [Apache License 2.0](LICENSE). + +Thank you to everyone who used Kimi CLI, reported issues, and contributed code. Your feedback shaped Kimi Code CLI. + +
+Original README (legacy, for reference only) Kimi CLI is an AI agent that runs in the terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute shell commands, search and fetch web pages, and autonomously plan and adjust actions during execution. @@ -175,3 +218,5 @@ make help # show all make targets ``` Note: `make build` and `make build-bin` automatically run `make build-web` to embed the web UI. + +
diff --git a/SECURITY.md b/SECURITY.md index 037c06dcc0..8b7058f4cc 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,9 +1,8 @@ # Security Policy -## Supported Versions - -Currently, Kimi CLI only provides security support for the latest version. +This project has been archived and is no longer maintained. **No version of Kimi CLI (Python), kosong, pykaos, or kimi-sdk receives security updates.** We strongly recommend migrating to [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code). See the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration). ## Reporting a Vulnerability -Please report a vulnerability via the [MoonshotAI/kimi-cli - Security](https://github.com/MoonshotAI/kimi-cli/security) page, or open an [issue](https://github.com/MoonshotAI/kimi-cli/issues) if it can be published publicly. +- For vulnerabilities in Kimi Code CLI, please follow its [security policy](https://github.com/MoonshotAI/kimi-code/security/policy). +- Vulnerabilities that affect only this archived project will not be fixed. If you believe an issue also affects Kimi Code CLI or other Moonshot AI services, please report it privately through the channel above, or email code@moonshot.ai with "[security]" in the subject. diff --git a/docs/.vitepress/theme/EvolutionBanner.vue b/docs/.vitepress/theme/EvolutionBanner.vue index 6f4d9be9b9..a7634acac0 100644 --- a/docs/.vitepress/theme/EvolutionBanner.vue +++ b/docs/.vitepress/theme/EvolutionBanner.vue @@ -2,8 +2,8 @@ import { useData } from 'vitepress' import { computed, onMounted, onUnmounted, ref, watch } from 'vue' -const STORAGE_KEY = 'kimi-cli-evolution-banner-dismissed' -const TARGET_URL = 'https://github.com/MoonshotAI/kimi-code' +// Renamed when the project was archived so that previously dismissed banners show again. +const STORAGE_KEY = 'kimi-cli-archived-banner-dismissed' const HTML_CLASS = 'has-evolution-banner' const { lang } = useData() @@ -41,8 +41,13 @@ function dismiss() { const isZh = computed(() => lang.value.startsWith('zh')) const message = computed(() => isZh.value - ? 'Kimi Code CLI 重构升级版已发布,迭代更快 了解更多➡️' - : 'Kimi Code CLI rebuilt & upgraded version released — faster iterations. Learn more ➡️', + ? 'Kimi CLI 已归档,旧版将无法继续使用,请迁移至 Kimi Code CLI ➡️' + : 'Kimi CLI is archived and will stop working. Please migrate to Kimi Code CLI ➡️', +) +const targetUrl = computed(() => + isZh.value + ? 'https://moonshotai.github.io/kimi-code/zh/guides/migration' + : 'https://moonshotai.github.io/kimi-code/en/guides/migration', ) const closeLabel = computed(() => (isZh.value ? '关闭' : 'Dismiss')) @@ -51,7 +56,7 @@ const closeLabel = computed(() => (isZh.value ? '关闭' : 'Dismiss'))
diff --git a/docs/en/guides/getting-started.md b/docs/en/guides/getting-started.md index 50420ea7f6..d9fe5513a3 100644 --- a/docs/en/guides/getting-started.md +++ b/docs/en/guides/getting-started.md @@ -1,5 +1,9 @@ # Getting Started +::: danger This project is archived +Kimi CLI is no longer maintained and will stop working. It receives no further updates or security fixes. Please install [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) instead; see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration). +::: + ## What is Kimi Code CLI Kimi Code CLI is an AI agent that runs in the terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute shell commands, search and fetch web pages, and autonomously plan and adjust actions during execution. diff --git a/docs/en/release-notes/breaking-changes.md b/docs/en/release-notes/breaking-changes.md index 8de129b665..a52b4409c3 100644 --- a/docs/en/release-notes/breaking-changes.md +++ b/docs/en/release-notes/breaking-changes.md @@ -4,6 +4,13 @@ This page documents breaking changes in Kimi Code CLI releases and provides migr ## Unreleased +### The `kimi-code` package on PyPI no longer installs Kimi CLI + +The `kimi-code` package on PyPI used to be an alias of Kimi CLI. It is now a stub that only prints instructions for installing the new Kimi Code CLI and exits with status 1. Kimi CLI itself is archived and no longer maintained. + +- **Affected**: Users who installed Kimi CLI through the `kimi-code` package on PyPI (for example `uv tool install kimi-code`) +- **Migration**: Install Kimi Code CLI with `curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash` (Windows: `irm https://code.kimi.com/kimi-code/install.ps1 | iex`), then run `kimi migrate` to migrate your config and sessions. See the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration) + ## 1.49.0 ### Kimi no longer sends legacy `reasoning_effort` automatically diff --git a/docs/en/release-notes/changelog.md b/docs/en/release-notes/changelog.md index 055688133c..476cf359bc 100644 --- a/docs/en/release-notes/changelog.md +++ b/docs/en/release-notes/changelog.md @@ -4,6 +4,13 @@ This page documents the changes in each Kimi Code CLI release. ## Unreleased +**Highlights**: Kimi CLI is archived and no longer maintained, and this is the final release. Please migrate to [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code); see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration) + +- Build: Mark `kimi-cli` and all packages in this repository as archived — no further releases, bug fixes, or security updates are planned +- Build: Stop installing the legacy CLI from the `kimi-code` package on PyPI — running `kimi-code` now prints instructions for installing the new Kimi Code CLI and exits with status 1 + +## 1.50.0 (2026-09-02) + - Kosong: Stop sending an empty `anthropic-beta` header when no beta features are declared — adaptive thinking removes the interleaved-thinking beta, which previously left an empty header value that some backends reject ## 1.49.0 (2026-07-16) diff --git a/docs/zh/guides/getting-started.md b/docs/zh/guides/getting-started.md index c54f106705..97764802b8 100644 --- a/docs/zh/guides/getting-started.md +++ b/docs/zh/guides/getting-started.md @@ -1,5 +1,9 @@ # 开始使用 +::: danger 本项目已归档 +Kimi CLI 已停止维护,不再提供任何更新和安全修复,旧版将无法继续使用。请改为安装 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)。 +::: + ## Kimi Code CLI 是什么 Kimi Code CLI 是一个运行在终端中的 AI Agent,帮助你完成软件开发任务和终端操作。它可以阅读和编辑代码、执行 Shell 命令、搜索和抓取网页,并在执行过程中自主规划和调整行动。 diff --git a/docs/zh/release-notes/breaking-changes.md b/docs/zh/release-notes/breaking-changes.md index 7eea79ffa8..699ad2a221 100644 --- a/docs/zh/release-notes/breaking-changes.md +++ b/docs/zh/release-notes/breaking-changes.md @@ -4,6 +4,13 @@ ## 未发布 +### PyPI 上的 `kimi-code` 包不再安装 Kimi CLI + +PyPI 上的 `kimi-code` 包原本是 Kimi CLI 的别名,现在改为一个占位包:运行时只打印新版 Kimi Code CLI 的安装说明,并以状态码 1 退出。Kimi CLI 本身已归档,不再维护。 + +- **受影响**:通过 PyPI 上的 `kimi-code` 包安装 Kimi CLI 的用户(例如 `uv tool install kimi-code`) +- **迁移**:使用 `curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash`(Windows:`irm https://code.kimi.com/kimi-code/install.ps1 | iex`)安装 Kimi Code CLI,然后运行 `kimi migrate` 迁移配置和会话。详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) + ## 1.49.0 ### Kimi 不再自动发送旧版 `reasoning_effort` diff --git a/docs/zh/release-notes/changelog.md b/docs/zh/release-notes/changelog.md index 3202ae71b2..8a94530d15 100644 --- a/docs/zh/release-notes/changelog.md +++ b/docs/zh/release-notes/changelog.md @@ -4,6 +4,13 @@ ## 未发布 +**亮点**:Kimi CLI 已归档,不再维护,这是最后一个版本。请迁移至 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) + +- Build:将 `kimi-cli` 及本仓库中的所有包标记为已归档——此后不再发布新版本、Bug 修复或安全更新 +- Build:PyPI 上的 `kimi-code` 包不再安装旧版 CLI——运行 `kimi-code` 时改为打印新版 Kimi Code CLI 的安装说明,并以状态码 1 退出 + +## 1.50.0 (2026-09-02) + - Kosong:当没有声明任何 beta 特性时不再发送值为空的 `anthropic-beta` 请求头——adaptive thinking 会移除 interleaved-thinking beta,此前会留下一个空值请求头,部分后端会拒绝该请求 ## 1.49.0 (2026-07-16) diff --git a/flake.nix b/flake.nix index 4fff6a9191..a9dfa21655 100644 --- a/flake.nix +++ b/flake.nix @@ -70,13 +70,6 @@ ripgrepy = prev.ripgrepy.overrideAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.setuptools ]; }); - # Replace README symlink with real file for Nix builds. - "kimi-code" = prev."kimi-code".overrideAttrs (old: { - postPatch = (old.postPatch or "") + '' - rm -f README.md - cp ${./README.md} README.md - ''; - }); }; pythonSet = (callPackage pyproject-nix.build.packages { inherit python; }).overrideScope ( lib.composeManyExtensions [ diff --git a/packages/kaos/README.md b/packages/kaos/README.md index ed117b40b6..0d9112a7ee 100644 --- a/packages/kaos/README.md +++ b/packages/kaos/README.md @@ -1,3 +1,6 @@ # PyKAOS +> [!CAUTION] +> **Archived: no longer maintained.** This package was developed in the [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) monorepo, which has been archived. Published versions remain available on PyPI, but there will be no further releases, bug fixes, or security updates. The source code remains available under the Apache License 2.0. + PyKAOS is a lightweight Python library providing an abstraction layer for agents to interact with operating systems. File operations and command executions via KAOS can be easily switched between local environment and remote systems over SSH. diff --git a/packages/kimi-code/README.md b/packages/kimi-code/README.md deleted file mode 120000 index fe84005413..0000000000 --- a/packages/kimi-code/README.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/packages/kimi-code/README.md b/packages/kimi-code/README.md new file mode 100644 index 0000000000..eb70b6d6bd --- /dev/null +++ b/packages/kimi-code/README.md @@ -0,0 +1,28 @@ +# kimi-code (PyPI): legacy package, archived + +> [!CAUTION] +> **This PyPI package is NOT the new Kimi Code CLI.** It is a legacy alias of the archived Python [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) and is no longer maintained. +> +> PyPI 上的 `kimi-code` 是已归档的旧版 Python Kimi CLI 的别名包,**不是**新版 Kimi Code CLI。 + +## Install the new Kimi Code CLI + +```sh +# macOS / Linux +curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash +``` + +```powershell +# Windows (PowerShell) +irm https://code.kimi.com/kimi-code/install.ps1 | iex +``` + +Also available via Homebrew (`brew install kimi-code`) and npm (`npm install -g @moonshot-ai/kimi-code`). + +Then uninstall this package: `uv tool uninstall kimi-code` (or `pip uninstall kimi-code`). + +Migration guide: [English](https://moonshotai.github.io/kimi-code/en/guides/migration) | [中文](https://moonshotai.github.io/kimi-code/zh/guides/migration) + +## Note for existing users + +Starting from 1.51.0, running `kimi-code` from this package only prints the instructions above. The legacy CLI it used to install is no longer supported and will stop working, so please migrate to Kimi Code CLI. diff --git a/packages/kimi-code/pyproject.toml b/packages/kimi-code/pyproject.toml index 1e60cccf08..53575d52d4 100644 --- a/packages/kimi-code/pyproject.toml +++ b/packages/kimi-code/pyproject.toml @@ -1,13 +1,19 @@ [project] name = "kimi-code" version = "1.50.0" -description = "Kimi Code is a CLI agent that lives in your terminal." +description = "[Archived] Legacy PyPI package, NOT the new Kimi Code CLI. Install Kimi Code CLI from https://github.com/MoonshotAI/kimi-code" readme = "README.md" requires-python = ">=3.12" -dependencies = ["kimi-cli==1.50.0"] +classifiers = ["Development Status :: 7 - Inactive"] +dependencies = [] + +[project.urls] +"Kimi Code CLI" = "https://github.com/MoonshotAI/kimi-code" +"Migration Guide" = "https://moonshotai.github.io/kimi-code/en/guides/migration" +Source = "https://github.com/MoonshotAI/kimi-cli" [project.scripts] -kimi-code = "kimi_cli.__main__:main" +kimi-code = "kimi_code:main" [build-system] requires = ["uv_build>=0.8.5,<0.10.0"] diff --git a/packages/kimi-code/src/kimi_code/__init__.py b/packages/kimi-code/src/kimi_code/__init__.py index 766d8b1a8f..3a187306f3 100644 --- a/packages/kimi-code/src/kimi_code/__init__.py +++ b/packages/kimi-code/src/kimi_code/__init__.py @@ -1,7 +1,29 @@ +"""Legacy `kimi-code` package on PyPI. + +This package used to be an alias of the Python Kimi CLI, which has been archived. +It is NOT the new Kimi Code CLI; running it only prints how to install the new one. +""" + from __future__ import annotations -import importlib import sys -# Alias the kimi_code package to kimi_cli for compatibility. -sys.modules[__name__] = importlib.import_module("kimi_cli") +MESSAGE = """\ +kimi-code on PyPI is a legacy package and is no longer maintained. +It is NOT the new Kimi Code CLI. + +Install Kimi Code CLI: + macOS / Linux: curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash + Windows: irm https://code.kimi.com/kimi-code/install.ps1 | iex + +Then uninstall this package: uv tool uninstall kimi-code (or: pip uninstall kimi-code) +Migration guide: https://moonshotai.github.io/kimi-code/en/guides/migration + +PyPI 上的 kimi-code 是已停止维护的旧版包,并不是新版 Kimi Code CLI。 +请使用上面的命令安装新版。迁移指南:https://moonshotai.github.io/kimi-code/zh/guides/migration +""" + + +def main() -> int: + print(MESSAGE, file=sys.stderr) + return 1 diff --git a/packages/kosong/README.md b/packages/kosong/README.md index 5a4eb24541..4b818b9095 100644 --- a/packages/kosong/README.md +++ b/packages/kosong/README.md @@ -1,5 +1,8 @@ # Kosong +> [!CAUTION] +> **Archived: no longer maintained.** This package was developed in the [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) monorepo, which has been archived. Published versions remain available on PyPI, but there will be no further releases, bug fixes, or security updates. The source code remains available under the Apache License 2.0. + Kosong is an LLM abstraction layer designed for modern AI agent applications. It unifies message structures, asynchronous tool orchestration, and pluggable chat providers so you can build agents with ease and avoid vendor lock-in. > Kosong means "empty" in Malay and Indonesian. diff --git a/pyproject.toml b/pyproject.toml index b9fa9bf6da..7ab4d803e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,10 @@ [project] name = "kimi-cli" version = "1.50.0" -description = "Kimi Code CLI is your next CLI agent." +description = "[Archived] Legacy Python Kimi CLI, no longer maintained. Use Kimi Code CLI instead: https://github.com/MoonshotAI/kimi-code" readme = "README.md" requires-python = ">=3.12" +classifiers = ["Development Status :: 7 - Inactive"] dependencies = [ "agent-client-protocol==0.8.0", "aiofiles>=24.0,<26.0", @@ -38,6 +39,11 @@ dependencies = [ "setproctitle>=1.3.0", ] +[project.urls] +"Kimi Code CLI" = "https://github.com/MoonshotAI/kimi-code" +"Migration Guide" = "https://moonshotai.github.io/kimi-code/en/guides/migration" +Source = "https://github.com/MoonshotAI/kimi-cli" + [dependency-groups] dev = [ "pyinstaller==6.18.0", diff --git a/sdks/kimi-sdk/README.md b/sdks/kimi-sdk/README.md index 01ac1c23ec..730d9ad0f9 100644 --- a/sdks/kimi-sdk/README.md +++ b/sdks/kimi-sdk/README.md @@ -1,5 +1,8 @@ # Kimi SDK +> [!CAUTION] +> **Archived: no longer maintained.** This package was developed in the [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) monorepo, which has been archived. Published versions remain available on PyPI, but there will be no further releases, bug fixes, or security updates. The source code remains available under the Apache License 2.0. + Kimi SDK provides a convenient way to access the Kimi API and build agent workflows in Python. ## Installation diff --git a/tests/test_kimi_code_tombstone.py b/tests/test_kimi_code_tombstone.py new file mode 100644 index 0000000000..eb9d67c81f --- /dev/null +++ b/tests/test_kimi_code_tombstone.py @@ -0,0 +1,32 @@ +"""Tests for the legacy `kimi-code` PyPI package (packages/kimi-code).""" + +from __future__ import annotations + +import tomllib +from pathlib import Path + +import kimi_code +import pytest + +KIMI_CODE_PYPROJECT = Path(__file__).parents[1] / "packages" / "kimi-code" / "pyproject.toml" + + +def test_kimi_code_is_not_an_alias_of_kimi_cli() -> None: + assert kimi_code.__name__ == "kimi_code" + + +def test_main_prints_install_instructions_and_fails(capsys: pytest.CaptureFixture[str]) -> None: + assert kimi_code.main() == 1 + + err = capsys.readouterr().err + assert "NOT the new Kimi Code CLI" in err + assert "curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash" in err + assert "irm https://code.kimi.com/kimi-code/install.ps1 | iex" in err + assert "https://moonshotai.github.io/kimi-code/en/guides/migration" in err + + +def test_package_no_longer_installs_legacy_cli() -> None: + project = tomllib.loads(KIMI_CODE_PYPROJECT.read_text(encoding="utf-8"))["project"] + + assert project["dependencies"] == [] + assert project["scripts"] == {"kimi-code": "kimi_code:main"} diff --git a/uv.lock b/uv.lock index 2a7c7a83d2..d82977593f 100644 --- a/uv.lock +++ b/uv.lock @@ -1376,12 +1376,6 @@ dev = [ name = "kimi-code" version = "1.50.0" source = { editable = "packages/kimi-code" } -dependencies = [ - { name = "kimi-cli" }, -] - -[package.metadata] -requires-dist = [{ name = "kimi-cli", editable = "." }] [[package]] name = "kimi-sdk" From 43604dce375c2ec376ae0f6ba0c2e7a3f1ae1e4c Mon Sep 17 00:00:00 2001 From: Kaiyi Date: Mon, 21 Sep 2026 23:04:32 +0800 Subject: [PATCH 2/2] chore: address review feedback on archive notices --- .github/workflows/ci-kimi-cli.yml | 17 -------- README.md | 2 +- docs/.vitepress/theme/EvolutionBanner.vue | 7 ++- docs/en/guides/getting-started.md | 44 ++++--------------- docs/en/index.md | 6 +-- docs/zh/guides/getting-started.md | 45 ++++---------------- docs/zh/index.md | 6 +-- docs/zh/release-notes/breaking-changes.md | 2 +- docs/zh/release-notes/changelog.md | 2 +- packages/kimi-code/README.md | 2 +- packages/kimi-code/src/kimi_code/__init__.py | 2 +- tests/test_kimi_code_tombstone.py | 2 + 12 files changed, 35 insertions(+), 102 deletions(-) diff --git a/.github/workflows/ci-kimi-cli.yml b/.github/workflows/ci-kimi-cli.yml index 6b4267d16d..b180196aa3 100644 --- a/.github/workflows/ci-kimi-cli.yml +++ b/.github/workflows/ci-kimi-cli.yml @@ -239,23 +239,6 @@ jobs: --pyproject packages/kimi-code/pyproject.toml \ --expected-version "${{ steps.version.outputs.head_version }}" - - name: Check kimi-code dependency pin - if: steps.version.outputs.bump == 'true' - shell: python - run: | - import tomllib - from pathlib import Path - - expected_version = "${{ steps.version.outputs.head_version }}" - data = tomllib.loads(Path("packages/kimi-code/pyproject.toml").read_text()) - deps = data["project"]["dependencies"] - expected = f"kimi-cli=={expected_version}" - if expected not in deps: - raise SystemExit( - "kimi-code must depend on " - f"{expected}, got: {deps}" - ) - nix-test: strategy: fail-fast: true diff --git a/README.md b/README.md index 69c433bbb5..b49152e213 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ > - Existing installations are no longer supported and will stop working. Please migrate as soon as possible. > - Please file issues, feature requests, and security reports for Kimi Code CLI at [MoonshotAI/kimi-code](https://github.com/MoonshotAI/kimi-code). > -> 本项目已归档,不再维护。Python 版 Kimi CLI 已由 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) 取代,旧版将无法继续使用,请参考[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)尽快升级。 +> 本项目已归档,不再维护。Python 版 Kimi CLI 已由 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) 取代,旧版将无法继续使用,请参考 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) 尽快升级。 ## Migrate to Kimi Code CLI diff --git a/docs/.vitepress/theme/EvolutionBanner.vue b/docs/.vitepress/theme/EvolutionBanner.vue index a7634acac0..7c492a788c 100644 --- a/docs/.vitepress/theme/EvolutionBanner.vue +++ b/docs/.vitepress/theme/EvolutionBanner.vue @@ -17,7 +17,12 @@ function applyHtmlClass(active: boolean) { } onMounted(() => { - dismissed.value = localStorage.getItem(STORAGE_KEY) === '1' + try { + dismissed.value = localStorage.getItem(STORAGE_KEY) === '1' + } catch { + // Storage blocked by browser settings: keep showing the archive notice. + dismissed.value = false + } hydrated.value = true }) diff --git a/docs/en/guides/getting-started.md b/docs/en/guides/getting-started.md index d9fe5513a3..a7f23b9d1d 100644 --- a/docs/en/guides/getting-started.md +++ b/docs/en/guides/getting-started.md @@ -1,7 +1,7 @@ # Getting Started -::: danger This project is archived -Kimi CLI is no longer maintained and will stop working. It receives no further updates or security fixes. Please install [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) instead; see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration). +::: danger Warning +**This project is archived.** Kimi CLI is no longer maintained and will stop working. It receives no further updates or security fixes. Please install [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) instead; see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration). ::: ## What is Kimi Code CLI @@ -28,51 +28,23 @@ If you encounter issues or have suggestions, please provide feedback on [GitHub ## Installation -::: tip -Kimi Code CLI is evolving into [Kimi Code](https://github.com/MoonshotAI/kimi-code). Installing Kimi Code **automatically migrates** your configuration and sessions. New users are encouraged to install Kimi Code directly; the instructions below still work, and existing users don't need to migrate immediately. -::: - -Run the installation script to complete the installation. The script will first install [uv](https://docs.astral.sh/uv/) (a Python package manager), then install Kimi Code CLI via uv: +Kimi CLI is archived and should no longer be installed. Install [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) instead: ```sh # Linux / macOS -curl -LsSf https://code.kimi.com/install.sh | bash +curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash ``` ```powershell # Windows (PowerShell) -Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression -``` - -Verify the installation: - -```sh -kimi --version -``` - -::: tip -Due to macOS security checks, the first run of the `kimi` command may take longer. You can add your terminal application in "System Settings → Privacy & Security → Developer Tools" to speed up subsequent launches. -::: - -If you already have uv installed, you can also run: - -```sh -uv tool install --python 3.13 kimi-cli +irm https://code.kimi.com/kimi-code/install.ps1 | iex ``` -::: tip -Kimi Code CLI supports Python 3.12–3.14, with Python 3.13 recommended. -::: - -## Upgrade and uninstall - -Upgrade to the latest version: +If you have used Kimi CLI before, Kimi Code CLI offers to migrate your config, MCP servers, and sessions on first launch, or you can run `kimi migrate` at any time. See the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration) for details. -```sh -uv tool upgrade kimi-cli --no-cache -``` +## Uninstall -Uninstall Kimi Code CLI: +After migrating to Kimi Code CLI, uninstall Kimi CLI: ```sh uv tool uninstall kimi-cli diff --git a/docs/en/index.md b/docs/en/index.md index 44e7749399..973e38245d 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -9,8 +9,8 @@ hero: text: Go to Kimi Code (Recommended) link: https://github.com/MoonshotAI/kimi-code - theme: alt - text: Stay with Kimi Code CLI - link: /en/guides/getting-started + text: Migration Guide + link: https://moonshotai.github.io/kimi-code/en/guides/migration --- -> **Kimi Code CLI is evolving into [Kimi Code](https://github.com/MoonshotAI/kimi-code)** — the next-generation terminal AI agent from the same team, with a smoother experience. Installing Kimi Code **automatically migrates** your configuration and sessions. This project will be gradually wound down; the docs and existing installations remain available. +> **Kimi CLI has been archived and is no longer maintained.** It has been replaced by [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code), the next-generation terminal AI agent from the same team. Existing installations will stop working, so please migrate as soon as possible. Your config and sessions can be migrated automatically; see the [migration guide](https://moonshotai.github.io/kimi-code/en/guides/migration). diff --git a/docs/zh/guides/getting-started.md b/docs/zh/guides/getting-started.md index 97764802b8..1e99754ec4 100644 --- a/docs/zh/guides/getting-started.md +++ b/docs/zh/guides/getting-started.md @@ -1,7 +1,7 @@ # 开始使用 -::: danger 本项目已归档 -Kimi CLI 已停止维护,不再提供任何更新和安全修复,旧版将无法继续使用。请改为安装 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)。 +::: danger 警告 +**本项目已归档**。Kimi CLI 已停止维护,不再提供任何更新和安全修复,旧版将无法继续使用。请改为安装 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)。 ::: ## Kimi Code CLI 是什么 @@ -28,52 +28,23 @@ Kimi Code CLI 支持以下几种使用方式: ## 安装 - -::: tip -Kimi Code CLI 已升级为 [Kimi Code](https://github.com/MoonshotAI/kimi-code),安装 Kimi Code 后会**自动迁移**你的配置与会话。新用户建议直接安装 Kimi Code; -::: - -运行安装脚本即可完成安装。脚本会先安装 [uv](https://docs.astral.sh/uv/)(Python 包管理工具),再通过 uv 安装 Kimi Code CLI: +Kimi CLI 已归档,不应再安装。请改为安装 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code): ```sh # Linux / macOS -curl -LsSf https://code.kimi.com/install.sh | bash +curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash ``` ```powershell # Windows (PowerShell) -Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression -``` - -验证安装是否成功: - -```sh -kimi --version -``` - -::: tip 提示 -由于 macOS 的安全检查机制,首次运行 `kimi` 命令可能需要较长时间。可以在「系统设置 → 隐私与安全性 → 开发者工具」中添加你的终端应用来加速后续启动。 -::: - -如果你已经安装了 uv,也可以直接运行: - -```sh -uv tool install --python 3.13 kimi-cli +irm https://code.kimi.com/kimi-code/install.ps1 | iex ``` -::: tip 提示 -Kimi Code CLI 支持 Python 3.12-3.14,但建议使用 3.13 以获得最佳兼容性。 -::: - -## 升级与卸载 - -升级到最新版本: +如果你之前使用过 Kimi CLI,Kimi Code CLI 首次启动时会提示迁移配置、MCP 服务与会话,你也可以随时运行 `kimi migrate`。详见 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)。 -```sh -uv tool upgrade kimi-cli --no-cache -``` +## 卸载 -卸载 Kimi Code CLI: +迁移到 Kimi Code CLI 后,卸载 Kimi CLI: ```sh uv tool uninstall kimi-cli diff --git a/docs/zh/index.md b/docs/zh/index.md index 65e2cd0c39..6e207620ee 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -9,8 +9,8 @@ hero: text: 前往 Kimi Code(推荐) link: https://github.com/MoonshotAI/kimi-code - theme: alt - text: 继续使用 Kimi Code CLI - link: /zh/guides/getting-started + text: 迁移指南 + link: https://moonshotai.github.io/kimi-code/zh/guides/migration --- -> **Kimi Code CLI 已升级为 [Kimi Code](https://github.com/MoonshotAI/kimi-code)** —— 这是我们打造的下一代终端 AI Agent,由同一团队带来更顺滑的体验。安装 Kimi Code 即可**自动迁移**你的配置与会话。本项目将逐步停止维护,文档与已安装版本仍可正常使用。 +> **Kimi CLI 已归档,不再维护**。它已由同一团队打造的新一代终端 AI Agent [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code) 取代。已安装的旧版将无法继续使用,请尽快迁移,配置与会话可以自动迁移,详见 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration)。 diff --git a/docs/zh/release-notes/breaking-changes.md b/docs/zh/release-notes/breaking-changes.md index 699ad2a221..cb7e23a060 100644 --- a/docs/zh/release-notes/breaking-changes.md +++ b/docs/zh/release-notes/breaking-changes.md @@ -9,7 +9,7 @@ PyPI 上的 `kimi-code` 包原本是 Kimi CLI 的别名,现在改为一个占位包:运行时只打印新版 Kimi Code CLI 的安装说明,并以状态码 1 退出。Kimi CLI 本身已归档,不再维护。 - **受影响**:通过 PyPI 上的 `kimi-code` 包安装 Kimi CLI 的用户(例如 `uv tool install kimi-code`) -- **迁移**:使用 `curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash`(Windows:`irm https://code.kimi.com/kimi-code/install.ps1 | iex`)安装 Kimi Code CLI,然后运行 `kimi migrate` 迁移配置和会话。详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) +- **迁移**:使用 `curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash`(Windows:`irm https://code.kimi.com/kimi-code/install.ps1 | iex`)安装 Kimi Code CLI,然后运行 `kimi migrate` 迁移配置和会话。详见 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) ## 1.49.0 diff --git a/docs/zh/release-notes/changelog.md b/docs/zh/release-notes/changelog.md index 8a94530d15..329c9378c9 100644 --- a/docs/zh/release-notes/changelog.md +++ b/docs/zh/release-notes/changelog.md @@ -4,7 +4,7 @@ ## 未发布 -**亮点**:Kimi CLI 已归档,不再维护,这是最后一个版本。请迁移至 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见[迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) +**亮点**:Kimi CLI 已归档,不再维护,这是最后一个版本。请迁移至 [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code),详见 [迁移指南](https://moonshotai.github.io/kimi-code/zh/guides/migration) - Build:将 `kimi-cli` 及本仓库中的所有包标记为已归档——此后不再发布新版本、Bug 修复或安全更新 - Build:PyPI 上的 `kimi-code` 包不再安装旧版 CLI——运行 `kimi-code` 时改为打印新版 Kimi Code CLI 的安装说明,并以状态码 1 退出 diff --git a/packages/kimi-code/README.md b/packages/kimi-code/README.md index eb70b6d6bd..9a8eca556b 100644 --- a/packages/kimi-code/README.md +++ b/packages/kimi-code/README.md @@ -19,7 +19,7 @@ irm https://code.kimi.com/kimi-code/install.ps1 | iex Also available via Homebrew (`brew install kimi-code`) and npm (`npm install -g @moonshot-ai/kimi-code`). -Then uninstall this package: `uv tool uninstall kimi-code` (or `pip uninstall kimi-code`). +Then uninstall this package: `uv tool uninstall kimi-code` (or `pip uninstall kimi-code kimi-cli`, since pip does not remove the legacy `kimi-cli` dependency automatically). Migration guide: [English](https://moonshotai.github.io/kimi-code/en/guides/migration) | [中文](https://moonshotai.github.io/kimi-code/zh/guides/migration) diff --git a/packages/kimi-code/src/kimi_code/__init__.py b/packages/kimi-code/src/kimi_code/__init__.py index 3a187306f3..e887e23313 100644 --- a/packages/kimi-code/src/kimi_code/__init__.py +++ b/packages/kimi-code/src/kimi_code/__init__.py @@ -16,7 +16,7 @@ macOS / Linux: curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash Windows: irm https://code.kimi.com/kimi-code/install.ps1 | iex -Then uninstall this package: uv tool uninstall kimi-code (or: pip uninstall kimi-code) +Then uninstall this package: uv tool uninstall kimi-code (or: pip uninstall kimi-code kimi-cli) Migration guide: https://moonshotai.github.io/kimi-code/en/guides/migration PyPI 上的 kimi-code 是已停止维护的旧版包,并不是新版 Kimi Code CLI。 diff --git a/tests/test_kimi_code_tombstone.py b/tests/test_kimi_code_tombstone.py index eb9d67c81f..e5e031757b 100644 --- a/tests/test_kimi_code_tombstone.py +++ b/tests/test_kimi_code_tombstone.py @@ -23,6 +23,8 @@ def test_main_prints_install_instructions_and_fails(capsys: pytest.CaptureFixtur assert "curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash" in err assert "irm https://code.kimi.com/kimi-code/install.ps1 | iex" in err assert "https://moonshotai.github.io/kimi-code/en/guides/migration" in err + # pip does not remove the orphaned kimi-cli dependency (and its `kimi` executable). + assert "pip uninstall kimi-code kimi-cli" in err def test_package_no_longer_installs_legacy_cli() -> None: