English | 简体中文
Warning
DuckShell has now renamed to LucheShell
LucheShell is a lightweight, cross-platform, and highly extensible modern shell. It aims to provide developers with a simple yet feature-rich command-line environment through a powerful C++ plugin system.
- Extremely Lightweight: The core program is only about 20 MB, starting up in an instant.
- Truly Cross-platform: Native support for Windows (x86_64, ARM64), Linux, and macOS.
- Powerful Plugin System: Supports writing custom plugins in C++ for infinite functionality expansion.
- Automated Build: Based on CMake FetchContent, achieving "zero manual dependency" installation by automatically handling zlib and minizip.
- Open Source Spirit: Fully open source, community contributions are welcome.
You can download the pre-compiled binaries for your platform from the Latest Release page.
- Windows:
x86_64(MinGW),ARM64(Clang) - Linux:
amd64,arm64 - macOS:
Intel,Apple Silicon(Universal .dmg)
LucheShell now implements automated dependency management; you don't need to manually install zlib or minizip.
- CMake (>= 3.15)
- C++17 compatible compiler (GCC, Clang, or MSYS2 MinGW)
- (Linux/macOS only)
libcurldevelopment library
# Clone the repository
git clone https://github.com/lucheshidi/DuckShell.git
cd DuckShell
# Configure and build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build- Windows: Run
LucheShell.exedirectly. - Unix-like: Run
./LucheShell.
help: Display help information.cls/clear: Clear the screen.plugin: Enter plugin management mode.
- Startup commands are loaded from
~/duckshell/profile.dsh; setDUCKSHELL_PROFILEto use another file or pass--norcto skip it. - Like PowerShell, the
PROFILEvariable holds the profile path, e.g.notepad.exe ${PROFILE}; variable expansion remains a single argument, so quotes aren't needed for paths with spaces. - Built-in command
reloadresets all variables, functions and aliases then reloads the profile;reload --profile-onlyreloads only the profile while keeping core variables (PROFILE, HOME, PATH, PROMPT, etc.). - Run a script with
DuckShell file.dsh [arguments...]. Scripts support basic POSIX-style conditionals, loops and functions, plus VBScript-styleIf,For,Do,FunctionandSubblocks. - Minecraft color codes work directly in profiles and commands:
§a,&c,{gold},{bold},{#ff8800},&#ff8800, and§x§f§f§8§8§0§0; no\uescape is needed for§. Conversion is enabled by default; setDUCKSHELL_COLOR_CODES=0to disable it globally orDUCKSHELL_EXTERNAL_COLOR_CODES=0to disable conversion only for external-command arguments. - Set
DUCKSHELL_VERSION_COLORin your profile to customize the startup version text color, e.g.set DUCKSHELL_VERSION_COLOR = "§a"for green. echodecodes common escapes (including\n,\r,\t,\e,\xHH,\uHHHH,\UHHHHHHHH, and octal escapes);-nomits the final newline and-Edisables backslash decoding but not color-code conversion.
Pipelines and redirections, command substitution, globbing, job control, case/select, arrays, and more complete POSIX/VBScript expression and error semantics are natural extensions.
The essence of DuckShell lies in its plugins.
- Installing Plugins: Place compiled plugins (
.dll/.so/.dylib) into the~/lucheshell/plugins/directory. - Remote Download: Supports automatic download and extraction of plugins from configured repositories (relying on automated minizip integration).
- Writing Plugins: Refer to the
ExamplePlugins/HelloWorldexample, use the interface defined inplugins_interface.hto get started quickly.
We welcome any form of contribution!
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
LucheShell - Making the command line simple again.