npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lexq/cli

v0.1.30

Published

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

Readme

LexQ CLI

The Decision Operations Platform for engineering teams. CLI and MCP server for LexQ — move business rules out of your deploy pipeline, prove every change with Impact Simulation, and ship without a git push.

Website · Docs · Console

npm License


Why LexQ?

Your business rules — pricing, promotions, fee logic, eligibility checks — change often. But every change ships through the same PR → review → staging → deploy cycle as your core application code. A one-line discount rule takes two weeks.

This is an architectural problem, not a process problem. Business logic that changes weekly shouldn't live in code that ships quarterly.

LexQ separates the two. Rules live outside your application. You change them in a visual console or through this CLI. You prove every change with Impact Simulation against real execution data. You deploy without touching your codebase.

Every decision leaves a full audit trace.

Install

npm install -g @lexq/cli

Or run without installing:

npx @lexq/cli

Requires Node.js 18+.

Quick Start

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

# 2. Verify
lexq auth whoami

# 3. Start from a domain template — provisions facts, sample rules, and a policy group
lexq domain-templates list
lexq domain-templates apply --template ECOMMERCE
# Returns: policyGroupId, policyVersionId, factsCreated, rulesCreated

# 4. Test a rule against your data before shipping
lexq analytics dry-run --version-id <VERSION_ID> --debug --mock \
  --json '{"facts":{"loyalty_tier":"PLATINUM","purchase_subtotal_usd":150}}'

# 5. 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"

For AI Agents — the Complete Partner API

LexQ is designed to be AI-native. The entire policy engine Partner API is exposed via Model Context Protocol. Claude, Cursor, and other MCP-compatible agents can create, simulate, and deploy rules autonomously, with human approval before production.

Claude.ai (Cloud — no install)

  1. Settings → Connectors → Add Custom Integration
  2. Enter: https://mcp.lexq.io
  3. Sign in with your LexQ account and select an API key
  4. Done — the full toolset available in every conversation

Remote (Streamable HTTP)

For any MCP client that supports remote servers:

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

OAuth 2.1 authentication is handled automatically by your client.

Local (stdio)

Run LexQ CLI as a local MCP server:

lexq serve --mcp

Claude Desktop

Add to claude_desktop_config.json:

{
  "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"
      ]
    }
  }
}

Prerequisite: lexq auth login must have been run once to store an API key in ~/.lexq/config.json.

AI Agent Skills

LexQ CLI ships with AI Agent Skills — structured documentation agents read to understand how to use the tools, not just what they are.

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, Impact 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

After installing @lexq/cli, agents can read skills from:

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

Commands

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 domain-templates      list | preview | apply
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

Global Options

| Flag | Description | |--------------------------|--------------------------------------------| | --format <json\|table> | Output format (default: json) | | --api-key <key> | Override stored API key | | --base-url <url> | Override API base URL | | --dry-run | Preview the HTTP request without executing | | --verbose | Show request/response details | | --no-color | Disable colored output |

Configuration

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

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

Development

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

License

Apache-2.0