Getting started with mshell is a quick setup: install the CLI binary and then enable editor support.

Installation § Back to top

1) Download the binary and add it to your PATH

mshell ships as a single executable. Download the appropriate release archive from the GitHub releases page, extract it, and place the binary on your PATH.

Linux/macOS

tar -xvf linux_amd64.tar.gz
mv msh ~/.local/bin/
chmod +x ~/.local/bin/msh

Windows

# cmd.exe
tar -xvf windows_amd64.tar.gz
move msh.exe "%USERPROFILE%\\bin\\"
# PowerShell
tar -xvf windows_amd64.tar.gz
Move-Item msh.exe "$env:USERPROFILE\\bin\\"

2) Set up the standard library

The standard library lives at lib/std.msh in this repo. Download or copy that file to a stable location, then set MSHSTDLIB to point at it.

Examples:

# bash/zsh/sh
export MSHSTDLIB="/path/to/std.msh"
# fish
set -gx MSHSTDLIB "/path/to/std.msh"
# PowerShell (current session)
$env:MSHSTDLIB = "C:\path\to\std.msh"

# PowerShell (persist for your user account)
[Environment]::SetEnvironmentVariable("MSHSTDLIB", "C:\path\to\std.msh", "User")
# Windows (GUI)
# Use the Start menu: "Edit environment variables for your account"
# and add MSHSTDLIB with the full path to std.msh.

An example installer script is available at install.sh.

GitHub Actions § Back to top

To use mshell in GitHub Actions workflows, use the official action:

steps:
  - uses: mitchpaulus/mshell@v0.9.0
  - run: msh script.msh

To pin a specific version:

steps:
  - uses: mitchpaulus/mshell@v0.9.0
    with:
      version: v0.9.0
  - run: msh script.msh

The action downloads the pre-built binary for the runner platform and sets up the MSHSTDLIB environment variable automatically.

Editor Support § Back to top

Syntax highlighting and editor integrations are available for common editors:

Shell completions for using mshell within a different shell can be generated by the CLI:

# bash
source <(msh completions bash)

# fish
msh completions fish | source

# elvish
msh completions elvish | eval

# nushell
msh completions nushell | save --force $"($nu.default-config-dir)/completions/msh.nu"
use $"($nu.default-config-dir)/completions/msh.nu" *

A language server is bundled with the CLI, providing builtin hover information, completion on @ variables, and scope-aware variable renaming.