Getting Started
Prerequisites
- Node.js 24+ (or Deno)
- A JavaScript or TypeScript workspace
Quick Start
The easiest way to get started is with init, which installs Moniq and creates a starter configuration.
bash
npx @udohjeremiah/moniq initbash
pnpm dlx @udohjeremiah/moniq initbash
yarn dlx @udohjeremiah/moniq initbash
bun x @udohjeremiah/moniq initbash
deno run -A npm:@udohjeremiah/moniq initManual Installation
Install Moniq in your workspace root.
bash
npm install -D @udohjeremiah/moniqbash
pnpm add -D -w @udohjeremiah/moniqbash
yarn add -D @udohjeremiah/moniqbash
bun add -D @udohjeremiah/moniqbash
deno add -D npm:@udohjeremiah/moniqCreate a moniq.config.{ts,js,mjs,cjs,mts,cts} file in the workspace root.
ts
import { defineConfig } from "@udohjeremiah/moniq";
export default defineConfig({
scripts: {
build: { command: "tsdown" },
lint: { command: "eslint ." },
},
});Run Moniq
Run Moniq from the workspace root.
bash
npx moniq checkbash
pnpm moniq checkbash
yarn moniq checkbash
bun run moniq checkbash
deno run -A npm:@udohjeremiah/moniq checkIf every policy passes, Moniq exits successfully.
Otherwise, it reports every policy violation found in your workspace.
Next Steps
- Learn how to write policies in the Configuration guide.
- Explore all available CLI commands.
- Set up Moniq in CI.