# What Programming Languages Are Used in Kimi Code Packages?

> Discover the programming languages powering Kimi Code packages. Built with TypeScript, it supports diverse languages like Python, Go, Rust, Java, and C++ for LLM code generation.

- Repository: [Moonshot AI/kimi-code](https://github.com/MoonshotAI/kimi-code)
- Tags: programming-languages
- Published: 2026-07-29

---

**Kimi Code is built with TypeScript and runs on Node.js, yet it functions as a language-agnostic assistant that supports code generation for any programming language the underlying LLM model has been trained on, including Python, Go, Rust, Java, and C++.**

The MoonshotAI/kimi-code repository delivers a flexible coding agent that does not hardcode language support into its packages. Instead, the TypeScript-based architecture delegates language understanding to the configured LLM provider, enabling support for virtually any modern or niche programming language.

## TypeScript Implementation

The Kimi Code packages themselves are implemented in **TypeScript**. The core components reside in the `packages/` directory, with key files including:

- [`packages/agent-core-v2/src/app/agent/Agent.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/packages/agent-core-v2/src/app/agent/Agent.ts) – Core agent logic that processes prompts
- [`packages/kosong/src/provider.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/packages/kosong/src/provider.ts) – Provider abstraction layer that selects the LLM model
- [`apps/kimi-code/src/cli.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/src/cli.ts) – CLI entry point (`kimi` command)

These TypeScript modules handle request routing, provider management, and system prompt enforcement, but contain no language-specific parsers or compilers for the target generation languages.

## Language-Agnostic Architecture

Kimi Code forwards natural-language requests directly to the underlying LLM model. According to the [`AGENTS.md`](https://github.com/MoonshotAI/kimi-code/blob/main/AGENTS.md) system prompt at line 9, the agent must "**Write in the user's language** … Keep code, commands, identifiers, file paths, and technical terms in their original form." This instruction ensures that the model preserves the syntax and semantics of whatever programming language the user specifies in their prompt.

### Model-Driven Language Support

Because language handling is performed by the LLM, the only restriction comes from the **provider configuration**. The [`config.toml`](https://github.com/MoonshotAI/kimi-code/blob/main/config.toml) file defines which model is used, and each model advertises its capabilities. When a model supports Python, Rust, or any other language, Kimi Code automatically enables that capability without requiring code changes in the agent.

## Commonly Supported Languages

While Kimi Code can theoretically support any language in the LLM's training data, the following are regularly used based on model capabilities:

- **JavaScript/TypeScript** – Modern ECMAScript features and Node.js APIs
- **Python** – Data processing, scripting, and ML workflows
- **Go and Rust** – Systems programming and CLI tools
- **Java, C#, C/C++** – Enterprise and native application development
- **PHP, Ruby** – Web development and automation scripts

## Practical Usage Examples

The following examples demonstrate how the **natural-language prompt** dictates the output language, not any fixed configuration.

### Generate TypeScript Utilities

Request a TypeScript function using the CLI:

```bash
kimi --prompt "Create a TypeScript function called `capitalize` that takes a string and returns it with the first letter in uppercase."

```

**Generated output:**

```typescript
export function capitalize(s: string): string {
  if (!s) return '';
  return s[0].toUpperCase() + s.slice(1);
}

```

### Generate Python Scripts

Request a Python data-processing script:

```bash
kimi --prompt "Write a Python script that reads `data.csv` and prints the total of the `price` column."

```

**Generated output:**

```python
import csv

def total_price(csv_path):
    total = 0.0
    with open(csv_path, newline='') as f:
        reader = csv.DictReader(f)
        for row in reader:
            total += float(row['price'])
    return total

if __name__ == "__main__":
    print("Total price:", total_price("data.csv"))

```

These examples show that [`apps/kimi-code/src/cli.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/src/cli.ts) transmits the prompt to the Agent class, which coordinates with the provider abstraction in [`packages/kosong/src/provider.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/packages/kosong/src/provider.ts) to retrieve the language-appropriate response from the model.

## Summary

- Kimi Code packages are written in **TypeScript** and run on Node.js
- The tool supports **any programming language** the configured LLM model understands
- Language direction is determined by the [`AGENTS.md`](https://github.com/MoonshotAI/kimi-code/blob/main/AGENTS.md) system prompt and user instructions
- The provider configuration in [`config.toml`](https://github.com/MoonshotAI/kimi-code/blob/main/config.toml) controls which model—and therefore which languages—are available
- No hardcoded language parsers exist in [`packages/agent-core-v2/src/app/agent/Agent.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/packages/agent-core-v2/src/app/agent/Agent.ts) or related modules

## Frequently Asked Questions

### Does Kimi Code support niche or legacy programming languages?

Yes. Because Kimi Code forwards requests to the underlying LLM, it can generate code for any language the model was trained on, including Fortran, COBOL, Lisp, and other legacy systems, provided the selected provider's model includes that language in its training corpus.

### How do I configure a specific language in Kimi Code?

You do not configure languages explicitly. Instead, specify the desired language in your natural-language prompt (e.g., "Write a Rust function..."). The system prompt in [`AGENTS.md`](https://github.com/MoonshotAI/kimi-code/blob/main/AGENTS.md) ensures the model responds in the requested language, and [`packages/kosong/src/provider.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/packages/kosong/src/provider.ts) routes the request to the appropriate model.

### What programming languages are the Kimi Code packages written in?

The packages are implemented in **TypeScript**, evident from the `.ts` file extensions in `packages/agent-core-v2` and `apps/kimi-code`. The project is compiled for the Node.js runtime environment.

### How does Kimi Code handle language-specific syntax without dedicated parsers?

Kimi Code relies on the LLM's internal knowledge of syntax and semantics. The [`Agent.ts`](https://github.com/MoonshotAI/kimi-code/blob/main/Agent.ts) class forwards the prompt without transformation, and the system prompt instructs the model to preserve technical terms and syntax exactly as specified by the user, bypassing the need for built-in language parsers or AST generators.