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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@impart-security/impart-cli

v0.5.3

Published

Use Impart from the command line

Downloads

51

Readme

impart-cli

Use Impart from the command line.

Linting

The Impart CLI includes an API Specification Linter that ensures your API specifications meet the high quality standards and also remain free from security vulnerabilities. This is achieved with static analysis of your API specification with different rulesets designed for quality and security. The Impart CLI can be configured entirely from the command line, making it easy to integrate into any CI/CD Pipeline.

The API Quality ruleset lints API specifications for conformance with Open API Specifications. The Impart CLI defaults to this ruleset.

The API Security ruleset lints API specifications for OWASP API Security 10 vulnerabilities and misconfigurations. The Impart CLI can be configured to enable this ruleset from the command line.

Usage

$ npm install -g @impart-security/impart-cli
$ impart COMMAND
running command...
$ impart (--version)
@impart-security/impart-cli/0.5.3 linux-x64 node-v22.12.0
$ impart --help [COMMAND]
USAGE
  $ impart COMMAND
...

Usage in CI/CD workflows

impart-cli can be called from within an NPM project or directly via pnpx.

Example usage in a GitHub action using pnpx:

jobs:
  spec-update:
    runs-on: ubuntu-latest
    steps:
      - name: checkout code
        uses: actions/checkout@v3
      - name: setup node
        uses: actions/setup-node@v3
        with:
          node-version: "22"
      - name: Update specification
        run: npx @impart-security/impart-cli specs update --specPath {PATH_TO_SPEC_FILE} --force {YOUR_SPEC_ID}
        env:
          IMPART_ACCESS_TOKEN: ${{ secrets.SPEC_UPDATE_TOKEN }}

Commands

impart autocomplete [SHELL]

Display autocomplete installation instructions.

USAGE
  $ impart autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  (zsh|bash|powershell) Shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  Display autocomplete installation instructions.

EXAMPLES
  $ impart autocomplete

  $ impart autocomplete bash

  $ impart autocomplete zsh

  $ impart autocomplete powershell

  $ impart autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

impart config

View configuration for impart-cli

USAGE
  $ impart config

ALIASES
  $ impart config show

impart config init

Initialize a new configuration for impart-cli

USAGE
  $ impart config init

impart specs

Manage specifications for an organization

USAGE
  $ impart specs

impart specs lint [SPECLOCATION]

Lint a specification

USAGE
  $ impart specs lint [SPECLOCATION] [-r <value>] [--failSeverity error|warn|info|hint] [--displayOnlyFailures]
    [--format json|stylish|junit|html|text|teamcity|pretty]

ARGUMENTS
  SPECLOCATION
      Path, URL or ID of the specification to update.

      Examples:
      impart specs lint ./openapi.yaml
      impart specs lint https://example.com/openapi.yaml
      impart specs lint 1234-5678-9012-3456

      Note: An access token is required to lint a specification by ID in the Impart system:
      https://console.impartsecurity.net/orgs/_/settings/tokens

FLAGS
  -r, --rulesetPath=<value>
      Path to a Spectral ruleset file.

      Example:
      impart specs lint --rulesetPath ./my-ruleset.yaml  ./openapi.yaml

  --displayOnlyFailures
      Only output results equal to or greater than --failSeverity

      Example:
      impart specs lint --displayOnlyFailures ./openapi.yaml

  --failSeverity=<option>
      [default: error]
      Results of this level or above will trigger a failure exit code.

      Example:
      impart specs lint --failSeverity warn ./openapi.yaml

      <options: error|warn|info|hint>

  --format=<option>
      [default: pretty]
      Format to use for outputting results.

      Example:
      impart specs lint --format json ./openapi.yaml

      <options: json|stylish|junit|html|text|teamcity|pretty>

DESCRIPTION
  Lint a specification

  By default, linting uses a set of OWASP-focussed rules, provided by Spectral.

  If you want to modify, disable or add new rules then you can provide your own ruleset file.

  See https://meta.stoplight.io/docs/spectral for more information on how to use Spectral.

impart specs update [SPECID]

Update a specification for an organization

USAGE
  $ impart specs update [SPECID] -p <value> [-n <value>] [-f]

ARGUMENTS
  SPECID  ID of the specification to update. If not provided, you will be prompted to select a specification from a
          list.

          Example:
          impart specs update 1234-5678-9012-3456

FLAGS
  -f, --force             Force update of specification without confirmation (useful for scripting).

                          Example:
                          impart specs update --specPath ./openapi.yaml --force 1234-5678-9012-3456
  -n, --name=<value>      Specification name.

                          Example:
                          impart specs update --name "My API" 1234-5678-9012-3456
  -p, --specPath=<value>  (required)
                          Path to the specification file (YAML or JSON, Swagger2.0 or OpenAPI3.0).

                          Example:
                          impart specs update --specPath ./openapi.yaml 1234-5678-9012-3456