• Stars
    star
    8,760
  • Rank 3,914 (Top 0.08 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated 23 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.

oclif CLI

Version Downloads/week License

🗒 Description

This is the oclif CLI for the Open CLI Framework, that supports the development of oclif plugins and CLIs.

See the docs for more information.

🚀 Getting Started Tutorial

The Getting Started tutorial 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 below for an overview of the oclif CLI.

📌 Requirements

Currently, Node 18+ is supported. We support the LTS versions of Node. You can add the 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 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.
    • 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. 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:

$ 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

🔨 Commands

Command Topics

🚀 Contributing

See the contributing guide.

🏭 Related Repositories

  • @oclif/core - Base library for oclif. This can be used directly without the generator.
  • @oclif/test - Test helper for oclif.

🦔 Learn More

More Repositories

1

cli-ux

CLI IO utilities
TypeScript
548
star
2

core

Node.js Open CLI Framework. Built by Salesforce.
TypeScript
150
star
3

command

oclif base command
TypeScript
136
star
4

plugin-autocomplete

autocomplete plugin for oclif
TypeScript
79
star
5

fancy-test

extends mocha with helpful, chainable extensions
TypeScript
60
star
6

dev-cli

TypeScript
60
star
7

example-multi-ts

example multi-command CLI built with typescript
TypeScript
54
star
8

kaomoji

A simple example CLI that generates kaomoji (https://en.wikipedia.org/wiki/Kaomoji)
TypeScript
53
star
9

plugin-plugins

plugins plugin for oclif
TypeScript
44
star
10

plugin-update

add autoupdate to your oclif CLI
TypeScript
44
star
11

plugin-warn-if-update-available

warn user if a new CLI version is available
TypeScript
34
star
12

hello-world

Template repository for generating CJS oclif plugins
TypeScript
27
star
13

parser

arg and flag parser for oclif
TypeScript
24
star
14

config

base config object and standard interfaces for oclif components
TypeScript
24
star
15

plugin-help

standard help for oclif
TypeScript
22
star
16

errors

TypeScript
14
star
17

test

test helpers for oclif components
TypeScript
14
star
18

example-multi-js

example multi-command CLI built with javascript
JavaScript
14
star
19

plugin-not-found

"did you mean" plugin for oclif
TypeScript
12
star
20

example-single-ts

example single command CLI built with oclif
TypeScript
11
star
21

oclif.github.io

docs for oclif
JavaScript
7
star
22

plugin-commands

TypeScript
7
star
23

githubcli

An simple example oclif cli
TypeScript
7
star
24

example-single-js

example single-command CLI built with oclif
JavaScript
7
star
25

screen

get stdout/stderr columns
JavaScript
5
star
26

plugin-which

TypeScript
5
star
27

color

TypeScript
5
star
28

eslint-config-oclif

eslint configuration for oclif
JavaScript
5
star
29

hello-world-esm

Template repository for generating ESM oclif plugins
TypeScript
5
star
30

semantic-release

shared semantic-release config for oclif projects
JavaScript
4
star
31

example-plugin-ts

example oclif plugin in typescript
TypeScript
4
star
32

example-plugin-js

example oclif plugin in javascript
JavaScript
4
star
33

eslint-config-oclif-typescript

eslint config for Typscript'd oclif
JavaScript
3
star
34

repo-status

repo status badges for oclif projects
JavaScript
3
star
35

plugin-search

TypeScript
2
star
36

nyc-config

nyc config for oclif components
2
star
37

plugin-legacy

TypeScript
2
star
38

plugin-version

a cli command that just shows the CLI version
TypeScript
2
star
39

goclif

Go
1
star
40

_dev

metapackage for dxcli dev dependencies
Shell
1
star
41

plugin-example

JavaScript
1
star
42

plugin-svo

Spike using SVO syntax
TypeScript
1
star
43

docker

Dockerfile
1
star
44

tslint

DEPRECATED: use oclif's eslint plugins
Shell
1
star
45

eslint

TypeScript
1
star
46

plugin-command-snapshot

generates and compares OCLIF plugins snapshot files
TypeScript
1
star
47

plugin-test-esbuild

TypeScript
1
star
48

github-workflows

duplicate of https://github.com/salesforcecli/github-workflows
1
star
49

fancy-test-nock

TypeScript
1
star