# @lexq/cli

LexQ CLI — manage policies, simulate rules, and deploy from the terminal. Built for humans and AI agents.

- **Type:** MCP server
- **Trust:** 85/100 (A), scored on the package rubric
- **Verification:** verified (build provenance)
- **Version:** 1.1.0
- **Author:** LexQ, LLC
- **License:** Apache-2.0
- **npm:** @lexq/cli
- **Endpoints:** streamable-http https://mcp.lexq.io/mcp
- **Source:** https://github.com/lexq-io/lexq-cli
- **Endpoint health:** reachable (last checked 2026-10-04T02:34:15.030Z, 3 samples) — uptime is not a security property and is not part of the trust score
- **Compatible clients:** claude-code, cursor, copilot, chatgpt, gemini (basis: transport)

## Trust

85/100 (A), scored on the package rubric
- Publisher verified: no
- Build provenance: verified attestation
- npm trusted publishing (OIDC): yes
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 22 days

## Security scan

- **Status:** clean
- **Scanned:** 2026-09-13T10:13:15.752Z
- **Version scanned:** 0.4.0
- **CVEs:** none found by OSV at scan time

## Tools

40 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `lexq_whoami` — Show current authentication info (tenant ID, user ID, role).
- `lexq_groups_list` — List all policy groups (tenant-wide, priority ASC).
- `lexq_groups_get` — Get a single policy group by ID.
- `lexq_groups_create` — Create a new policy group. Requires name. Priority is auto-assigned (appended last, tenant-wide); use lexq_groups_reorder to change order. Optionally set confli
- `lexq_groups_update` — Update a policy group. Only provided fields are updated; omitted fields remain unchanged.
- `lexq_groups_delete` — Archive a policy group. Only non-live groups can be deleted. This is irreversible.
- `lexq_groups_reorder` — Reorder policy groups by priority. Priority is tenant-wide and flat (1...N continuous); array index 0 = priority 1 (highest precedence). activationGroup is not 
- `lexq_ab_test_start` — Start an A/B test on a policy group. Requires a challenger version ID and traffic rate. The split is computed from context.trafficKey on each execution request;
- `lexq_ab_test_stop` — Stop a running A/B test. All traffic is restored to the control (current) version.
- `lexq_ab_test_adjust` — Adjust traffic rate of a running A/B test.
- `lexq_versions_list` — List all versions of a policy group.
- `lexq_versions_get` — Get a single version by ID, including its rules and fact requirements.
- `lexq_versions_create` — Create a new DRAFT version in a policy group. Optionally provide a commit message and effective date range.
- `lexq_versions_update` — Update a DRAFT version. Only DRAFT versions can be modified. Only provided fields are changed.
- `lexq_versions_delete` — Delete a DRAFT version. Only DRAFT versions can be deleted.
- `lexq_versions_clone` — Clone an existing version to create a new DRAFT. Useful when the source version is already published.
- `lexq_rules_list` — List all rules in a version (priority ASC). Returns summary with conditionSummary and actionSummary.
- `lexq_rules_get` — Get full rule detail including condition tree and action definitions.
- `lexq_rules_create`
- `lexq_rules_update` — Update an existing rule in a DRAFT version. Only provided fields are changed.
- `lexq_rules_delete` — Delete a rule from a DRAFT version.
- `lexq_rules_reorder` — Reorder rules by specifying rule IDs in desired order. Priorities are assigned 1...N (1-based, continuous); array index 0 = priority 1 (highest precedence).
- `lexq_rules_toggle` — Enable or disable a rule without deleting it.
- `lexq_facts_list` — List all fact definitions (input variable schema). Shows key, type, required, and PII status. Always check this before creating rules.
- `lexq_facts_create` — Register a new input variable. Key starts with a letter, then letters, numbers, and underscores (e.g. paymentAmount). Casing is not enforced. Types: STRING, NUM
- `lexq_facts_update` — Update a fact definition. The key is immutable. The type can change only while no rule references the fact; if any does, the call fails with FD-007 and reports 
- `lexq_facts_delete` — Delete a fact definition. System facts cannot be deleted. Neither can a fact that any rule references: that call fails with FD-006 and reports the count. Remove
- `lexq_facts_action_metadata`
- `lexq_facts_unregistered` — List facts referenced by a version's rules but not yet defined (read-only — does not block publish/deploy, INV-4). Version-wide: covers every rule in the versio
- `lexq_facts_export` — Export the fact catalog. The two formats carry different things: CSV is the catalog as it stands, system facts included, for reading in a spreadsheet; JSON matc
- `lexq_deploy_publish` — Publish a DRAFT version (DRAFT → ACTIVE). Locks the version from further edits. Must have at least one rule. Undefined facts referenced by rules do not block pu
- `lexq_deploy_live` — Deploy an ACTIVE (published) version to live traffic. Takes effect immediately. Versions whose effective start date has not arrived are rejected (P-037) — use l
- `lexq_deploy_rollback` — Rollback to the previous deployed version. Only available if there is a previous version.
- `lexq_deploy_undeploy` — Remove the live version from traffic. The version stays ACTIVE but no longer serves requests.
- `lexq_deploy_schedule` — Schedule an ACTIVE version with a future effective start date to auto-deploy at that time (Scheduled Deployment). One pending schedule per group; manual deploy/
- `lexq_deploy_unschedule` — Cancel the pending scheduled deployment for a group. The version itself is not affected. Fails with P-039 if no pending schedule exists.
- `lexq_deploy_schedules` — List scheduled deployments across all groups (all statuses: PENDING, EXECUTED, CANCELED, FAILED), newest first.
- `lexq_deploy_history` — List deployment history across all groups.
- `lexq_deploy_detail` — Get detailed info about a specific deployment including snapshot hash and integrity check.
- `lexq_deploy_overview` — Show current deployment status of all groups — which version is live, last deployment type, and deployer.

## Install

**Verdict: install** — No blocking findings and no open coverage gaps — safe to install as configured.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"cli\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@lexq/cli\"\n      ],\n      \"env\": {\n        \"LEXQ_API_KEY\": \"<YOUR_LEXQ_API_KEY>\"\n      }\n    }\n  }\n}"
```
**Credentials it will ask for** (names only — Forge never holds a value):
- `LEXQ_API_KEY` — Lexq API Key (required)
Placeholders only. Forge never holds, brokers, or transmits a credential value — replace each <YOUR_NAME> in your own config file. Do not send a value back to Forge; no Forge endpoint accepts one.
- This entry needs 1 credential (1 required). The generated config carries placeholders, so it will fail in the editor rather than at runtime if they are left unset.

## Blast radius

Extensive blast radius — deletes data; runs locally and hosted.
- Floor 58, ceiling 58 (tier: extensive)
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/%40lexq%2Fcli
- Install plan: https://forgeregistry.com/api/v1/packages/%40lexq%2Fcli/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/%40lexq%2Fcli
- HTML page: https://forgeregistry.com/registry/%40lexq%2Fcli
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
