Skip to content

feat(cli): add doctor command for config validation - #431

Merged
liruifengv merged 5 commits into
mainfrom
liruifeng/kimi-doctor
Jun 4, 2026
Merged

feat(cli): add doctor command for config validation#431
liruifengv merged 5 commits into
mainfrom
liruifeng/kimi-doctor

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; this adds a small CLI diagnostic command requested during configuration validation work.

Problem

Users need a lightweight way to validate config.toml and tui.toml, including candidate files, without launching the TUI or modifying configuration files.

What changed

  • add kimi doctor, kimi doctor config [path], and kimi doctor tui [path]
  • reuse the existing config and TUI TOML parsers so diagnostics match runtime validation
  • document the new command in English and Chinese reference docs

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Validation

  • pnpm exec vitest run apps/kimi-code/test/cli/doctor.test.ts apps/kimi-code/test/cli/options.test.ts packages/node-sdk/test/config.test.ts apps/kimi-code/test/tui/config.test.ts
  • pnpm --filter @moonshot-ai/kimi-code run typecheck
  • pnpm --filter @moonshot-ai/kimi-code-sdk run typecheck
  • pnpm exec oxlint --type-aware apps/kimi-code/src/cli/sub/doctor.ts apps/kimi-code/src/cli/commands.ts packages/node-sdk/src/index.ts apps/kimi-code/test/cli/doctor.test.ts apps/kimi-code/test/cli/options.test.ts
  • pnpm -C docs run build
  • git diff --check

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1625ac5

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

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/kimi-code Minor
@moonshot-ai/kimi-code-sdk Minor
@moonshot-ai/acp-adapter Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

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

commit: 1625ac5

@liruifengv
liruifengv merged commit 6a4e4c7 into main Jun 4, 2026
8 checks passed
@liruifengv
liruifengv deleted the liruifeng/kimi-doctor branch June 4, 2026 13:15
@github-actions github-actions Bot mentioned this pull request Jun 4, 2026
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.

1 participant