M31A requires Node.js >=20.0.0. Check your version with node --version; the repository pins Node 20 in .nvmrc.
Run without installing
npx m31aThis downloads the latest published package into the npm cache and launches the interactive terminal UI. Add --yes to the npx invocation if you want to skip the one-time install prompt in automation.
Install globally
npm install -g m31a
m31a --versionThe m31a executable is provided by the bundled entry point bundle/m31a.js. The published npm package contains only bundle/, README.md, and LICENSE.
GitHub Releases
GitHub Releases publishes:
- versioned source tarballs,
- standalone bundle archives,
- cross-platform single-executable application (SEA) binaries for
linux-x64,linux-arm64,darwin-arm64,darwin-x64, andwin32-x64, plus aSHA256SUMSfile.
Download the asset for your platform, verify the checksum, then place the binary on your PATH. For example, on Linux:
sha256sum -c SHA256SUMS --ignore-missing
chmod +x m31a-linux-x64
sudo mv m31a-linux-x64 /usr/local/bin/m31aBuild from source
Use this path when you want to modify M31A or run the latest master code.
git clone https://github.com/eshanized/M31A.git
cd M31A
npm install
npm run build
npm startnpm run build compiles every workspace. npm start runs scripts/start.js in development mode. To produce the bundled CLI entry point used by the npm package, run npm run bundle.
Optional sandbox image
If you plan to use container-based sandboxing, build the sandbox image too:
npm run build:allThe image tag is ghcr.io/eshanized/m31a-sandbox:0.2.0. Default builds (npm run build) do not rebuild it.
Verify the installation
m31a --version
m31a --help
m31a --list-models--list-models requires valid authentication; see Authentication.
Shell completion and aliases
The CLI is built with yargs and supports its standard option parsing. A common convenience alias when running from source is:
alias m31a="node /path/to/M31A/packages/cli"Troubleshooting installation
node: bad optionor syntax errors — upgrade to Node.js 20 or newer.- Permission errors during global install — use a Node version manager such as nvm instead of
sudo. - Missing optional native modules —
node-ptyand@github/keytarare optional dependencies. M31A falls back to non-PTY shell execution and file storage when they are unavailable. - Workspace trust warning on first run — expected behavior. See Sandboxing.
Next steps
Continue with Authentication, then the quickstart.