# Lx Shell

为 M5Stack Cardputer ADV 编写的迷你 Unix 风格终端

Minimal Unix-like shell for the M5Stack Cardputer ADV, with a tiny vi/nano editor, core commands, and Lx script support.

为 M5Stack Cardputer ADV 编写的迷你 Unix 风格终端，内置轻量编辑器和脚本支持。

- id: ppyne-lx-shell
- author: ppyne
- repository: https://github.com/ppyne/lx_shell
- license: BSD-3-Clause
- shape: headless
- scenes: tools
- boards: M5Stack Cardputer, M5Stack
- browser_playable: no
- preview: Project screenshots
- html: https://esp32gallery.com/projects/ppyne-lx-shell/
- html_zh: https://esp32gallery.com/zh/projects/ppyne-lx-shell/
- json: https://esp32gallery.com/data/catalog/projects/ppyne-lx-shell.json

## Hardware

M5Stack Cardputer / M5Stack. Verify the exact board revision, wiring and power requirements in the upstream build guide.

M5Stack Cardputer / M5Stack；请在上游构建文档中核对具体板型、供电与接线。

## English

```
A pocket Unix for the M5Stack Cardputer ADV: a terminal with history, Tab completion and a pager, trimmed vi and nano editors, and commands from cat, ls and cp through find, mount and tee. Pipes, > and >> redirection work, and .lx scripts run on the bundled engine. The filesystem is a microSD card at /media/0; preferences land in .lxshellrc, and without a card they live in RAM and vanish on reboot. The keyboard speaks CP437, with the Opt key cycling extra glyphs such as ±, Ω and box drawing on each key, so UTF-8 text renders only where it maps to that set. Audio streams MP3 and WAV through ESP8266Audio. PlatformIO builds it, with the shell engine pulled in as a git submodule.
```

## 中文

```
把 M5Stack Cardputer ADV 变成一台掌上 Unix：屏幕上是带历史和 Tab 补全的终端，vi、nano 两个精简编辑器都在，cat、ls、cp、mv、rm、find、mount 这些命令齐全，支持 > 和 >> 重定向、管道和 tee，也能跑自己写的 .lx 脚本。文件系统在 microSD 的 /media/0，偏好写进 .lxshellrc；没插卡时设置只活在内存里，重启就没了。字符集是 CP437，长按 Opt 能在同一个键上循环出 ±、Ω、╔ 之类的扩展字形，UTF-8 输入里只有能映射过去的才画得出来。音频走 ESP8266Audio 流式播放。固件是 PlatformIO 工程，Lx 引擎作为子模块引入。
```
