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

@onta.nicolae/tsql-tools

v0.1.0

Published

Poor Man's T-SQL formatting and sqlcmd tasks for Zed

Readme

Zed T-SQL Tools

Format SQL Server scripts with Poor Man's T-SQL Formatter. Includes a Zed language server adapter, a standalone formatter, and an experimental sqlcmd query helper.

Status: pre-release. The external formatter works in Zed on Linux. Windows and adapter acceptance checks are still pending; see release status. The extension is not yet in Zed's gallery.

Try it from source

Requires Node.js 22+ and Zed's SQL extension for syntax highlighting. From this checkout:

npm ci --ignore-scripts
node bin/zed-settings.js

Merge the printed languages.SQL block into your Zed user settings. It contains absolute paths for this machine. Project settings override user settings: remove old project-specific formatter paths if necessary. Run editor: format in a SQL file. Formatting on save starts disabled.

The settings command only prints JSON; it does not overwrite editor preferences. Keep the checkout in place. This repository's own .zed/settings.json already uses the local formatter.

Standalone, from fish:

node bin/format.js --config examples/formatter.json < input.sql > formatted.sql

Use a different output file: redirecting to the input file truncates it before it can be read. SQL goes to stdout; errors go to stderr with a failing exit status. Formatting never connects to a database.

What it does

  • Uses Poor Man's formatting engine, with explicit options.
  • Preserves standalone GO and GO count directives outside strings/comments.
  • Returns no replacement text when a batch fails to parse.
  • Formats unsaved buffers through a local stdin/stdout language server.
  • Generates machine-specific Zed settings and supports portable offline packages.

The upstream parser is coarse. It is not a SQL validator, and newer T-SQL syntax may be unsupported. See formatting behavior and limits.

Other machines and the extension

Portable installation works before public publishing. The development adapter lives in extension/; run node bin/zed-settings.js --lsp for local LSP settings after installing it as a dev extension. Automatic downloads remain disabled until the maintainer configures and publishes the npm package.

Publishing guide: account names, repository setup, npm release, manual Zed testing, and the community registry PR. No website or backend deployment is needed.

Query helper

The optional query helper runs a saved SQL file through Microsoft's sqlcmd, using a named connection profile. Results appear in the terminal. It does not provide an object explorer, result grid, or persistent database session. Live SQL Server validation is pending. Execute trusted scripts only.

Development and security

npm test
npm run test:package

See CONTRIBUTING.md, SECURITY.md, and CHANGELOG.md. Tests do not connect to a database.

Node tools: AGPL-3.0-only. Rust adapter: MIT. Poor Man's engine and other dependencies retain their own notices; see THIRD_PARTY.md.