English | 简体中文
Codeberg | GitHub | Document | DeepWiki | release-page 1 | release-page 2 | tree-sitter
⚡┓
┃ ┓┏┏┳┓┏┓
┗┛┗┻┛┗┗┗ lightweight ultimate modern efficient
Write as js, works as Bash, run as light
Lumesh is a modern shell and scripting language, as a bash replacer, it was completely rewritten from Dune, designed for high performance and user-friendly experience.
Lume [lʌmi] means 'light' and symbolizes lightness and speed.
-
Lightweight
Lume Shell is a lightweight shell with a clean design and minimal resource usage, ideal for scenarios requiring rapid startup and efficient operation.
-
Ultimate
Lume Shell is a powerful tool that delivers a comprehensive command-line experience for advanced users.
-
Modern
Lume Shell incorporates contemporary design philosophies and technologies, supporting the latest scripting language features and interactive methods.
-
Efficient
Lume Shell excels in command execution and script processing, delivering both high efficiency and rapid response.
- Syntax limitations: Traditional shell syntax is outdated with a steep learning curve.
- Difficult error handling: Lacks flexible error capture and recovery mechanisms.
- Weak data processing: Struggles with structured data handling.
- Insufficient programming capabilities: Lacks modern programming language features.
- Modern syntax: Supports destructuring assignment, arrow functions, method chaining, higher-order functions, decorators, and other modern features.
- Powerful error handling: Provides 7 error-catch operators (
?.,?:,?+,??,?>,?!,?~). - Structured pipelines: Supports passing and processing structured data within pipelines.
- Rich built-in library: Offers 17 built-in modules covering filesystem, string processing, time operations, and more.
| Comparison Item | lume | bash | dash | fish |
|---|---|---|---|---|
| Speed (million loops) | ***** | *** | **** | * |
| Syntax Friendliness | ***** | ** | * | **** |
| Error Messages | ***** | * | * | *** |
| Error Handling | ***** | * | * | * |
| Built-in Libraries | ***** | * | ||
| Interactivity | **** | ** | * | ***** |
| Size | **** | *** | ***** | ** |
| Key Bindings | ☑ | ☑ | ||
| Structured Pipelines | ☑ | |||
| AI Interaction | ☑ |
Experience one style every place.
# Syntax like modern programming languages
let user = {name: "Alice", age: 25}
let {name, age} = user
let numbers = 1..10 | list.filter(x -> x > 5)
let [a, b] = [1, 2]Supports method chaining similar to object-oriented languages:
"hello world".split(' ').join(',')
data | .filter(x -> x > 0)More intelligent error tips, error capture and recovery deeling than traditional shells.
command ?. # Ignore errors
command ?: e # Error capture or default value
command ?+ # Print to standard output
command ?? # Print to error output
command ?> # Override print (data channel)
command ?! # Terminate on error (terminate pipeline)data | process # Standard pipeline, supports structured data
data | positional a _ c # Positional pipeline
data |> loop_deel # Loop pipeline
data |^ interactive # PTY pipelineStructured pipelines:
ls -l | .to_table() | where(size > 5K)
Fs.ls -l | where(size > 5K) | select(name,size,modified)
ls -1 |> cp -r _ /tmp/- Collection Operations:
list.reduce, list.map - File System:
fs.ls, fs.read, fs.write - String Processing:
string.split, string.join,regexmodule - Time Operations:
time.now, time.format - Data Conversion:
into,frommodule - Mathematical Calculations: Complete
mathfunction library - Logging:
logmodule - UI Operations:
ui.pick, ui.confirm
Supports function decorator syntax:
@decorator_name
@decorator_with_args(arg)
fn my_function() { ... }Supports module import syntax:
use moduleA as ma
ma::method()Built-in local AI assistant, supports command completion and smart suggestions.
method 1: use install script
- download install.sh
and run
bash ./install.sh
Method 2: Download Precompiled Version
you need to manually extra data.tgz to data directory to enable param completion.
Method 3: Compile from Source
git clone 'https://codeberg.com/santo/lumesh.git'
cd lumesh
cargo build --releaseMethod 4: Build from Cargo
cargo install lumeshlume: Complete shell, supports REPL, auto-completion, syntax highlightinglume-se: Lightweight script executor, quick startup, minimal dependencies.
# Start interactive shell
lume
# Or execute script
lumesh script.lm- Interactive highlight:already supported within box
- editor highlight: tree-sitter
![]() |
![]() |
|---|
Due to fish being unable to complete one million tasks, we recorded its half-task time.
from v0.10.1 on, lume becomes about 2x faster than before!
from v0.11.0 on, lume takes less memery
Recent development has emphasized:
- Decorator support for function enhancement
- IFS (Internal Field Separator) mode control for compatibility
- Enhanced module system with cross-linking between modules
- Improved error reporting and debugging capabilities
- CFM (Command First Mode) for daily commands (v0.8.0)
- More friendly help info (v0.8.5)
- Params completion from fish (v0.8.8)
- Automatic completion detection logic optimization (v0.8.8)
- Modular programming support (v0.10.0)
- Built-in library dynamic lazy loading support (v0.10.1)
- More flexible placeholder support (v0.10.2)
- Improved CFM (v0.11.1)
- Middleware-style decorator support (v0.11.5)
- Loop iterator optimization (v0.11.5)
- Local variable support (v0.11.6)
- Support more data type: HashMap/BtreeSet
- Support Consts:COLOR, STYLE, MATH
- Optimize lib execution
- Security enhance with knock_validator
start your travel with lumesh now

