Install the compiler
One binary is not enough: you need mapper-gen (orchestrator),
mapper-gen-go (Go generator plugin), and mapper-gen-ts (TypeScript
generator plugin) on PATH. The host resolves plugins
via the mapper-gen-<name> executable convention.
Install script (recommended)
Section titled “Install script (recommended)”Linux, macOS, and Windows via Git Bash:
curl -fsSL https://raw.githubusercontent.com/peacewalker122/mapper-compiler/main/install.sh | bashThe script detects your OS/architecture, downloads the matching archive and
checksums from GitHub Releases, verifies the SHA-256 checksum, and installs
all three binaries (defaults to /usr/local/bin when writable, otherwise
~/.local/bin).
Pin the version and/or install directory:
curl -fsSL https://raw.githubusercontent.com/peacewalker122/mapper-compiler/main/install.sh \ | MAPPER_VERSION=v0.1.0 MAPPER_INSTALL_DIR="$HOME/.local/bin" bashPrefer to inspect before running? Download first, then run:
curl -fsSL -o install.sh https://raw.githubusercontent.com/peacewalker122/mapper-compiler/main/install.shsh install.sh --version v0.1.0 --dir ~/.local/binRelease archive (manual)
Section titled “Release archive (manual)”- Open
mapper-compilerGitHub Releases and download the archive for your platform (mapper-compiler_<version>_<os>_<arch>.tar.gz,.zipon Windows) — for examplemapper-compiler_0.1.0_linux_amd64.tar.gz. Releases cover Linux, macOS, and Windows on amd64 and arm64. Note the filename carries the version without the leadingv. - Verify against the published
mapper-compiler_<version>_checksums.txt(SHA-256). - Extract all three binaries and put them on
PATH:
tar -xzf mapper-compiler_0.1.0_linux_amd64.tar.gzchmod +x mapper-gen mapper-gen-go mapper-gen-tssudo mv mapper-gen mapper-gen-go mapper-gen-ts /usr/local/bin/Replace 0.1.0 with the latest release version.
Build from source
Section titled “Build from source”Requires Go 1.26.1+:
git clone https://github.com/peacewalker122/mapper-compiler.gitcd mapper-compilergo build -o mapper-gen ./cmd/mapper-gengo build -o mapper-gen-go ./generator/go/cmd/mapper-gen-gogo build -o mapper-gen-ts ./generator/ts/cmd/mapper-gen-ts# Move all three binaries somewhere on PATHCompiler releases are binary-only; there is no installable Go module for
mapper-gen itself.
Verify
Section titled “Verify”mapper-gen validate mapper.yaml