MoonshotAI / MoonshotAI/kimi-cli
Bug: Fresh install reports "LLM not set" with no guidance to run login
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
brew install kimi-cli(v1.47.0)- Run
echo "hello" | kimi --print --output-format stream-json - 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:
- On first run after install, automatically launch the login flow (similar to
gh auth login), OR - Print a clear, actionable error message like:
No model configured. Run \kimi login` to authenticate and set up a model.` - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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