Skip to content

About

A shell for multiplatform and available for plugins.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

LucheShell

Windows Build Linux Build macOS Build

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.

🌟 Key Features

  • 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.

📥 Installation Guide

You can download the pre-compiled binaries for your platform from the Latest Release page.

Supported Architectures

  • Windows: x86_64 (MinGW), ARM64 (Clang)
  • Linux: amd64, arm64
  • macOS: Intel, Apple Silicon (Universal .dmg)

🛠️ Compilation Instructions

LucheShell now implements automated dependency management; you don't need to manually install zlib or minizip.

Prerequisites

  • CMake (>= 3.15)
  • C++17 compatible compiler (GCC, Clang, or MSYS2 MinGW)
  • (Linux/macOS only) libcurl development library

Build Steps

# 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

🚀 Usage

  • Windows: Run LucheShell.exe directly.
  • Unix-like: Run ./LucheShell.

Common Commands

  • help: Display help information.
  • cls / clear: Clear the screen.
  • plugin: Enter plugin management mode.

Profiles and scripts

  • Startup commands are loaded from ~/duckshell/profile.dsh; set DUCKSHELL_PROFILE to use another file or pass --norc to skip it.
  • Like PowerShell, the PROFILE variable 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 reload resets all variables, functions and aliases then reloads the profile; reload --profile-only reloads 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-style If, For, Do, Function and Sub blocks.
  • Minecraft color codes work directly in profiles and commands: §a, &c, {gold}, {bold}, {#ff8800}, &#ff8800, and §x§f§f§8§8§0§0; no \u escape is needed for §. Conversion is enabled by default; set DUCKSHELL_COLOR_CODES=0 to disable it globally or DUCKSHELL_EXTERNAL_COLOR_CODES=0 to disable conversion only for external-command arguments.
  • Set DUCKSHELL_VERSION_COLOR in your profile to customize the startup version text color, e.g. set DUCKSHELL_VERSION_COLOR = "§a" for green.
  • echo decodes common escapes (including \n, \r, \t, \e, \xHH, \uHHHH, \UHHHHHHHH, and octal escapes); -n omits the final newline and -E disables backslash decoding but not color-code conversion.

Possible next steps

Pipelines and redirections, command substitution, globbing, job control, case/select, arrays, and more complete POSIX/VBScript expression and error semantics are natural extensions.

🔌 Plugin System

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/HelloWorld example, use the interface defined in plugins_interface.h to get started quickly.

🤝 Contributing

We welcome any form of contribution!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

LucheShell - Making the command line simple again.

About

A shell for multiplatform and available for plugins.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages