MoonshotAI / MoonshotAI/kimi-cli

Bug: Fresh install reports "LLM not set" with no guidance to run login

Open
#2,456 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

Bug Description

On a fresh install via Homebrew (brew install kimi-cli), running any command (e.g. kimi --print) immediately fails with:

LLM not set

There is no hint or guidance that the user needs to run kimi login first.

Steps to Reproduce

  1. brew install kimi-cli (v1.47.0)
  2. Run echo "hello" | kimi --print --output-format stream-json
  3. Observe: LLM not set (exit code 1)

Root Cause

After installation, ~/.kimi/config.toml is initialized with:

default_model = ""
[models]
[providers]

No model or provider is configured. The CLI does not prompt the user to authenticate or select a model on first run.

Expected Behavior

One of:

  1. On first run after install, automatically launch the login flow (similar to gh auth login), OR
  2. Print a clear, actionable error message like: No model configured. Run \kimi login` to authenticate and set up a model.`
  3. Include a post-install message from Homebrew pointing the user to kimi login.

Workaround

Run kimi login manually, complete the OAuth device flow in the browser. After login, config.toml is populated with default_model, [models], and [providers] entries and the CLI works correctly.

Environment

  • kimi-cli version: 1.47.0
  • Python: 3.14.6
  • Install method: Homebrew (brew install kimi-cli)
  • OS: macOS (Apple Silicon)
  • Config path: ~/.kimi/config.toml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the fresh-install kimi --print reproduction and inspect initialization of ~/.kimi/config.toml together with the kimi login entry point. Verify behavior when default_model is empty, then rerun the command after login; done means the first-run failure gives actionable guidance or the agreed first-run setup flow is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.