Skip to main content

What is LexQ CLI?

LexQ CLI (@lexq/cli) is a command-line tool for managing the full policy lifecycle — from creating policy groups to deploying versions to production. It covers everything the Console does, plus it works as an MCP Server for AI agent integration.

Key Features

Full Policy Lifecycle

Create, test, publish, and deploy policies entirely from the terminal.

AI Agent Ready

Includes agent skills, schemas, and MCP Server mode for AI-powered automation.

Dry Run & Impact Simulation

Validate rules with Dry Run (single input) or Impact Simulation (historical data) before deploying.

JSON & Table Output

Machine-readable JSON (default) or human-readable table format.

Architecture

The CLI calls the LexQ API via API Key authentication.

Two Modes

1. CLI Mode

Standard command-line usage:

2. MCP Server Mode

Connect AI agents to LexQ. Two connection methods available: Cloud (Claude.ai) — No install required. Add https://mcp.lexq.io as a Custom Integration in Claude.ai settings. OAuth handles authentication automatically. Local (stdio) — For Claude Desktop, VS Code, Cursor, and other desktop tools:
Both methods expose the same full toolset. See the MCP Server Setup Guide.

For AI Agent Developers

The npm package includes agent-readable documentation:

Next Steps

Installation

Install the CLI and authenticate.

Command Reference

Full list of all commands.

MCP Server

Connect Claude.ai, VS Code, and other AI tools.