Sign in

    #MoonBash

    MoonBash is a pure-memory POSIX shell sandbox written in MoonBit. It compiles to pure JavaScript, keeps execution inside an in-memory filesystem, and is designed for embedding in AI agents, browser terminals, and serverless runtimes.

    This MoonBit module publishes the core runtime packages. The TypeScript wrapper and website demo stay in the GitHub repository and are excluded from the mooncakes package.

    #Install

    moon add Haoxincode/moonbash

    #Public package

    The main entry package is:

    Haoxincode/moonbash/lib/entry

    It exports:

    • execute
    • execute_with_fs
    • execute_with_state

    #Example

    Add the dependency in your moon.pkg:

    import {
    "Haoxincode/moonbash/lib/entry" @moonbash,
    }

    Then call it from MoonBit:

    fn run_demo() -> Unit {
    let result = @moonbash.execute("echo hello from moonbash")
    println(result)
    }

    #Repository

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io