Skip to main content

Requirements

  • Node.js 18 or later
  • An active LexQ account with an API key

Installation

Verify: lexq --version

Authentication

Step 1: Get Your API Key

  1. Log in to the LexQ Console
  2. Navigate to Management → API Keys
  3. Click Generate New Key
  4. Choose the Manage scope
  5. Copy the key (format: lexq_us_xxxxxxxxxxxxx)
The CLI needs a key with the Manage scope. Execute only is the default, and a key with that scope returns 403 on every CLI command that reads or changes policies.
An API key acts on behalf of your organization within its scope. Store it securely and never commit it to version control.

Step 2: Log In

The key is persisted at ~/.lexq/config.json.

Step 3: Verify

Configuration

Config is stored at ~/.lexq/config.json:

Global Options

Every command accepts these flags:
For AI agents: Always use --format json (the default). Parse JSON output programmatically. Use --format table only for human-readable display.

Next Steps

Command Reference

Browse all available commands.

MCP Server

Set up AI agent integration via MCP.