Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oclif/oclif
CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
https://github.com/oclif/oclif
cli nodejs oclif typescript
Last synced: 6 days ago
JSON representation
CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
- Host: GitHub
- URL: https://github.com/oclif/oclif
- Owner: oclif
- License: mit
- Created: 2018-01-11T20:59:27.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T02:41:46.000Z (6 days ago)
- Last Synced: 2025-01-06T12:04:42.873Z (6 days ago)
- Topics: cli, nodejs, oclif, typescript
- Language: TypeScript
- Homepage: https://oclif.io
- Size: 7.6 MB
- Stars: 9,071
- Watchers: 66
- Forks: 318
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-nodejs-cn - oclif - CLI框架,包括解析器、自动文档、测试和插件 (包 / 命令行工具)
- awesome-web - oclif
- awesome-nodejs - oclif - Node.js Open CLI Framework. Built with 💜 by Heroku. ![](https://img.shields.io/github/stars/oclif/oclif.svg?style=social&label=Star) (Repository / Command-line Utilities)
- awesome-cli-frameworks - Oclif - file CLIs with a few flag options, or for very complex CLIs that have subcommands (like git or heroku). ([JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) / Useful awesome list for Go cli)
- awesome-nodejs-cn - oclif - **star:9070** 包含解析器、自动文档、测试和插件的CLI框架 ![star > 2000][Awesome] (包 / 命令行实用工具)
- awesome-libraries - oclif
- awesome-repositories - oclif/oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce. (TypeScript)
- awesome-list - oclif
- awesome-nodejs - oclif - CLI framework complete with parser, automatic documentation, testing, and plugins. (Packages / Command-line utilities)
- awesome-nodejs - oclif - Node.js Open CLI Framework. Built with by Heroku. - ★ 2767 (Command-line utilities)
- awesome-node - oclif - CLI framework complete with parser, automatic documentation, testing, and plugins. (Packages / Command-line utilities)
- awesome-nodejs-cn - oclif - CLI框架,包括解析器,自动文档,测试和插件. (目录 / 命令行工具)
- awesome-typescript - oclif - Node.js Open CLI Framework. Built with 💜 by Heroku. (Table of Contents / Command Line)
- awesome - oclif/oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce. (TypeScript)
- awesome - oclif/oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce. (TypeScript)
- stars - oclif
- stars - oclif
README
# `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)- [`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)# 🗒 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
# 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.# 🚀 Contributing
See the [contributing guide](./CONRTIBUTING.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)