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

@number10/ci-runner-cli

v0.2.1

Published

CLI runner package for ci-runner.

Readme

@number10/ci-runner-cli

Typed, config-driven CI command runner for local development and CI environments.

@number10/ci-runner-cli helps you replace ad-hoc shell scripts with a predictable pipeline runner that is easy to read, version, and maintain.

Why Use It

Most CI scripts start simple and become fragile over time:

  • inconsistent output across projects
  • unclear failure handling
  • duplicated retry/timeout logic
  • hard-to-parse logs in CI systems

ci-runner gives you one consistent contract:

  • explicit step model (id, name, command, enabled, timeout, retry, optional)
  • deterministic exit behavior (0 pass, 1 hard failure)
  • compact human output (pretty) or machine output (json)
  • typed config support for editor feedback (ci.config.ts)
  • optional watch mode for local feedback loops

Install

pnpm add -D @number10/ci-runner-cli

VS Code Extension (Recommended)

For the best local workflow, use the official VS Code extension:

It provides a more streamlined experience to discover and run ci-runner targets directly from the editor.

Usage

ci-runner --format pretty

Quick Start

Create ci.config.json:

{
  "steps": [
    { "id": "lint", "name": "Lint", "command": "pnpm run lint" },
    { "id": "test", "name": "Test", "command": "pnpm run test" }
  ]
}

Run:

ci-runner --format pretty

Use JSON output in CI:

ci-runner --format json

What You Get

  • Stable step orchestration with retries and timeouts.
  • Optional non-blocking steps (optional: true) for best-effort checks.
  • Conditional execution via environment filters (when.env).
  • Readable local output and complete machine-readable output.
  • Type-safe config authoring with @number10/ci-runner-cli/types.

Config File

The CLI loads ci.config.ts or ci.config.json.

Example:

{
  "continueOnError": true,
  "cwd": ".",
  "output": {
    "format": "pretty",
    "verbose": false
  },
  "watch": {
    "exclude": ["**/*.log", "packages/ci-runner-cli/generated/**"]
  },
  "env": {
    "CI": "true"
  },
  "steps": [
    {
      "id": "lint",
      "name": "Lint",
      "command": "pnpm run lint",
      "enabled": true
    },
    {
      "id": "test",
      "name": "Unit Tests",
      "command": "pnpm run test",
      "timeoutMs": 60000,
      "optional": false,
      "retry": {
        "maxAttempts": 2,
        "delayMs": 250,
        "retryOnTimeout": false
      },
      "when": {
        "env": {
          "RUN_TESTS": "true"
        }
      }
    }
  ],
  "targets": [
    {
      "id": "quick",
      "name": "Quick Checks",
      "includeStepIds": ["lint", "test"]
    },
    {
      "id": "no-build",
      "name": "Without Build",
      "excludeStepIds": ["build"]
    }
  ]
}

Typed TypeScript example:

import type { CiRunnerConfig } from '@number10/ci-runner-cli/types'

const config = {
  output: {
    format: 'pretty',
  },
  steps: [
    {
      id: 'lint',
      name: 'Lint',
      command: 'pnpm run lint',
    },
    {
      id: 'test',
      name: 'Unit Tests',
      command: 'pnpm run test',
      retry: {
        maxAttempts: 2,
        delayMs: 250,
      },
    },
  ],
} satisfies CiRunnerConfig

export default config

CLI Flags

  • --config <path> Explicit config file path.
  • --target <id> Run only one configured target id.
  • --list-targets Print configured targets and exit.
  • --format <pretty|json> Output format override.
  • --verbose Print stdout/stderr also for successful steps in pretty mode.
  • --watch Re-run on file changes.
  • --fail-fast Stop after first hard failure.
  • --cwd <path> Base working directory.
  • -h, --help Show usage help.

Named Targets

Use targets to expose reusable subsets without duplicating step definitions:

In large monorepos, targets are useful for defining a small set of frequent workflows so developers do not need to navigate long script lists each time. Targets complement existing scripts; they do not replace them.

  • includeStepIds: allow-list of steps.
  • excludeStepIds: deny-list applied after include filtering.

Run one target:

ci-runner --target quick --format pretty

List configured targets for editor integrations:

ci-runner --list-targets --format json

Sample output shape:

{
  "targets": [
    { "id": "quick", "name": "Quick Checks" },
    { "id": "full", "name": "Full Pipeline" }
  ]
}

The command exits after discovery and does not execute any step commands.

Watch Mode

  • Runs the pipeline once, then watches the selected --cwd recursively for changes.
  • Debounces rapid events and queues one rerun while a run is active.
  • Stops cleanly on SIGINT/SIGTERM (for example Ctrl+C).
  • Falls back to a single run when recursive watch is unavailable or the watcher fails at runtime (for example EMFILE limits).
  • Ignores common generated paths by default (node_modules, .git, dist, coverage, out, build, .tmp, .vite, .vite-temp, .turbo, and *.tsbuildinfo files).

Use config-level exclusions when needed:

{
  "watch": {
    "exclude": ["dist", "**/*.log", "packages/*/tmp/**"]
  }
}

Run Profiles

  • standard: single run without watch mode.
  • watch: continuous reruns on file changes.
  • fail-fast: stop immediately on the first hard failure.

Profiles are command-line presets often used by integrations (for example the VS Code extension).

Step Controls

  • enabled (default true): temporarily disable a step without removing it.
  • optional (default false): failed step is marked as skipped and does not fail the run.

Output Modes

  • pretty: concise success output, detailed failure diagnostics.
  • json: full run payload with step results, summary, timestamps, and exit code.

Exit Behavior

  • Exit code 0: no hard failures.
  • Exit code 1: at least one failed or timed_out step.
  • optional step failures become skipped and do not fail the run.

Public Surface

This package exposes:

  • the executable CLI (ci-runner)
  • user-facing config types (@number10/ci-runner-cli/types)

Runtime internals are intentionally private and not part of the public API contract.