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

@quatrain/cli

v1.1.14

Published

Quatrain Core CLI for generating configurations and migrations

Downloads

127

Readme

@quatrain/cli

The official Command Line Interface (CLI) and script utility library for the Quatrain ecosystem.

This package serves two distinct purposes:

  1. Programmatic Utilities (Library API): Exported classes and prompt helpers to build interactive scripts and run system subprocesses (e.g. within agent skills).
  2. Core Command-Line Executable (core): A global terminal command runner to scaffold projects, generate configurations, and manage deployments.

1. Programmatic Utilities (Library API)

Import these utilities directly in your TypeScript/JavaScript scripts to interact with the user or run external processes.

A. Fluent Command Executor (Command)

The Command class provides a cross-platform, fluent builder-pattern interface to execute system subprocesses. It simplifies spawning commands, passing arguments, setting working directories, extending environment variables, and supports PowerShell routing.

import { Command } from '@quatrain/cli';

const result = await Command.create('kubectl')
  .arg('apply')
  .arg('-f')
  .arg('deployment.yaml')
  .cwd('/path/to/project')
  .env({ KUBECONFIG: '/path/to/config' })
  .execute();

if (result.success) {
  console.log(`Success: ${result.stdout}`);
} else {
  console.error(`Exit code: ${result.code}, Error: ${result.stderr}`);
}

Fluent Methods:

  • Command.create(bin) / new Command(bin): Start building a command for the given binary.
  • .arg(value) / .args([values]): Append command-line arguments.
  • .cwd(dir): Set the execution working directory.
  • .env({ KEY: VALUE }): Set or extend environment variables.
  • .inherit(): Direct stdout and stderr to the parent process terminal.
  • .usePowerShell(use, type): Force process execution through PowerShell (powershell.exe or pwsh) with safe quote escaping.
  • .execute(): Run the process asynchronously and return { stdout, stderr, code, success }.

B. Interactive Prompt Helpers

Helpers wrapping inquirer to prompt user inputs cleanly:

import { askConfirm, askInput, askChoice } from '@quatrain/cli';

// Yes/No Confirmations
const proceed = await askConfirm('Do you want to deploy now?');

// String Inputs
const name = await askInput('Enter your username:', 'default_user');

// Multi-choice select lists
const selected = await askChoice('Select action:', [
  { name: 'Sync Google Calendar', value: 'sync' },
  { name: 'Reset Database', value: 'reset' }
]);

2. Core Command-Line Executable

A global CLI tool invoked via the core command (or quatrain depending on symlinks).

Installation

Install globally or run on-the-fly:

# Global
bun add -g @quatrain/cli

# Run on the fly
bunx @quatrain/cli <command>

Commands Reference

core deploy

Manage Kubernetes deployments (create, list, modify, promote, delete namespaces and manifests).

core generate scaffold <project-name>

Initialize a new Quatrain project structure:

  • Sets up directories: apps/, data/, config/, packages/, migrations/.
  • Generates a monorepo-ready workspace package.json and a pre-configured tsconfig.json.

core generate config

Start an interactive wizard to generate the quatrain.json bootloader configuration file.

core generate migration <name>

Scaffold a timestamped TypeScript migration file (e.g., migrations/20260427_name.ts) with template up() and down() blocks.


Language Guidelines

Recommendation: All text contents (logs, console prints, commit messages, comments) within the Quatrain ecosystem must be written in International English to ensure global team maintainability.