Skip to content

Prerequisites ​

  • Node.js >=20.0.0 (the repository pins 20 in .nvmrc).
  • Git.
  • Optional: Docker or Podman for container sandboxing; a sandbox provider is required only if you enable M31A_SANDBOX.

Clone and install ​

bash
git clone https://github.com/eshanized/M31A.git
cd M31A
npm install

Build and run ​

bash
npm run build          # compile all workspaces
npm start              # run the CLI in development mode
npm run start:prod     # production-mode launch
npm run debug          # node --inspect-brk, pause until debugger attaches
npm run bundle         # produce bundle/m31a.js

npm run build:all also builds the sandbox container image. It is not needed for ordinary development.

Repository scripts ​

ScriptPurpose
npm run formatPrettier formatting.
npm run lintESLint with zero warnings allowed.
npm run typecheckTypeScript project checks.
npm run preflightClean, install, format, build, lint, typecheck, and test.
npm run cleanRemove generated artifacts.
npm run schema:settingsRegenerate the settings JSON Schema.
npm run docs:settingsRegenerate settings documentation sections.
npm run docs:keybindingsRegenerate keybinding documentation.

See Testing for the test commands.

Debugging ​

VS Code ​

Use the F5 launch configuration, or start npm run debug and attach with the "Attach" configuration. The process pauses until a debugger connects.

Chrome DevTools ​

Run npm run debug, then open chrome://inspect.

React DevTools ​

bash
DEV=true npm start
npx react-devtools@6

The CLI connects to React DevTools version 6.

Debug inside the sandbox ​

bash
DEBUG=1 m31a

Note that DEBUG=true in a project .env file is excluded by default; use .m31a/.env for M31A-specific debug settings.

Pre-commit workflow ​

Husky and lint-staged are configured. To install a stricter local gate, see the pre-commit hook guidance in the root CONTRIBUTING.md. Always run npm run preflight before opening a pull request.

Code conventions ​

  • Follow Conventional Commits, for example feat(cli): add --json flag.
  • Keep imports scoped within each workspace package (enforced by ESLint).
  • Source files do not carry per-file license headers; the project is MIT licensed.
  • Refer to the root M31A.md for AI-assisted development conventions.
  • Link every pull request to an issue; keep changes small and focused.

Next steps ​

Built with VitePress. Powered by NVIDIA NIM.