New:Socket for Asana Is Now Available.Learn more
Get Started

@0disoft/mensor-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0disoft/mensor-cli

CLI for checking Mensor project contracts.

latest
Source
npmnpm
Version
0.9.0
Version published
Weekly downloads
12
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@0disoft/mensor-cli

Command-line interface for checking and compiling Mensor project contracts.

Install

pnpm add --save-dev @0disoft/mensor-cli

Node.js 22 or newer is required.

Check A Project

Run the default DiagnosticReport v1 output:

pnpm exec mensor check . --json

Select Check Output v2 when the consumer needs explicit inspection coverage:

pnpm exec mensor check . --json --report-version 2

Exit status 0 means every configured static contract check passed. It does not prove runtime application behavior. When a project omits RouteIndex, application route declarations are not inspected.

Mensor does not execute project source or configuration while checking it.

Emit SARIF 2.1.0 for code-scanning consumers:

pnpm exec mensor check . --sarif

SARIF is available only for completed checks and cannot be combined with --json or --report-version.

Compile A Runtime Manifest

Compile only after all configured checks pass and atomically replace the root-relative output file:

pnpm exec mensor compile . --out .mensor/manifest.json

The default output is .mensor/manifest.json. Diagnostic, configuration, and write failures do not replace an existing manifest. Add --json to emit the same canonical manifest bytes to stdout after the file is written.

Produce A Hono RouteIndex

Generate a canonical RouteIndex from explicitly selected Hono source files and receiver identifiers:

pnpm exec mensor index-hono-routes . --source src/routes.ts --receiver app

Repeat --source and --receiver when needed. The default output is mensor.route-index.json; --out selects another root-relative path and --json emits the same canonical bytes after the atomic write. Mensor parses source without importing or executing it. Only direct or chained static receiver.get() and receiver.post() calls are supported. Dynamic paths, mounted routers, on, all, and optional chains fail closed rather than producing an incomplete index.

Produce A TypeScript FormIndex

Generate a canonical FormIndex from explicitly selected TypeScript or JavaScript files and tagged-template identifiers:

pnpm exec mensor index-ts-forms . --source src/views.ts --tag html

Repeat --source and --tag when needed. The default output is mensor.form-index.json; --out selects another root-relative path and --json emits the same canonical bytes after the atomic write. Mensor parses without importing or executing source. Only exact identifier tags with no-substitution templates yield static form facts. Interpolation is retained as incomplete evidence, and a source with no selected template fails closed.

Documentation

  • Project and feature contract authoring
  • CLI command contract
  • Product boundary

Mensor is licensed under Apache-2.0.

Keywords

mensor

FAQs

Package last updated on 01 Sep 2026

Related posts