Prerequisites
- Node.js
>=20.0.0(the repository pins20in.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 installBuild 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.jsnpm run build:all also builds the sandbox container image. It is not needed for ordinary development.
Repository scripts
| Script | Purpose |
|---|---|
npm run format | Prettier formatting. |
npm run lint | ESLint with zero warnings allowed. |
npm run typecheck | TypeScript project checks. |
npm run preflight | Clean, install, format, build, lint, typecheck, and test. |
npm run clean | Remove generated artifacts. |
npm run schema:settings | Regenerate the settings JSON Schema. |
npm run docs:settings | Regenerate settings documentation sections. |
npm run docs:keybindings | Regenerate 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@6The CLI connects to React DevTools version 6.
Debug inside the sandbox
bash
DEBUG=1 m31aNote 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.mdfor AI-assisted development conventions. - Link every pull request to an issue; keep changes small and focused.