MIMIC
Get started · 0.4.3

Install Mimic

One command installs the latest release. mimic goes into ~/.mimic/bin and onto your PATH, with no administrator rights. The download is checked against the release's checksums. The single binary holds the compiler, Clang, a linker and the C libraries, so there is nothing else to install (on macOS, the Xcode Command Line Tools).

$curl -fsSL https://mimic.codes/install.sh | sh
Apple silicon. In a terminal.

Then open a new terminal and check it: mimic --version.

Update

Run mimic upgrade, or the install command again: it installs the newest release, or says you already have it. Updating is safe while an editor is running Mimic; the new version takes over the next time it starts. mimic upgrade --check only tells you whether a newer one exists.

To follow the next version as it is built, mimic upgrade --preview installs the newest preview (about weekly), and mimic upgrade --nightly the nightly build of the development branch. Later upgrades stay on the channel you chose; mimic upgrade --stable goes back to stable releases.

Your editor

The Mimic extension gives VS Code, Cursor, Windsurf and VSCodium highlighting, completion of glyphs and words, errors as you type, and run and profile buttons. This installs or updates it in every one of them you have:

$curl -fsSL https://mimic.codes/vscode.sh | sh

Or mimic upgrade --editors, which updates Mimic and the extension together. The extension is also on its releases page as a .vsix (Extensions → … → Install from VSIX). It finds Mimic, or offers to install it.

Your first program

mimic create hello
cd hello
mimic run

That creates a project and runs src/main.mim. Arrays are values, so one expression works on every element; Mimic decides how to run it in parallel:

module main

fn main() {
    let prices = [12.5 8 30 4.25]
    print("with tax: {prices × 1.2}")
    print("total: {prices ▷ +/}")
}

Continue with the tutorial, or coming from another language, read Mimic for Python, JavaScript or C programmers.

Options

WhatmacOS, Linux, WSLWindows (PowerShell)
A given versioncurl -fsSL https://mimic.codes/install.sh | sh -s -- --version 0.3.16$env:MIMIC_VERSION="0.3.16"; irm https://mimic.codes/install.ps1 | iex
Previews… | sh -s -- --preview$env:MIMIC_CHANNEL="preview"; irm … | iex
Nightly builds… | sh -s -- --nightly$env:MIMIC_CHANNEL="nightly"; irm … | iex
Reinstall… | sh -s -- --force$env:MIMIC_FORCE="1"; irm … | iex
Uninstall… | sh -s -- --uninstall$env:MIMIC_UNINSTALL="1"; irm … | iex
Another folderMIMIC_HOME=/opt/mimic before sh$env:MIMIC_HOME

Without the script

Download the archive for your machine from the releases (macOS arm64, Linux x86_64, Windows x86_64), check it against SHA256SUMS, unpack it and run its install.sh (install.cmd on Windows). The scripts are in the repository, in tools/get, if you want to read them first.

If something goes wrong

  • mimic: command not found: open a new terminal, so it reads the updated PATH, or run ~/.mimic/bin/mimic.
  • Apple silicon in a Rosetta terminal: the script notices and installs the arm64 build anyway.
  • Alpine and other musl Linux: not supported by the release build yet; the script says so instead of installing something that cannot run.
  • A company proxy or firewall: the downloads come from github.com and objects.githubusercontent.com.
  • Still stuck? Open an issue with the script's output, or ask on Discord.