Install and run the CLI
Use Node.js 24 or newer. The public npm package is @anhcodo13/lattice; it installs the lattice command. The CLI rejects older Node versions.
Install in your app
Section titled “Install in your app”For your own app, install an exact version and run a first check:
npm install --save-dev --save-exact @anhcodo13/lattice@0.5.0npx lattice --versionnpx lattice governance check . --expect-apps 1This default check uses the policy bundled with the package. Commit the resulting manifest and lockfile. For a reviewed policy from a different core revision, supply --policy explicitly; see Project governance.
Check your own application
Section titled “Check your own application”Run architecture analysis without an external service:
npx lattice doctor .npx lattice analyze .Open .nklattice-report/report.html locally. The adjacent analysis.json contains the findings and module relationships for automation. For a different output folder, add --output /path/to/reports.
For a pnpm monorepo, scan from its root or an app subtree, and set --workspace-root to the directory containing the shared lockfile. Create .nklattice-apps.json to declare the exact applications you expect; an unexpected app count must fail the deployment gate. The bundled policy is available at node_modules/@anhcodo13/lattice/governance/policy.json. Read Project governance before collecting the external test and security evidence required by the full eight-domain assessment.
npx lattice governance run . --expect-apps 1 \ --evidence /tmp/nklattice-governance-evidence.jsonThe assessment writes .nklattice-governance/assessment.json and an offline report.html. A missing check produces an incomplete verdict; it is not silently treated as a pass. To tune architecture thresholds or add a module boundary, create .nklattice.json with npx lattice init . and follow Architecture policy.
If the first run fails
Section titled “If the first run fails”| Output | Next check |
|---|---|
No supported source files found |
Confirm the analysis path contains supported JS/TS files outside ignored folders. |
No managed applications found |
Confirm the governance scan path and the app’s inferred or explicit profile. |
No lockfile found |
Commit an npm/pnpm lockfile in the app or its workspace root. |
required ... declared ... locked ... |
Align package.json, regenerate the lockfile, and rerun governance. |