---
title: "lmsh — Natural Language Shell"
---

import { Tabs, TabItem } from '@astrojs/starlight/components';

`lmsh` is a fast, minimal natural language shell
interface that translates conversational commands into
editable shell commands. Type what you want in plain
English, review the generated command, and execute it.

:::note[Installation]
Part of the `claude-code-tools` package.
See [Quick Start](../../getting-started/) for
installation.
:::

## What It Does

```
$ lmsh
> show me all python files modified today
find . -name "*.py" -mtime 0
# ^ Editable command — press Enter to run
```

You type natural language, `lmsh` translates it into a
shell command using an AI agent, presents the command for
review/editing, and executes it on confirmation.

## Installation

<Tabs>
  <TabItem label="From crates.io">
    Requires Rust/Cargo:

    ```bash
    cargo install lmsh
    ```
  </TabItem>
  <TabItem label="From source">
    ```bash
    cd lmsh/
    cargo build --release
    cp target/release/lmsh ~/.cargo/bin/
    ```

    Or use the convenience target:

    ```bash
    make lmsh-install
    ```
  </TabItem>
</Tabs>

:::tip
Ensure `~/.cargo/bin` is in your `PATH`.
:::

## Usage

```bash
# Interactive mode (Claude/Haiku by default)
lmsh

# Translate, edit, execute, then interactive mode
lmsh "show me python files"

# Explicitly choose an agent
lmsh --agent claude          # default
lmsh --agent codex           # use Codex instead

# Version info
lmsh --version
```

## Features

- **Editable commands** -- Review and modify before
  execution.
- **Fast startup** -- Optimized Rust binary (~1ms).
- **Multiple AI agents** -- Choose between Claude
  (default) or Codex for command translation.
- **Shell preservation** -- Maintains your shell
  environment and aliases.
- **Clean output** -- PTY-based execution with proper
  echo suppression (no garbled prompts or ANSI codes).

## Agent Selection

### Claude (default)

- **Model**: Haiku (fast and efficient)
- **Command**: `claude -p "<prompt>" --model haiku`
- **Requirement**: Claude Code CLI must be installed
- **Best for**: General shell command translation with
  fast response times

### Codex

- **Model**: GPT-5 (advanced reasoning)
- **Command**: `codex exec "<prompt>"`
- **Requirement**: Codex CLI must be installed
- **Best for**: Complex command construction requiring
  advanced reasoning

## Requirements

- At least one of the following CLI tools:

  - **Claude Code CLI** (`claude`) -- for the default
    Claude agent
  - **Codex CLI** (`codex`) -- for the Codex agent

- The translation step adds ~2--3s latency due to AI
  model inference time.
