MoonshotAI / MoonshotAI/kimi-cli
Feature Request: Configurable Default Shell on Windows
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
Problem
Currently, Kimi Code CLI hardcodes Windows PowerShell as the default shell on Windows systems:
https://github.com/MoonshotAI/kimi-cli/blob/main/src/kimi_cli/utils/environment.py#L33-L35
if os_kind == "Windows":
shell_name = "Windows PowerShell"
shell_path = KaosPath("powershell.exe")
This means even when users launch kimi from Git Bash (or other Unix-like environments on Windows like MSYS2, Cygwin), the Shell tool still uses PowerShell for command execution.
Use Case
Many developers on Windows prefer using Git Bash for development because:
1. Tool chain compatibility: Unix tools like
p, awk, sed, find, make, cmake work out of
e box
2. Path handling: Unix-style paths (/c/projecrc) are more consistent across platforms
3. Script portability: Scripts written in Git
sh can run on Linux/macOS/CI without modiftion
4. Development workflow: Most open-source projects assume a Unix-like environment
Proposed Solution
Add support for configuring the default shell
via:
Option 1: Environment Variable (Recommended)
export KIMI_DEFAULT_SHELL=bash # or "powersh
ell", "cmd", "zsh", etc.
export KIMI_DEFAULT_SHELL_PATH=/usr/bin/bash
# optional: custom path
Option 2: Config File
# ~/.kimi/config.toml
<!--This is a translation content dividing line, the content below is generated by machine, please do not modify the content below-->
---
## Problem
Currently, Kimi Code CLI hardcodes Windows PowerShell as the default shell on Windows systems:
https://github.com/MoonshotAI/kimi-cli/blob/main/src/kimi_cli/utils/environment.py#L33-L35
```python
if os_kind == "Windows":
shell_name = "Windows PowerShell"
shell_path = KaosPath("powershell.exe")
This means even when users launch kimi from Git Bash (or other Unix-like environments on Windows like MSYS2, Cygwin), the Shell tool still uses PowerShell for command execution.
Use Case
Many developers on Windows prefer using Git Bash for development because:
1. Tool chain compatibility: Unix tools like
p, awk, sed, find, make, cmake work out of
e box
2. Path handling: Unix-style paths (/c/projecrc) are more consistent across platforms
3. Script portability: Scripts written in Git
sh can run on Linux/macOS/CI without modiftion
4. Development workflow: Most open-source projects assume a Unix-like environment
Proposed Solution
Add support for configuring the default shell
via:
Option 1: Environment Variable (Recommended)
export KIMI_DEFAULT_SHELL=bash # or "powersh
ell", "cmd", "zsh", etc.
export KIMI_DEFAULT_SHELL_PATH=/usr/bin/bash
# optional: custom path
Option 2: Config File
# ~/.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 src/kimi_cli/utils/environment.py around lines 33-35 to trace how the Windows shell is selected and how the selected path is used. Compare the proposed environment-variable and config-file options against the existing CLI configuration flow; done means the default shell can be selected on Windows, including a custom path, without changing the current default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100