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

@open-truss/uqi

v1.0.1

Published

Unified Query Interface - a unified query client builder for any data source

Readme

uqi, a unified query interface

pronounced: yoo-kee

What is uqi?

It is a query client and client builder that can be used to wrap any data source client and present a unified query interface.

Migration from @open-truss/open-truss

In June 2026 we moved uqi out of the @open-truss/open-truss package. UQI types and helpers (uqi, UqiClient, UqiContext, UqiSettings, UqiStatus, UqiResult, UqiYieldResult, UqiColumn, UqiMappedType, UqiScalar, UqiNamedFieldsRow, UqiMetadata, Iterator) are now in their own package @open-truss/uqi.

Before:

import { type UqiClient, uqi } from '@open-truss/open-truss'

After:

import { type UqiClient, uqi } from '@open-truss/uqi'

Aspirational Examples

These examples are not yet implemented, but are the goal of this project. See the example folder for an example implementation.

Querying a CSV file

import createClient from 'path/to/csv-client-uqi'
const client = await createClient({ path: 'path/to/folder' })
const queryIterator = await client.query('SELECT first_name FROM users.csv')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()

Querying a JSON file

import createClient from 'path/to/json-client-uqi'
const client = await createClient({ path: 'path/to/users.json', queryLanguage: 'jq' })
const queryIterator = await client.query('.[] | select(.first_name | startswith("J")) | .first_name')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()

Querying a MySQL database

import createClient from 'path/to/mysql-client-uqi'
const client = await createClient({
  hostname: process.env.MYSQL_HOSTNAME,
  username: process.env.MYSQL_USERNAME,
  password: process.env.MYSQL_PASSWORD,
  database: process.env.MYSQL_DATABASE,
})
const queryIterator = await client.query('SELECT first_name FROM users')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()

Querying a Trino database

import createClient from 'path/to/trino-client-uqi'
const client = await createClient({
  server: process.env.TRINO_URI,
  auth: new BasicAuth(process.env.TRINO_USER_IDENTIFIER, ),
  source: 'acme/production',
})
const queryIterator = await client.query('SELECT first_name FROM acme.production.users')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()

Querying a Kusto database

import createClient from 'path/to/kusto-client-uqi'
const client = await createClient({
  hostname: process.env.KUSTO_HOSTNAME,
  username: process.env.KUSTO_USERNAME,
  password: process.env.KUSTO_PASSWORD,
})
const queryIterator = await client.query('acme.production.users | project first_name')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()

Querying a Rest API

import createClient from 'path/to/rest-client-uqi'
const client = await createClient({
  url: 'http://localhost:3000',
})
const queryIterator = await client.query('GET /users')

for await (const { row, metadata } of queryIterator) {
  console.log({ metadata })
  metadata.columns.forEach((column, i) => {
    console.log({ [column.name]: row[i] })
  })
}

await client.teardown()