llm-moonshot
LLM plugin for Moonshot AI’s models
LLM plugin for models hosted by Moonshot AI.
Installation
First, install the LLM command-line utility.
Now install this plugin in the same environment as LLM:
llm install llm-moonshot
Configuration
You’ll need an API key from Moonshot. Grab one at platform.moonshot.cn.
Set secret key:
llm keys set moonshot
Enter key: <paste key here>
Usage
List what’s on the menu:
llm models list
You’ll see something like:
Moonshot: moonshot/kimi-latest
Moonshot: moonshot/moonshot-v1-auto
Moonshot: moonshot/moonshot-v1-128k-vision-preview
Moonshot: moonshot/kimi-k2-0711-preview
Moonshot: moonshot/moonshot-v1-128k
Moonshot: moonshot/moonshot-v1-32k-vision-preview
Moonshot: moonshot/moonshot-v1-8k-vision-preview
Moonshot: moonshot/moonshot-v1-8k
Moonshot: moonshot/kimi-thinking-preview
Moonshot: moonshot/moonshot-v1-32k
...
Fire up a chat:
llm chat -m moonshot/kimi-k2-0711-preview
Chatting with moonshot/kimi-k2-0711-preview
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> yo moonie
yo! what’s up, moonie?
>
Need raw completion?
llm -m moonshot/moonshot-v1-8k "Finish this haiku: Neon city rain"
Neon city rain,
Glistening streets, a symphony,
Echoes of the night.
Reasoning Content Support
This plugin now supports reasoning content for Moonshot's thinking models (models with "thinking" in the name). When using thinking models, you'll see the model's reasoning process displayed in real-time before the final response:
llm chat -m moonshot/kimi-k2-thinking
[Reasoning] (shown in cyan dim)
The user is asking me to solve a complex problem. Let me think through this step by step...
First, I need to understand the core requirements...
Then I'll analyze the available options...
[Response] (shown in bold green)
Here's my well-reasoned answer to your question...
Available Thinking Models
moonshot/kimi-k2-thinking- Latest reasoning modelmoonshot/kimi-thinking-preview- Preview reasoning model
The reasoning content helps you understand:
- Decision-making process - See how the model analyzes problems
- Multi-step reasoning - Follow complex thought chains
- Error detection - Catch logical gaps or misunderstandings early
Aliases
Save your wrists:
llm aliases set kimi moonshot/kimi-latest
Now:
llm -m kimi "write a haiku about the AI chatbot Sidney is misbehaving"
Development
Clone, venv, deps—same dance:
git clone https://github.com/ghostofpokemon/llm-moonshot.git
cd llm-moonshot
python3 -m venv venv
source venv/bin/activate
pip install -e .
Metadata
Release files for llm-moonshot 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llm_moonshot-0.3.1.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_moonshot-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / llm_moonshot-0.3.1.tar.gz
| Download URL | llm_moonshot-0.3.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e467ffd74708196c554c85e5b083c505699fdf4460c691062bb0b593ef4d7cb4
|
|
BLAKE2b-256 checksum How to use checksums |
9d2f016debb1444a306d5a2d83d3404d22b05668f4318fb3e3a83a032f38c04d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / llm_moonshot-0.3.1-py3-none-any.whl
| Download URL | llm_moonshot-0.3.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd6a4fcee45a93c3ca04cd3a8385955eeca0dd2a665d7e9716f3a3b244c2dd18
|
|
BLAKE2b-256 checksum How to use checksums |
251002c92d567513a325a0cc0bbe9d9db4a689a53257ed42851e3ee6da11531a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for llm-moonshot 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.