Skip to content

setup node

LoFi edited this page Jan 26, 2026 · 1 revision

Setup: Node.js

1. Install LoFi Gate

Install the package using Python's package manager:

pip install lofi-gate

2. Initialize Physics

Scaffold the configuration into your workspace:

lofi-gate init

This creates .agent/skills/lofi-gate/.

3. Configure package.json

Add the following scripts to your package.json:

{
  "scripts": {
    "lofi-gate": "lofi-gate verify --parallel",
    "test": "npm run lofi-gate",
    "test:agent": "jest --onlyChanged",
    "lint": "eslint ."
  }
}

Note: test:agent is the "Speed Lane". Configure your test runner (Jest/Vitest) to run only changed files.

4. Install Husky (Optional but Recommended)

Prevent messy commits by running the gate on push.

npm install husky --save-dev
npx husky init
echo "npm test" > .husky/pre-push

5. Verify

Run the gate manually:

npm run lofi-gate

Clone this wiki locally