Skip to main content
Free Forever

Add AI Guardrails to Your Existing Project

Lattice Core adds AI guardrails to any project you are already working on. Run one command and it generates version-aware rules for your AI assistant, a verify script, and watch mode that keeps everything current. Works with Cursor and Claude Code. Free forever.

$ 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.

Security Scanning

Run `npx latticeai security-scan --fix` to detect and fix exposed API keys and secrets.

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.

Project Creation

npx latticeai@latest create --id <project-id>New
Create project from Lattice Architect. Allows IDE files (.cursor, .vscode) but blocks conflicting project files.

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.
npx latticeai security-scan --fixNew
Scan for exposed API keys, secrets, and sensitive information. 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.

Utilities

npx latticeai config showNew
View current Lattice configuration. Add --json for raw output.
npx latticeai rules explainNew
Explain what the .cursor/rules.md file does for AI assistants.
npx latticeai ciNew
Generate CI/CD workflow. Use --provider github|gitlab, --dry-run to preview.

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.

Frequently Asked Questions

Is Lattice Core really free forever?

Yes! Lattice Core is completely free with no credit card required. You can use it on unlimited projects forever. We only charge for Lattice Architect (AI project planning), not for Core.

Do I need an account to use Lattice Core?

No account required. Just run `npx latticeai` in any project directory. Core works entirely locally and does not require authentication. You only need an account if you want to use Lattice Architect.

What projects does Lattice Core work with?

Core works with any JavaScript/TypeScript project: Next.js, React, Vue, Node.js, Expo, React Native, and more. It auto-detects your stack and generates version-aware rules automatically.

How does version-aware work?

Core reads your package.json, detects your exact dependency versions, and injects them into AI rules. This prevents AI from suggesting APIs that do not exist in your installed versions.

Can I customize the generated rules?

Yes! The generated .cursor/rules.md and CLAUDE.md files are yours to edit. Run `npx latticeai update` to refresh rules while preserving your customizations.

What is the difference between Core and Architect?

Core adds guardrails to existing projects (free). Architect generates complete project plans for new projects (paid). Architect includes Core automatically, so you get both.

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
Complete Documentation

Lattice Core - Complete User Guide

Everything you need to know about using Lattice Core to keep your code quality high and guide AI assistants correctly.

Read Full Guide

Get Started in 30 Seconds

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

$ npx latticeai
View all features