Skip to main content
Free Forever

Add AI Guardrails to Your Existing Project

Already have a project? Lattice Core adds version-aware rules, verification commands, and keeps your AI assistant up to date. One command, 30 seconds.

$ npx latticeai

Run in your project directory. Lattice auto-detects your stack.

Cursor Claude Code Next.js / Expo / Node

What Lattice Core Does

Version-Aware Rules

Injects your exact stack versions into AI context. Prevents AI from using outdated or deprecated APIs.

AI Editor Support

Generates .cursor/rules.md for Cursor and CLAUDE.md for Claude Code. Both stay in sync.

Verify Command

Run `npm run verify` for fast checks. Add `--full` for complete validation before pushing.

Watch Mode

Run `npm run verify -- --watch` to continuously check your code as you make changes.

Status & Health

Run `npx latticeai status` to view compliance score, drift detection, and check status.

Auto-Update

Run `npx latticeai update` to refresh rules while preserving your customizations.

Prompt Templates

Get 6 AI playbooks for common tasks: feature, bugfix, refactor, test, polish, and security.

Cross-Platform

Works on Windows, macOS, and Linux. Tested across all platforms.

Stack Detection

Automatically detects Next.js, Expo, TypeScript, and more from your package.json.

Complete Commands Reference

Setup

npx latticeai
Interactive setup wizard. Auto-detects your stack and generates everything.
npx latticeai init --detectNew
Auto-detect project type from package.json and initialize Lattice.
npx latticeai setup
One command to do everything: init + generate + apply + verify-rules.
npx latticeai setup --bundle <id>
Apply a pre-configured bundle (e.g., nextjs-saas, expo-mobile).
npx latticeai --help
Show all available commands and options.

Authentication

npx latticeai login
Authenticate with your Lattice account. Links your subscription to the CLI.
npx latticeai logout
Remove CLI credentials and log out.
npx latticeai whoami
Show current login status and account information.

Verification

npm run verify
Fast lint + typecheck. Run frequently during development.
npm run verify -- --full
Full validation: lint, typecheck, test, build. Run before pushing.
npm run verify -- --watch
Watch mode. Re-runs checks automatically when files change.
npx latticeai verify
Run verification checks directly via CLI. Same as npm run verify.
npx latticeai verify-rules
Validate that your .cursor/rules.md file is up to date and correct.
npx latticeai release-check
Validate production readiness. Use --fix to auto-fix issues.

Monitoring

npx latticeai status
View project health: compliance score, drift detection, check status.
npx latticeai drift
Detect deviation from Lattice baseline. Shows what's changed.
npx latticeai diffNew
Show changes since last generation. Supports --json output.
npx latticeai progress
Show PROJECT_GUIDE.md phase completion status.

Maintenance

npx latticeai update
Refresh rules to latest version. Preserves your customizations.
npx latticeai check
Check if a Lattice update is available. Exits with code 1 if yes.
npx latticeai doctorNew
Check environment and prerequisites. Use --fix to auto-fix issues.

What Gets Generated

.cursor/rules.md

AI coding rules for Cursor. Includes stack versions, conventions, and guardrails.

CLAUDE.md

AI coding rules for Claude Code. Same content, different location.

.lattice/config.json

Lattice configuration. Stack detection, preset settings, policy version.

.lattice/prompts/

6 AI playbooks: feature, bugfix, refactor, test, polish, security.

Starting a New Project?

If you're starting from scratch, Lattice Architect is the better choice. Describe your project, get a complete PROJECT_GUIDE.md, tech stack, CI/CD workflows, and a custom setup command. Architect includes Core automatically.

Learn About Architect

Get Started in 30 Seconds

Run one command in your project directory. Lattice Core is free forever.

$ npx latticeai
View all features