Getting started with mshell is a quick setup: install the CLI binary and then enable editor support.
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.
tar -xvf linux_amd64.tar.gz
mv msh ~/.local/bin/
chmod +x ~/.local/bin/msh
# 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\\"
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.
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.
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.