Skip to main content
Glama

LexQ CLI

Die Entscheidungsplattform für Engineering-Teams. CLI und MCP-Server für LexQ — verlagern Sie Geschäftsregeln aus Ihrer Deployment-Pipeline, belegen Sie jede Änderung mit Simulationen und veröffentlichen Sie ohne einen Git-Push.

Website · Dokumentation · Konsole

npm Lizenz


Warum LexQ?

Ihre Geschäftsregeln – Preisgestaltung, Werbeaktionen, Gebührenlogik, Berechtigungsprüfungen – ändern sich häufig. Aber jede Änderung durchläuft denselben PR → Review → Staging → Deployment-Zyklus wie Ihr Kernanwendungscode. Eine einzeilige Rabattregel benötigt zwei Wochen.

Dies ist ein architektonisches Problem, kein Prozessproblem. Geschäftslogik, die sich wöchentlich ändert, sollte nicht in Code leben, der vierteljährlich ausgeliefert wird.

LexQ trennt beides. Regeln leben außerhalb Ihrer Anwendung. Sie ändern sie in einer visuellen Konsole oder über diese CLI. Sie belegen jede Änderung mit Batch-Simulationen anhand echter Ausführungsdaten. Sie führen Deployments durch, ohne Ihren Codebase zu berühren.

Jede Entscheidung hinterlässt eine vollständige Audit-Spur.

Installation

npm install -g @lexq/cli

Oder führen Sie es ohne Installation aus:

npx @lexq/cli

Erfordert Node.js 18+.

Schnellstart

# 1. Authenticate
lexq auth login
# Enter your API key (create one at console.lexq.io → Management → API Keys)

# 2. Verify
lexq auth whoami

# 3. Create a policy group
lexq groups create --json '{"name":"my-policy","priority":0}'

# 4. Create a draft version
lexq versions create --group-id <GROUP_ID> --json '{"commitMessage":"v1"}'

# 5. Add a rule
lexq rules create --group-id <GROUP_ID> --version-id <VERSION_ID> --json '{
  "name": "VIP Discount",
  "priority": 0,
  "condition": {
    "type": "SINGLE",
    "field": "customer_tier",
    "operator": "EQUALS",
    "value": "VIP",
    "valueType": "STRING"
  },
  "actions": [{
    "type": "DISCOUNT",
    "parameters": {"method":"PERCENTAGE","rate":10,"refVar":"payment_amount"}
  }]
}'

# 6. Test against your data before shipping
lexq analytics dry-run --version-id <VERSION_ID> --debug --mock \
  --json '{"facts":{"customer_tier":"VIP","payment_amount":100000}}'

# 7. Deploy
lexq deploy publish --group-id <GROUP_ID> --version-id <VERSION_ID> --memo "v1"
lexq deploy live --group-id <GROUP_ID> --version-id <VERSION_ID> --memo "Initial deploy"

Für KI-Agenten — 63 MCP-Tools

LexQ ist als KI-native Lösung konzipiert. Die gesamte Policy-Engine-API — alle 63 Tools — wird über das Model Context Protocol bereitgestellt. Claude, Cursor und andere MCP-kompatible Agenten können Regeln autonom erstellen, simulieren und bereitstellen, mit menschlicher Genehmigung vor der Produktion.

Claude.ai (Cloud — keine Installation)

  1. Einstellungen → Connectors → Benutzerdefinierte Integration hinzufügen

  2. Eingabe: https://mcp.lexq.io

  3. Melden Sie sich mit Ihrem LexQ-Konto an und wählen Sie einen API-Schlüssel aus

  4. Fertig — 63 Tools in jedem Gespräch verfügbar

Remote (Streamable HTTP)

Für jeden MCP-Client, der Remote-Server unterstützt:

{
  "mcpServers": {
    "lexq": {
      "url": "https://mcp.lexq.io"
    }
  }
}

Die OAuth 2.1-Authentifizierung wird automatisch von Ihrem Client übernommen.

Lokal (stdio)

Führen Sie die LexQ CLI als lokalen MCP-Server aus:

lexq serve --mcp

Claude Desktop

Fügen Sie dies zu claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "lexq": {
      "command": "npx",
      "args": [
        "-y",
        "@lexq/cli",
        "serve",
        "--mcp"
      ]
    }
  }
}

VS Code / Cursor

.vscode/mcp.json:

{
  "servers": {
    "lexq": {
      "command": "npx",
      "args": [
        "-y",
        "@lexq/cli",
        "serve",
        "--mcp"
      ]
    }
  }
}

Voraussetzung: lexq auth login muss einmal ausgeführt worden sein, um einen API-Schlüssel in ~/.lexq/config.json zu speichern.

KI-Agenten-Fähigkeiten

Die LexQ CLI wird mit KI-Agenten-Fähigkeiten ausgeliefert — strukturierte Dokumentation, die Agenten lesen, um zu verstehen, wie die Tools verwendet werden, nicht nur was sie sind.

skills/
├── lexq-shared/SKILL.md       Core concepts, auth, workflow
├── lexq-groups/SKILL.md       Policy groups, conflict resolution, A/B testing
├── lexq-rules/SKILL.md        Condition syntax, action types, mutex
├── lexq-simulation/SKILL.md   Dry run, batch simulation, compare
├── lexq-execution/SKILL.md    Execution history, stats, failure logs
└── lexq-recipes/SKILL.md      End-to-end recipes

.claude/CLAUDE.md              Claude Code project context
AGENTS.md                      Universal agent guide (Cursor, Windsurf, Gemini CLI, Cline)
CONTEXT.md                     Platform architecture & glossary

Nach der Installation von @lexq/cli können Agenten Fähigkeiten lesen von:

node_modules/@lexq/cli/skills/
node_modules/@lexq/cli/AGENTS.md
node_modules/@lexq/cli/CONTEXT.md

Befehle

lexq auth                  login | logout | whoami
lexq status                API health check
lexq serve                 Run as MCP stdio server (--mcp)
lexq groups                list | get | create | update | delete
lexq groups ab-test        start | stop | adjust
lexq versions              list | get | create | update | delete | clone
lexq rules                 list | get | create | update | delete | reorder | toggle
lexq facts                 list | create | update | delete | action-metadata
lexq deploy                publish | live | rollback | undeploy | history | detail | overview | deployable | diff
lexq analytics             dry-run | dry-run-compare | requirements
lexq analytics simulation  start | status | list | cancel | export
lexq analytics dataset     upload | template
lexq history               list | get | stats
lexq integrations          list | get | save | delete | config-spec
lexq logs                  list | get | action | bulk-action
lexq webhook-subscriptions list | get | save | delete | test

Globale Optionen

Flag

Beschreibung

--format <json|table>

Ausgabeformat (Standard: json)

--api-key <key>

Gespeicherten API-Schlüssel überschreiben

--base-url <url>

API-Basis-URL überschreiben

--dry-run

HTTP-Anfrage ohne Ausführung in der Vorschau anzeigen

--verbose

Anfrage-/Antwortdetails anzeigen

--no-color

Farbige Ausgabe deaktivieren

Konfiguration

Die Konfiguration wird unter ~/.lexq/config.json gespeichert:

{
  "apiKey": "YOUR_API_KEY",
  "baseUrl": "https://api.lexq.io/api/v1/partners",
  "format": "json"
}

Entwicklung

git clone https://github.com/lexq-io/lexq-cli.git
cd lexq-cli
pnpm install
pnpm build
pnpm start -- groups list
pnpm typecheck                  # Type check
pnpm lint                       # ESLint
bash tests/e2e.sh               # CLI E2E tests (requires API key)
bash tests/test-engine-api.sh   # Engine API integration tests

Lizenz

Apache-2.0

A
license - permissive license
-
quality - not tested
C
maintenance

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lexq-io/lexq-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server