# oclif

> oclif: create your own CLI

Latest version **6.0.2** (published 2026-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install oclif
pnpm add oclif
yarn add oclif
bun add oclif
```

Provides the command `oclif`.

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.0.2 |
| Published | 2026-09-25 |
| First published | 2018-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 23 |
| Unpacked size | 276.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 9594 |
| Author | Salesforce |
| Maintainers | dickeyxxx, rasphilco, amphro, salesforce-releases, mdonnalley |
| Keywords | oclif, cli |

## Links

- npm: https://www.npmjs.com/package/oclif
- Repository: https://github.com/oclif/oclif
- Issues: https://github.com/oclif/oclif/issues
- npm.io page: https://npm.io/package/oclif

## Dependencies (23)

- [ejs](https://npm.io/package/ejs.md) ^3.1.10
- [got](https://npm.io/package/got.md) ^13
- [ansis](https://npm.io/package/ansis.md) ^3.16.0
- [debug](https://npm.io/package/debug.md) ^4.4.0
- [semver](https://npm.io/package/semver.md) ^7.8.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1
- [tiny-jsonc](https://npm.io/package/tiny-jsonc.md) ^1.0.2
- [@oclif/core](https://npm.io/package/@oclif/core.md) ^5.0.0
- [async-retry](https://npm.io/package/async-retry.md) ^1.3.3
- [change-case](https://npm.io/package/change-case.md) ^4
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.6
- [github-slugger](https://npm.io/package/github-slugger.md) ^2
- [@inquirer/input](https://npm.io/package/@inquirer/input.md) ^2.2.4
- [@inquirer/select](https://npm.io/package/@inquirer/select.md) ^2.5.0
- [@inquirer/confirm](https://npm.io/package/@inquirer/confirm.md) ^3.1.22
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.1079.0
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^7.0.0
- [normalize-package-data](https://npm.io/package/normalize-package-data.md) ^6
- [@oclif/plugin-not-found](https://npm.io/package/@oclif/plugin-not-found.md) ^4.0.0
- [find-yarn-workspace-root](https://npm.io/package/find-yarn-workspace-root.md) ^2.0.0
- [validate-npm-package-name](https://npm.io/package/validate-npm-package-name.md) ^5.0.1
- [@aws-sdk/client-cloudfront](https://npm.io/package/@aws-sdk/client-cloudfront.md) ^3.1079.0
- [@oclif/plugin-warn-if-update-available](https://npm.io/package/@oclif/plugin-warn-if-update-available.md) ^4.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 6.0.2 (latest) — 2026-09-25
- 4.22.82-qa.0 (qa) — 2026-03-04
- 4.17.17-dev.0 (dev) — 2025-01-20
- 4.0.0-beta.5 (beta) — 2023-10-05
- 2.7.0 (previous) — 2022-07-07
- 6.0.1 — 2026-09-22
- 6.0.0 — 2026-09-11
- 5.0.2 — 2026-09-11
- 5.0.1 — 2026-09-03
- 5.0.0 — 2026-08-31
- 4.24.0 — 2026-08-24
- 4.23.32 — 2026-08-24
- 4.23.31 — 2026-08-24
- 4.23.30 — 2026-08-06
- 4.23.29 — 2026-07-25
- … 717 more at https://npm.io/package/oclif/versions

## README

<img src="https://user-images.githubusercontent.com/449385/38243295-e0a47d58-372e-11e8-9bc0-8c02a6f4d2ac.png" width="260" height="73">

# `oclif` CLI

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

<!-- toc -->

- [`oclif` CLI](#oclif-cli)
- [🗒 Description](#-description)
- [🚀 Getting Started Tutorial](#-getting-started-tutorial)
- [📌 Requirements](#-requirements)
- [📌 Migrating from V1](#-migrating-from-v1)
- [🏗 Usage](#-usage)
- [📚 Examples](#-examples)
- [🔨 Commands](#-commands)
- [Command Topics](#command-topics)
- [🚀 Contributing](#-contributing)
- [🏭 Related Repositories](#-related-repositories)
- [🦔 Learn More](#-learn-more)
<!-- tocstop -->

# 🗒 Description

This is the `oclif` CLI for the [Open CLI Framework](https://github.com/oclif/core), that supports the development of oclif plugins and CLIs.

[See the docs for more information](http://oclif.io).

# 🚀 Getting Started Tutorial

The [Getting Started tutorial](http://oclif.io/docs/introduction) is a step-by-step guide to introduce you to oclif. If you have not developed anything in a command line before, this tutorial is a great place to get started.

See [Usage](#-usage) below for an overview of the `oclif` CLI.

# 📌 Requirements

Currently, Node 18+ is supported. We support the [LTS versions](https://nodejs.org/en/about/releases) of Node. You can add the [node](https://www.npmjs.com/package/node) package to your CLI to ensure users are running a specific version of Node.

# 📌 Migrating from V1

If you have been using version 1 of the [`oclif` CLI](https://github.com/oclif/oclif/tree/v1.18.4) there are some important differences to note when using the latest version.

## Breaking Changes

- `oclif multi`, `oclif plugin`, and `oclif single` have all been removed in favor of `oclif generate`, which generates an oclif based CLI using the [hello-world example repo](https://github.com/oclif/hello-world).
  - The reason is that there's not enough of a meaningful difference between a "multi command cli", a "single command cli", and a "plugin" to justify the maintenance cost. The generated CLI can be easily used for any of those use cases.
- `oclif hook` is now `oclif generate:hook`
- `oclif command` is now `oclif generate:command`

## New Commands

Version 2 now includes all the commands from the [`oclif-dev` CLI](https://github.com/oclif/dev-cli). This means that you can now use a single CLI for all your oclif needs. These commands include:

- `oclif manifest`
- `oclif pack`
- `oclif pack:deb`
- `oclif pack:macos`
- `oclif pack:win`
- `oclif upload` (formerly known as `oclif-dev publish`)
- `oclif upload:deb` (formerly known as `oclif-dev publish:deb`)
- `oclif upload:macos` (formerly known as `oclif-dev publish:macos`)
- `oclif upload:win` (formerly known as `oclif-dev publish:win`)
- `oclif readme`

# 🏗 Usage

Creating a CLI:

```sh-session
$ npx oclif generate mynewcli
? npm package name (mynewcli): mynewcli
$ cd mynewcli
$ ./bin/run.js --version
mynewcli/0.0.0 darwin-x64 node-v9.5.0
$ ./bin/run.js --help
USAGE
  $ mynewcli [COMMAND]

COMMANDS
  hello
  help   display help for mynewcli

$ ./bin/run.js hello world
hello world! (./src/commands/hello/world.ts)
```

# 📚 Examples

- [Hello-World](https://github.com/oclif/hello-world)
- [Salesforce CLI](https://github.com/salesforcecli/cli)
- [Heroku CLI](https://github.com/heroku/cli)

# 🔨 Commands

<!-- commands -->

# Command Topics

- [`oclif generate`](docs/generate.md) - Generate a new CLI
- [`oclif help`](docs/help.md) - Display help for oclif.
- [`oclif init`](docs/init.md) - Initialize a new oclif CLI
- [`oclif manifest`](docs/manifest.md) - Generates plugin manifest json (oclif.manifest.json).
- [`oclif pack`](docs/pack.md) - Package an oclif CLI into installable artifacts.
- [`oclif promote`](docs/promote.md) - Promote CLI builds to a S3 release channel.
- [`oclif readme`](docs/readme.md) - Adds commands to README.md in current directory.
- [`oclif upload`](docs/upload.md) - Upload installable CLI artifacts to AWS S3.

<!-- commandsstop -->

# 🚀 Contributing

See the [contributing guide](./CONTRIBUTING.md).

# 🏭 Related Repositories

- [@oclif/core](https://github.com/oclif/core) - Base library for oclif. This can be used directly without the generator.
- [@oclif/test](https://github.com/oclif/test) - Test helper for oclif.

# 🦔 Learn More

- [Salesforce Release Announcement](https://engineering.salesforce.com/open-sourcing-oclif-the-cli-framework-that-powers-our-clis-21fbda99d33a)
- [Heroku Release Announcement](https://blog.heroku.com/open-cli-framework)

---
_Source: https://npm.io/package/oclif · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
