open-index/open-npm huggingface dataset:
npm package: @oclif/color
Description: @oclif/color ============
Author: Salesforce
Latest version: 1.0.13

@oclif/color
============

**This package has been deprecated.**

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/color.svg)](https://npmjs.org/package/@oclif/color)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/color.svg)](https://npmjs.org/package/@oclif/color)
[![License](https://img.shields.io/npm/l/@oclif/color.svg)](https://github.com/oclif/color/blob/main/package.json)
npm package: @oclif/command
Description: oclif base command
Author: Salesforce
Latest version: 1.8.36
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/command
===============

**This library been replaced by [@oclif/core](https://github.com/oclif/core) and is now in maintenance mode. We will only consider PRs that address security concerns.**

oclif base command

[![Version](https://img.shields.io/npm/v/@oclif/command.svg)](https://npmjs.org/package/@oclif/command)
[![CircleCI](https://circleci.com/gh/oclif/command/tree/main.svg?style=shield)](https://circleci.com/gh/oclif/command/tree/main)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/command?branch=main&svg=true)](https://ci.appveyor.com/project/heroku/command/branch/main)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/command/badge.svg)](https://snyk.io/test/npm/@oclif/command)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/command.svg)](https://npmjs.org/package/@oclif/command)
[![License](https://img.shields.io/npm/l/@oclif/command.svg)](https://github.com/oclif/command/blob/main/package.json)

This is about half of the main codebase for oclif. The other half lives in [@oclif/config](https://github.com/oclif/config). This can be used directly, but it probably makes more sense to build your CLI with the [generator](https://github.com/oclif/oclif).

Usage
=====

Without the generator, you can create a simple CLI like this:

**TypeScript**
```js
#!/usr/bin/env ts-node

import * as fs from 'fs'
import {Command, flags} from '@oclif/command'

class LS extends Command {
  static flags = {
    version: flags.version(),
    help: flags.help(),
    // run with --dir= or -d=
    dir: flags.string({
      char: 'd',
      default: process.cwd(),
    }),
  }

  async run() {
    const {flags} = this.parse(LS)
    let files = fs.readdirSync(flags.dir)
    for (let f of files) {
      this.log(f)
    }
  }
}

LS.run()
.catch(require('@oclif/errors/handle'))
```

**JavaScript**
```js
#!/usr/bin/env node

const fs = require('fs')
const {Command, flags} = require('@oclif/command')

class LS extends Command {
  async run() {
    const {flags} = this.parse(LS)
    let files = fs.readdirSync(flags.dir)
    for (let f of files) {
      this.log(f)
    }
  }
}

LS.flags = {
  version: flags.version(),
  help: flags.help(),
  // run with --dir= or -d=
  dir: flags.string({
    char: 'd',
    default: process.cwd(),
  }),
}

LS.run()
.catch(require('@oclif/errors/handle'))
```

Then run either of these with:

```sh-session
$ ./myscript
...files in current dir...
$ ./myscript --dir foobar
...files in ./foobar...
$ ./myscript --version
myscript/0.0.0 darwin-x64 node-v9.5.0
$ ./myscript --help
USAGE
  $ @oclif/command

OPTIONS
  -d, --dir=dir  [default: /Users/jdickey/src/github.com/oclif/command]
  --help         show CLI help
  --version      show CLI version
```

See the [generator](https://github.com/oclif/oclif) for all the options you can pass to the command.
npm package: @oclif/config
Description: base config object and standard interfaces for oclif components
Author: Salesforce
Latest version: 1.18.17
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/config
==============

**This library has been replaced by [@oclif/core](https://github.com/oclif/core) and is now in maintenance mode. We will only consider PRs that address security concerns.**

base config object and standard interfaces for oclif components

[![Version](https://img.shields.io/npm/v/@oclif/config.svg)](https://npmjs.org/package/@oclif/config)
[![CircleCI](https://circleci.com/gh/oclif/config/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/config/tree/main)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/config?branch=main&svg=true)](https://ci.appveyor.com/project/heroku/config/branch/main)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/config/badge.svg)](https://snyk.io/test/npm/@oclif/config)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/config.svg)](https://npmjs.org/package/@oclif/config)
[![License](https://img.shields.io/npm/l/@oclif/config.svg)](https://github.com/oclif/config/blob/main/package.json)
npm package: @oclif/errors
Description: display friendly CLI errors and log to error log
Author: Salesforce
Latest version: 1.3.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/errors
==============

**This library has been replaced by [@oclif/core](https://github.com/oclif/core) and is now in maintenance mode. We will only consider PRs that address security concerns.**

display friendly CLI errors and log to error log

[![Version](https://img.shields.io/npm/v/@oclif/errors.svg)](https://npmjs.org/package/@oclif/errors)
[![CircleCI](https://circleci.com/gh/oclif/errors/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/errors/tree/main)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/errors?branch=main&svg=true)](https://ci.appveyor.com/project/heroku/errors/branch/main)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/errors/badge.svg)](https://snyk.io/test/npm/@oclif/errors)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/errors.svg)](https://npmjs.org/package/@oclif/errors)
[![License](https://img.shields.io/npm/l/@oclif/errors.svg)](https://github.com/oclif/errors/blob/main/package.json)
npm package: @oclif/example-multi-js
Description: example multi-command CLI built with javascript
Author: Jeff Dickey @jdxcode
Latest version: 1.10.6

@oclif/example-multi-js
=======================

example multi-command CLI built with javascript

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-multi-js.svg)](https://npmjs.org/package/@oclif/example-multi-js)
[![CircleCI](https://circleci.com/gh/oclif/example-multi-js/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-multi-js/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-multi-js?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-multi-js/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-multi-js/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-multi-js)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-multi-js.svg)](https://npmjs.org/package/@oclif/example-multi-js)
[![License](https://img.shields.io/npm/l/@oclif/example-multi-js.svg)](https://github.com/oclif/example-multi-js/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @oclif/example-multi-js
$ example-multi-js COMMAND
running command...
$ example-multi-js (-v|--version|version)
@oclif/example-multi-js/1.10.6 linux-x64 node-v10.10.0
$ example-multi-js --help [COMMAND]
USAGE
  $ example-multi-js COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`example-multi-js goodbye`](#example-multi-js-goodbye)
* [`example-multi-js hello`](#example-multi-js-hello)
* [`example-multi-js help [COMMAND]`](#example-multi-js-help-command)

## `example-multi-js goodbye`

Describe the command here

```
USAGE
  $ example-multi-js goodbye

OPTIONS
  -n, --name=name  name to print

DESCRIPTION
  ...
  Extra documentation goes here
```

_See code: [src/commands/goodbye.js](https://github.com/oclif/example-multi-js/blob/v1.10.6/src/commands/goodbye.js)_

## `example-multi-js hello`

Describe the command here

```
USAGE
  $ example-multi-js hello

OPTIONS
  -n, --name=name  name to print

DESCRIPTION
  ...
  Extra documentation goes here
```

_See code: [src/commands/hello.js](https://github.com/oclif/example-multi-js/blob/v1.10.6/src/commands/hello.js)_

## `example-multi-js help [COMMAND]`

display help for example-multi-js

```
USAGE
  $ example-multi-js help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.2/src/commands/help.ts)_
<!-- commandsstop -->
npm package: @oclif/example-multi-ts
Description: example multi-command CLI built with typescript
Author: Jeff Dickey @jdxcode
Latest version: 1.10.7

@oclif/example-multi-ts
=======================

example multi-command CLI built with typescript

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-multi-ts.svg)](https://npmjs.org/package/@oclif/example-multi-ts)
[![CircleCI](https://circleci.com/gh/oclif/example-multi-ts/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-multi-ts/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-multi-ts?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-multi-ts/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-multi-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-multi-ts)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-multi-ts.svg)](https://npmjs.org/package/@oclif/example-multi-ts)
[![License](https://img.shields.io/npm/l/@oclif/example-multi-ts.svg)](https://github.com/oclif/example-multi-ts/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @oclif/example-multi-ts
$ example-multi-ts COMMAND
running command...
$ example-multi-ts (-v|--version|version)
@oclif/example-multi-ts/1.10.6 linux-x64 node-v10.10.0
$ example-multi-ts --help [COMMAND]
USAGE
  $ example-multi-ts COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`example-multi-ts goodbye [FILE]`](#example-multi-ts-goodbye-file)
* [`example-multi-ts hello [FILE]`](#example-multi-ts-hello-file)
* [`example-multi-ts help [COMMAND]`](#example-multi-ts-help-command)

## `example-multi-ts goodbye [FILE]`

describe the command here

```
USAGE
  $ example-multi-ts goodbye [FILE]

OPTIONS
  -f, --force
  -h, --help       show CLI help
  -n, --name=name  name to print
```

_See code: [src/commands/goodbye.ts](https://github.com/oclif/example-multi-ts/blob/v1.10.6/src/commands/goodbye.ts)_

## `example-multi-ts hello [FILE]`

describe the command here

```
USAGE
  $ example-multi-ts hello [FILE]

OPTIONS
  -f, --force
  -h, --help       show CLI help
  -n, --name=name  name to print

EXAMPLE
  $ example-multi-ts hello
  hello world from ./src/hello.ts!
```

_See code: [src/commands/hello.ts](https://github.com/oclif/example-multi-ts/blob/v1.10.6/src/commands/hello.ts)_

## `example-multi-ts help [COMMAND]`

display help for example-multi-ts

```
USAGE
  $ example-multi-ts help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.2/src/commands/help.ts)_
<!-- commandsstop -->
npm package: @oclif/example-plugin-js
Description: example dxcli plugin in javascript
Author: Jeff Dickey @jdxcode
Latest version: 1.10.6

@oclif/example-plugin-js
========================

example dxcli plugin in javascript

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-plugin-js.svg)](https://npmjs.org/package/@oclif/example-plugin-js)
[![CircleCI](https://circleci.com/gh/oclif/example-plugin-js/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-plugin-js/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-plugin-js?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-plugin-js/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-plugin-js/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-plugin-js)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-plugin-js.svg)](https://npmjs.org/package/@oclif/example-plugin-js)
[![License](https://img.shields.io/npm/l/@oclif/example-plugin-js.svg)](https://github.com/oclif/example-plugin-js/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @oclif/example-plugin-js
$ oclif-example COMMAND
running command...
$ oclif-example (-v|--version|version)
@oclif/example-plugin-js/1.10.6 linux-x64 node-v10.10.0
$ oclif-example --help [COMMAND]
USAGE
  $ oclif-example COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`oclif-example hello`](#oclif-example-hello)

## `oclif-example hello`

Describe the command here

```
USAGE
  $ oclif-example hello

OPTIONS
  -n, --name=name  name to print

DESCRIPTION
  ...
  Extra documentation goes here
```

_See code: [src/commands/hello.js](https://github.com/oclif/example-plugin-js/blob/v1.10.6/src/commands/hello.js)_
<!-- commandsstop -->
npm package: @oclif/example-plugin-ts
Description: example dxcli plugin in typescript
Author: Jeff Dickey @jdxcode
Latest version: 1.10.6

@oclif/example-plugin-ts
========================

example dxcli plugin in typescript

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-plugin-ts.svg)](https://npmjs.org/package/@oclif/example-plugin-ts)
[![CircleCI](https://circleci.com/gh/oclif/example-plugin-ts/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-plugin-ts/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-plugin-ts?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-plugin-ts/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-plugin-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-plugin-ts)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-plugin-ts.svg)](https://npmjs.org/package/@oclif/example-plugin-ts)
[![License](https://img.shields.io/npm/l/@oclif/example-plugin-ts.svg)](https://github.com/oclif/example-plugin-ts/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @oclif/example-plugin-ts
$ oclif-example COMMAND
running command...
$ oclif-example (-v|--version|version)
@oclif/example-plugin-ts/1.10.6 linux-x64 node-v10.10.0
$ oclif-example --help [COMMAND]
USAGE
  $ oclif-example COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`oclif-example hello [FILE]`](#oclif-example-hello-file)

## `oclif-example hello [FILE]`

describe the command here

```
USAGE
  $ oclif-example hello [FILE]

OPTIONS
  -f, --force
  -h, --help       show CLI help
  -n, --name=name  name to print

EXAMPLE
  $ oclif-example hello
  hello world from ./src/hello.ts!
```

_See code: [src/commands/hello.ts](https://github.com/oclif/example-plugin-ts/blob/v1.10.6/src/commands/hello.ts)_
<!-- commandsstop -->
npm package: @oclif/example-single-js
Description: example single-command CLI built with dxcli
Author: Jeff Dickey @jdxcode
Latest version: 1.10.6

@oclif/example-single-js
========================

example single-command CLI built with dxcli

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-single-js.svg)](https://npmjs.org/package/@oclif/example-single-js)
[![CircleCI](https://circleci.com/gh/oclif/example-single-js/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-single-js/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-single-js?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-single-js/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-single-js/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-single-js)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-single-js.svg)](https://npmjs.org/package/@oclif/example-single-js)
[![License](https://img.shields.io/npm/l/@oclif/example-single-js.svg)](https://github.com/oclif/example-single-js/blob/master/package.json)

<!-- toc -->
# Usage
<!-- usage -->
# Commands
<!-- commands -->
npm package: @oclif/example-single-ts
Description: example single command CLI built with dxcli
Author: Jeff Dickey @jdxcode
Latest version: 1.10.6

@oclif/example-single-ts
========================

example single command CLI built with dxcli

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/example-single-ts.svg)](https://npmjs.org/package/@oclif/example-single-ts)
[![CircleCI](https://circleci.com/gh/oclif/example-single-ts/tree/master.svg?style=shield)](https://circleci.com/gh/oclif/example-single-ts/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/example-single-ts?branch=master&svg=true)](https://ci.appveyor.com/project/oclif/example-single-ts/branch/master)
[![Codecov](https://codecov.io/gh/oclif/example-single-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/example-single-ts)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/example-single-ts.svg)](https://npmjs.org/package/@oclif/example-single-ts)
[![License](https://img.shields.io/npm/l/@oclif/example-single-ts.svg)](https://github.com/oclif/example-single-ts/blob/master/package.json)

<!-- toc -->
# Usage
<!-- usage -->
# Commands
<!-- commands -->
npm package: @oclif/help
Description: standard help for oclif
Author: Salesforce
Latest version: 1.0.15
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/help
===========

**This library has been replaced by [@oclif/core](https://github.com/oclif/core) and is now in maintenance mode. We will only consider PRs that address security concerns.**

standard help for oclif

[![Version](https://img.shields.io/npm/v/@oclif/help.svg)](https://npmjs.org/package/@oclif/help)
[![CircleCI](https://circleci.com/gh/oclif/help/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/help/tree/main)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/help.svg)](https://npmjs.org/package/@oclif/help)
[![License](https://img.shields.io/npm/l/@oclif/help.svg)](https://github.com/oclif/help/blob/main/package.json)
npm package: @oclif/nyc-config
Description: nyc config for oclif components
Author: Jeff Dickey
Latest version: 1.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/nyc-config
==================

nyc config for oclif components

[![Version](https://img.shields.io/npm/v/@oclif/nyc-config.svg)](https://npmjs.org/package/@oclif/nyc-config)
[![CircleCI](https://circleci.com/gh/oclif/nyc-config/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/nyc-config/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/nyc-config?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/nyc-config/branch/master)
[![Codecov](https://codecov.io/gh/oclif/nyc-config/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/nyc-config)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/nyc-config/badge.svg)](https://snyk.io/test/npm/@oclif/nyc-config)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/nyc-config.svg)](https://npmjs.org/package/@oclif/nyc-config)
[![License](https://img.shields.io/npm/l/@oclif/nyc-config.svg)](https://github.com/oclif/nyc-config/blob/master/package.json)
npm package: @oclif/parser
Description: arg and flag parser for oclif
Author: Salesforce
Latest version: 3.8.17
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/parser
=============

**This library has been replaced by [@oclif/core](https://github.com/oclif/core) and is now in maintenance mode. We will only consider PRs that address security concerns.**

arg and flag parser for oclif

[![Version](https://img.shields.io/npm/v/@oclif/parser.svg)](https://npmjs.org/package/@oclif/parser)
[![CircleCI](https://circleci.com/gh/oclif/parser/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/parser/tree/main)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/parser?branch=main&svg=true)](https://ci.appveyor.com/project/heroku/parser/branch/main)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/parser/badge.svg)](https://snyk.io/test/npm/@oclif/parser)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/parser.svg)](https://npmjs.org/package/@oclif/parser)
[![License](https://img.shields.io/npm/l/@oclif/parser.svg)](https://github.com/oclif/parser/blob/main/package.json)

CLI flag parser.

Usage:

```js
const CLI = require('cli-flags')

const {flags, args} = CLI.parse({
  flags: {
    'output-file': CLI.flags.string({char: 'o'}),
    force: CLI.flags.boolean({char: 'f'})
  },
  args: [
    {name: 'input', required: true}
  ]
})

if (flags.force) {
  console.log('--force was set')
}

if (flags['output-file']) {
  console.log(`output file is: ${flags['output-file']}`)
}

console.log(`input arg: ${args.input}`)

// $ node example.js -f myinput --output-file=myexample.txt
// --force was set
// output file is: myexample.txt
// input arg: myinput
```
npm package: @oclif/plugin-autocomplete
Description: autocomplete plugin for oclif
Author: Salesforce
Latest version: 3.2.45

# @oclif/plugin-autocomplete

autocomplete plugin for oclif (bash, zsh and powershell)

[![Version](https://img.shields.io/npm/v/@oclif/plugin-autocomplete.svg)](https://npmjs.org/package/@oclif/plugin-autocomplete)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-autocomplete.svg)](https://npmjs.org/package/@oclif/plugin-autocomplete)
[![License](https://img.shields.io/npm/l/@oclif/plugin-autocomplete.svg)](https://github.com/oclif/plugin-autocomplete/blob/main/package.json)

<!-- toc -->
* [@oclif/plugin-autocomplete](#oclifplugin-autocomplete)
* [Usage](#usage)
* [Commands](#commands)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

Run `<cli> autocomplete` to generate the autocomplete files for your current shell.

## Topic separator

Since oclif v2 it's possible to use spaces as a topic separator in addition to colons.

For bash and zsh each topic separator has different autocomplete implementations, if the CLI supports using a space as the separator, plugin-autocomplete will generate completion for that topic.

If you still want to use the colon-separated autocomplete you can set `OCLIF_AUTOCOMPLETE_TOPIC_SEPARATOR` to `colon` and re-generate the autocomplete files.

Docs: https://oclif.io/docs/topic_separator

# Commands

<!-- commands -->
* [`oclif-example autocomplete [SHELL]`](#oclif-example-autocomplete-shell)

## `oclif-example autocomplete [SHELL]`

Display autocomplete installation instructions.

```
USAGE
  $ oclif-example 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
  $ oclif-example autocomplete

  $ oclif-example autocomplete bash

  $ oclif-example autocomplete zsh

  $ oclif-example autocomplete powershell

  $ oclif-example autocomplete --refresh-cache
```

_See code: [src/commands/autocomplete/index.ts](https://github.com/oclif/plugin-autocomplete/blob/v3.2.45/src/commands/autocomplete/index.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-command-snapshot
Description: generates and compares OCLIF plugins snapshot files
Author: Salesforce
Latest version: 5.3.15

# @oclif/plugin-command-snapshot

Generates and compares OCLIF plugins snapshot files

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/plugin-command-snapshot.svg)](https://npmjs.org/package/@oclif/plugin-command-snapshot)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-command-snapshot.svg)](https://npmjs.org/package/@oclif/plugin-command-snapshot)
[![License](https://img.shields.io/npm/l/@oclif/plugin-command-snapshot.svg)](https://github.com/nramyasri-sf/@oclif/plugin-command-snapshot/blob/main/package.json)

<!-- toc -->
* [@oclif/plugin-command-snapshot](#oclifplugin-command-snapshot)
* [Usage](#usage)
* [generates a snapshot file that has a list or commands and flags in the current CLI or plugin](#generates-a-snapshot-file-that-has-a-list-or-commands-and-flags-in-the-current-cli-or-plugin)
* [compare the current CLI or plugin commands and flags with a snapshot file to identify changes](#compare-the-current-cli-or-plugin-commands-and-flags-with-a-snapshot-file-to-identify-changes)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

This plugin is used to take snapshot of commands and flags in OCLIF plugins. These snapshots can be used to enforce a deprecation policy or to keep track of changes.

To include it in your plugin, add it to the `devPlugins` section in your package.json.

```json
"oclif": {
    ...
    "devPlugins": [
      "@oclif/plugin-command-snapshot"
      ...
    ]
```

Use the `snapshot:generate` command in your development process.

```sh-session
# generates a snapshot file that has a list or commands and flags in the current CLI or plugin
$ ./bin/run.js snapshot:generate
```

Use the `snapshot:compare` command in your continuos integration. This command will fail if changes are detected. The snapshot file should be updated and committed to the repository when legitimate changes are made.

```sh-session
# compare the current CLI or plugin commands and flags with a snapshot file to identify changes
$ ./bin/run.js snapshot:compare
```

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-commands
Description: plugin to show the list of all the commands
Author: Salesforce
Latest version: 4.1.45

# @oclif/plugin-commands

plugin to show the list of all the commands

[![Version](https://img.shields.io/npm/v/@oclif/plugin-commands.svg)](https://npmjs.org/package/@oclif/plugin-commands)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-commands.svg)](https://npmjs.org/package/@oclif/plugin-commands)
[![License](https://img.shields.io/npm/l/@oclif/plugin-commands.svg)](https://github.com/oclif/plugin-commands/blob/main/package.json)

<!-- toc -->
* [@oclif/plugin-commands](#oclifplugin-commands)
* [Usage](#usage)
* [Commands](#commands)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session
$ npm install -g @oclif/plugin-commands
$ oclif-example COMMAND
running command...
$ oclif-example (--version)
@oclif/plugin-commands/4.1.45 linux-x64 node-v24.14.1
$ oclif-example --help [COMMAND]
USAGE
  $ oclif-example COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`oclif-example commands`](#oclif-example-commands)

## `oclif-example commands`

List all oclif-example commands.

```
USAGE
  $ oclif-example commands [--json] [-c id|plugin|summary|type... | --tree] [--deprecated] [-x | ] [--hidden]
    [--no-truncate | ] [--sort id|plugin|summary|type | ]

FLAGS
  -c, --columns=<option>...  Only show provided columns (comma-separated).
                             <options: id|plugin|summary|type>
  -x, --extended             Show extra columns.
      --deprecated           Show deprecated commands.
      --hidden               Show hidden commands.
      --no-truncate          Do not truncate output.
      --sort=<option>        [default: id] Property to sort by.
                             <options: id|plugin|summary|type>
      --tree                 Show tree of commands.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all oclif-example commands.
```

_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/4.1.45/src/commands/commands.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-help
Description: Standard help for oclif.
Author: Salesforce
Latest version: 6.2.43

# @oclif/plugin-help

A CLI command to invoke the standard help functionality from [oclif/core](https://github.com/oclif/core).

[![Version](https://img.shields.io/npm/v/@oclif/plugin-help.svg)](https://npmjs.org/package/@oclif/plugin-help)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-help.svg)](https://npmjs.org/package/@oclif/plugin-help)
[![License](https://img.shields.io/npm/l/@oclif/plugin-help.svg)](https://github.com/oclif/plugin-help/blob/main/package.json)

<!-- commands -->
* [`oclif help [COMMAND]`](#oclif-help-command)

## `oclif help [COMMAND]`

Display help for oclif.

```
USAGE
  $ oclif help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for oclif.
```

_See code: [src/commands/help.ts](https://github.com/oclif/plugin-help/blob/6.2.43/src/commands/help.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-interceptor
Description: plugin that defines a pre-run hook that can record and mock http/s requests and responses during command execution
Author: Salesforce
Latest version: 2.0.24
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

plugin-interceptor
============

Plugin that defines a pre-run hook that can record and mock http/s requests and responses during command execution based on an environment variable.  Recorded requests are written to files based on the command name and topic.  Commands can then use the recorded fixtures rather than making actual network calls.  All `setTimeout` calls can also be mocked so as to return on next tick, which is useful when using mocked responses.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@oclif/plugin-interceptor.svg)](https://npmjs.org/package/@oclif/plugin-interceptor)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-interceptor.svg)](https://npmjs.org/package/@oclif/plugin-interceptor)
[![License](https://img.shields.io/npm/l/@oclif/plugin-interceptor.svg)](https://github.com/oclif/plugin-interceptor/blob/main/package.json)

# Usage
This plugin does nothing until enabled with the `INTERCEPTOR_MODE` environment variable.

# Environment Variables

| Env Var | Description |
| --- | --- |
| INTERCEPTOR_MODE | Set to `record` to record HTTP/S requests made by commands.  Set to `mock` to use the recorded fixtures. |
| INTERCEPTOR_QUIET | Set to `true` to suppress console output. |
| INTERCEPTOR_DISABLE_TIMEOUTS | By default the `setTimeout` function is overridden to execute the callback on next tick, which is useful when using recorded fixtures.  Set to `false` to prevent this behavior. |
| INTERCEPTOR_DISABLE_NET_CONNECT | By default all unexpected HTTP/S requests when in `mock` mode are blocked and will cause an error.  Set to `false` to allow these requests to be made. |
| INTERCEPTOR_SCOPE_OVERRIDE | It can be useful to override the scope (protocol + domain + port) of the recorded requests to match a known scope.  E.g., "https://my.test.domain:443" |
| INTERCEPTOR_MAX_POST_BODY | Multipart POST request bodies can be very large and cause problems with request matching. By default all POST request bodies are not written to the fixture for matching.  This behavior can be modified by setting a body character length threshold where the request body will only be written when the length is less than the threshold.  E.g., `INTERCEPTOR_MAX_POST_BODY=5000` |
| INTERCEPTOR_OUTPUT_DIR | By default the current working directory is used as the base path for writing and using fixtures.  To set this to another location use this env var. |
| INTERCEPTOR_FIXTURE_NAME | By default the interceptor uses the name of the command for the directory where fixtures are written to and read from.  Use this variable to set the name to something else. |
| INTERCEPTOR_HOME_DIR | It can be useful to override the home directory of the OS to another location for mocking purposes.  Set this variable to some path to achieve this behavior. |
npm package: @oclif/plugin-legacy
Description: converts older style plugins to be compatible with oclif
Author: Salesforce
Latest version: 2.0.30

# @oclif/plugin-legacy

converts older style plugins to be compatible with oclif

[![Version](https://img.shields.io/npm/v/@oclif/plugin-legacy.svg)](https://npmjs.org/package/@oclif/plugin-legacy)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/plugin-legacy/badge.svg)](https://snyk.io/test/npm/@oclif/plugin-legacy)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-legacy.svg)](https://npmjs.org/package/@oclif/plugin-legacy)
[![License](https://img.shields.io/npm/l/@oclif/plugin-legacy.svg)](https://github.com/oclif/plugin-legacy/blob/master/package.json)
npm package: @oclif/plugin-not-found
Description: "did you mean" for oclif
Author: Salesforce
Latest version: 3.2.80

# @oclif/plugin-not-found

&#34;did you mean&#34; for oclif

[![Version](https://img.shields.io/npm/v/@oclif/plugin-not-found.svg)](https://npmjs.org/package/@oclif/plugin-not-found)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-not-found.svg)](https://npmjs.org/package/@oclif/plugin-not-found)
[![License](https://img.shields.io/npm/l/@oclif/plugin-not-found.svg)](https://github.com/oclif/plugin-not-found/blob/main/package.json)

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-search
Description: A command for searching commands
Author: Salesforce
Latest version: 1.2.44

# @oclif/plugin-search

A `search` command for your oclif CLI

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/oclif-plugin-search.svg)](https://npmjs.org/package/@oclif/plugin-search)
[![Downloads/week](https://img.shields.io/npm/dw/oclif-plugin-search.svg)](https://npmjs.org/package/@oclif/plugin-search)
[![License](https://img.shields.io/npm/l/oclif-plugin-search.svg)](https://github.com/oclif/plugin-search/blob/main/LICENSE)

<!-- toc -->
* [@oclif/plugin-search](#oclifplugin-search)
* [Usage](#usage)
* [Commands](#commands)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session
$ npm install -g @oclif/plugin-search
$ @oclif/plugin-search COMMAND
running command...
$ @oclif/plugin-search (--version)
@oclif/plugin-search/1.2.44 linux-x64 node-v24.14.1
$ @oclif/plugin-search --help [COMMAND]
USAGE
  $ @oclif/plugin-search COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`@oclif/plugin-search search`](#oclifplugin-search-search)

## `@oclif/plugin-search search`

Search for a command.

```
USAGE
  $ @oclif/plugin-search search

DESCRIPTION
  Search for a command.

  Once you select a command, hit enter and it will show the help for that command.
```

_See code: [src/commands/search.ts](https://github.com/oclif/plugin-search/blob/v1.2.44/src/commands/search.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-update
Description: [![Version](https://img.shields.io/npm/v/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![License](htt
Author: Salesforce
Latest version: 4.7.31

# @oclif/plugin-update

[![Version](https://img.shields.io/npm/v/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update)
[![License](https://img.shields.io/npm/l/@oclif/plugin-update.svg)](https://github.com/oclif/plugin-update/blob/main/package.json)

<!-- toc -->
* [@oclif/plugin-update](#oclifplugin-update)
* [Usage](#usage)
* [Commands](#commands)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

See https://oclif.io/docs/releasing.html#autoupdater

## Configuration

### Update Check Interval

You can customize how often the plugin checks for updates by adding the `autoupdate.debounce` configuration to your `package.json`:

```json
{
  "oclif": {
    "update": {
      "autoupdate": {
        "debounce": 7
      }
    }
  }
}
```

The `debounce` value is the number of days between update checks for all channels. When set, it overrides the default behavior for all channels.

If not configured, the plugin defaults to:

- Stable channel: 14 days
- Other channels: 1 day

# Commands

<!-- commands -->
* [`oclif-example update [CHANNEL]`](#oclif-example-update-channel)

## `oclif-example update [CHANNEL]`

update the oclif-example CLI

```
USAGE
  $ oclif-example update [CHANNEL] [--force |  | [-a | -v <value> | -i]] [-b ]

FLAGS
  -a, --available        See available versions.
  -b, --verbose          Show more details about the available versions.
  -i, --interactive      Interactively select version to install. This is ignored if a channel is provided.
  -v, --version=<value>  Install a specific version.
      --force            Force a re-download of the requested version.

DESCRIPTION
  update the oclif-example CLI

EXAMPLES
  Update to the stable channel:

    $ oclif-example update stable

  Update to a specific version:

    $ oclif-example update --version 1.0.0

  Interactively select version:

    $ oclif-example update --interactive

  See available versions:

    $ oclif-example update --available
```

_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/4.7.31/src/commands/update.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-version
Description: A command that shows the CLI version
Author: Salesforce
Latest version: 2.2.42

# @oclif/plugin-version

An oclif command that shows the CLI version

[![Version](https://img.shields.io/npm/v/@oclif/plugin-version.svg)](https://npmjs.org/package/@oclif/plugin-version)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-version.svg)](https://npmjs.org/package/@oclif/plugin-version)
[![License](https://img.shields.io/npm/l/@oclif/plugin-update.svg)](https://github.com/oclif/plugin-version/blob/main/package.json)

<!-- commands -->
* [`@oclif/plugin-version version`](#oclifplugin-version-version)

## `@oclif/plugin-version version`

```
USAGE
  $ @oclif/plugin-version version [--json] [--verbose]

FLAGS
  --verbose  Show additional information about the CLI.

GLOBAL FLAGS
  --json  Format output as json.

FLAG DESCRIPTIONS
  --verbose  Show additional information about the CLI.

    Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
```

_See code: [src/commands/version.ts](https://github.com/oclif/plugin-version/blob/2.2.42/src/commands/version.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/plugin-which
Description: find which plugin a command is in
Author: Salesforce
Latest version: 3.2.49

# @oclif/plugin-which

find which plugin a command is in

[![Version](https://img.shields.io/npm/v/@oclif/plugin-which.svg)](https://npmjs.org/package/@oclif/plugin-which)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-which.svg)](https://npmjs.org/package/@oclif/plugin-which)
[![License](https://img.shields.io/npm/l/@oclif/plugin-which.svg)](https://github.com/oclif/plugin-which/blob/main/package.json)

<!-- toc -->
* [@oclif/plugin-which](#oclifplugin-which)
* [Usage](#usage)
* [Commands](#commands)
* [Contributing](#contributing)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session
$ npm install -g @oclif/plugin-which
$ oclif-example COMMAND
running command...
$ oclif-example (--version)
@oclif/plugin-which/3.2.49 linux-x64 node-v24.14.1
$ oclif-example --help [COMMAND]
USAGE
  $ oclif-example COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`oclif-example which`](#oclif-example-which)

## `oclif-example which`

Show which plugin a command is in.

```
USAGE
  $ oclif-example which [--json]

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Show which plugin a command is in.

EXAMPLES
  See which plugin the `help` command is in:

    $ oclif-example which help

  Use colon separators.

    $ oclif-example which foo:bar:baz

  Use spaces as separators.

    $ oclif-example which foo bar baz

  Wrap command in quotes to use spaces as separators.

    $ oclif-example which "foo bar baz"
```

_See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/3.2.49/src/commands/which.ts)_
<!-- commandsstop -->

# Contributing

See [contributing guide](./CONRTIBUTING.md)
npm package: @oclif/prettier-config
Description: The prettier config for oclif projects
Author: Salesforce
Latest version: 0.2.1

# `@oclif/prettier-config`

Oclif prettier configuration for all projects.

## Usage

First install this package.

```bash
yarn add @oclif/prettier-config --dev
```

Then extend this configuration in your own prettier file.

Here is an example using a `.prettierrc.json` file.

```javascript
"@oclif/prettier-config"
```
npm package: @oclif/screen
Description: get stdout/stderr columns
Author: Salesforce
Latest version: 3.0.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/screen
=============

get stdout/stderr columns

[![Version](https://img.shields.io/npm/v/@oclif/screen.svg)](https://npmjs.org/package/@oclif/screen)
[![CircleCI](https://circleci.com/gh/oclif/screen/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/screen/tree/main)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/screen?branch=main&svg=true)](https://ci.appveyor.com/project/heroku/screen/branch/main)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/screen/badge.svg)](https://snyk.io/test/npm/@oclif/screen)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/screen.svg)](https://npmjs.org/package/@oclif/screen)
[![License](https://img.shields.io/npm/l/@oclif/screen.svg)](https://github.com/oclif/screen/blob/main/package.json)
npm package: @oclif/semantic-release
Description: semantic-release configuration for oclif
Author: Jeff Dickey @jdxcode
Latest version: 3.1.5

@oclif/semantic-release
=======================

semantic-release configuration for oclif

[![Version](https://img.shields.io/npm/v/@oclif/semantic-release.svg)](https://npmjs.org/package/@oclif/semantic-release)
[![CircleCI](https://circleci.com/gh/oclif/semantic-release/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/semantic-release/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/semantic-release?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/semantic-release/branch/master)
[![Codecov](https://codecov.io/gh/oclif/semantic-release/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/semantic-release)
[![Greenkeeper](https://badges.greenkeeper.io/oclif/semantic-release.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/semantic-release/badge.svg)](https://snyk.io/test/npm/@oclif/semantic-release)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/semantic-release.svg)](https://npmjs.org/package/@oclif/semantic-release)
[![License](https://img.shields.io/npm/l/@oclif/semantic-release.svg)](https://github.com/oclif/semantic-release/blob/master/package.json)
npm package: @oclif/semantic-release-dev
Description: semantic-release configuration for oclif
Author: Jeff Dickey @jdxcode
Latest version: 2.1.11

@oclif/semantic-release
=======================

semantic-release configuration for oclif

[![Version](https://img.shields.io/npm/v/@oclif/semantic-release.svg)](https://npmjs.org/package/@oclif/semantic-release)
[![CircleCI](https://circleci.com/gh/oclif/semantic-release/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/semantic-release/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/semantic-release?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/semantic-release/branch/master)
[![Codecov](https://codecov.io/gh/oclif/semantic-release/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/semantic-release)
[![Greenkeeper](https://badges.greenkeeper.io/oclif/semantic-release.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/semantic-release/badge.svg)](https://snyk.io/test/npm/@oclif/semantic-release)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/semantic-release.svg)](https://npmjs.org/package/@oclif/semantic-release)
[![License](https://img.shields.io/npm/l/@oclif/semantic-release.svg)](https://github.com/oclif/semantic-release/blob/master/package.json)
npm package: @oclif/test
Description: test helpers for oclif components
Author: Salesforce
Latest version: 4.1.18

# @oclif/test

test helpers for oclif CLIs

[![Version](https://img.shields.io/npm/v/@oclif/test.svg)](https://npmjs.org/package/@oclif/test)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/test.svg)](https://npmjs.org/package/@oclif/test)
[![License](https://img.shields.io/npm/l/@oclif/test.svg)](https://github.com/oclif/test/blob/main/package.json)

## Migration

See the [V4 Migration Guide](./MIGRATION.md) if you are migrating from v3 or older.

## Usage

`@oclif/test` provides a handful of utilities that make it easy to test your [oclif](https://oclif.io) CLI.

> [!NOTE]
> In order for these utilities to capture all output to the terminal, you must disable any console output interception/suppression features in your test framework.
>
> - For Jest users, enable [the `verbose` flag](https://jestjs.io/docs/configuration#verbose-boolean) in your Jest config.
> - For Vitest users, enable [the `disableConsoleIntercept` flag](https://vitest.dev/guide/cli.html#disableconsoleintercept) in your Vitest config.

### `captureOutput`

`captureOutput` allows you to get the stdout, stderr, return value, and error of the callback you provide it. This makes it possible to assert that certain strings were printed to stdout and stderr or that the callback failed with the expected error or succeeded with the expected result.

**Options**

- `print` - Print everything that goes to stdout and stderr.
- `stripAnsi` - Strip ansi codes from everything that goes to stdout and stderr. Defaults to true.
- `testNodeEnv` - Sets the `NODE_ENV` value when capturing output. Defaults to `'test'`.

See the [tests](./test/capture-output.test.ts) for example usage.

### `runCommand`

`runCommand` allows you to get the stdout, stderr, return value, and error of a command in your CLI.

See the [tests](./test/run-command.test.ts) for example usage.

### `runHook`

`runHook` allows you to get the stdout, stderr, return value, and error of a hook in your CLI.

See the [tests](./test/run-hook.test.ts) for example usage.