All Projects β†’ oclif β†’ Oclif

oclif / Oclif

Licence: mit
Node.js Open CLI Framework. Built with πŸ’œ by Heroku.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Oclif

Uber Apk Signer
A cli tool that helps signing and zip aligning single or multiple Android application packages (APKs) with either debug or provided release certificates. It supports v1, v2 and v3 Android signing scheme has an embedded debug keystore and auto verifies after signing.
Stars: ✭ 677 (-90.05%)
Mutual labels:  cli
Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (+319.63%)
Mutual labels:  cli
Hover
Hover helps developers to release Flutter applications on desktop.
Stars: ✭ 698 (-89.75%)
Mutual labels:  cli
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (-89.98%)
Mutual labels:  cli
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (-89.78%)
Mutual labels:  cli
Dive
A tool for exploring each layer in a docker image
Stars: ✭ 28,957 (+325.4%)
Mutual labels:  cli
Buildxl
Microsoft Build Accelerator
Stars: ✭ 676 (-90.07%)
Mutual labels:  cli
Flaggy
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Stars: ✭ 711 (-89.55%)
Mutual labels:  cli
Cheat.sh
the only cheat sheet you need
Stars: ✭ 27,798 (+308.37%)
Mutual labels:  cli
Pick
A fuzzy search tool for the command-line
Stars: ✭ 697 (-89.76%)
Mutual labels:  cli
Clipp
easy to use, powerful & expressive command line argument parsing for modern C++ / single header / usage & doc generation
Stars: ✭ 687 (-89.91%)
Mutual labels:  cli
So
A terminal interface for Stack Overflow
Stars: ✭ 694 (-89.8%)
Mutual labels:  cli
Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+352.96%)
Mutual labels:  cli
Ok Mdx
Browser-based MDX editor
Stars: ✭ 681 (-90%)
Mutual labels:  cli
Cleo
Cleo allows you to create beautiful and testable command-line interfaces.
Stars: ✭ 698 (-89.75%)
Mutual labels:  cli
Backslide
πŸ’¦ CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (-90.02%)
Mutual labels:  cli
Angular Cli
CLI tool for Angular
Stars: ✭ 25,099 (+268.72%)
Mutual labels:  cli
Terjira
Terjira is a very interactive and easy to use CLI tool for Jira.
Stars: ✭ 713 (-89.53%)
Mutual labels:  cli
Gg Shield
Detect secret in source code, scan your repo for leaks. Find secrets with GitGuardian and prevent leaked credentials. GitGuardian is an automated secrets detection & remediation service.
Stars: ✭ 708 (-89.6%)
Mutual labels:  cli
Awesome bot
βœ… Validate links in awesome projects
Stars: ✭ 697 (-89.76%)
Mutual labels:  cli

oclif: Node.JS Open CLI Framework

Join the community on Spectrum Version CircleCI Appveyor CI Downloads/week License

πŸ—’ Description

This is a framework for building CLIs in Node.js. This framework was built out of the Heroku CLI but generalized to build any custom CLI. It's designed both for single-file CLIs with a few flag options, or for very complex CLIs that have subcommands (like git or heroku).

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.

✨ Features

  • Flag/Argument parsing - No CLI framework would be complete without a flag parser. We've built a custom one from years of experimentation that we feel consistently handles user input flexible enough for the user to be able to use the CLI in ways they expect, but without compromising strictness guarantees to the developer.
  • Super Speed - The overhead for running an oclif CLI command is almost nothing. It requires very few dependencies (only 35 dependencies in a minimal setupβ€”including all transitive dependencies). Also, only the command to be executed will be required with node. So large CLIs with many commands will load equally as fast as a small one with a single command.
  • CLI Generator - Run a single command to scaffold out a fully functional CLI and get started quickly. See Usage below.
  • Testing Helpers - We've put a lot of work into making commands easier to test and mock out stdout/stderr. The generator will automatically create scaffolded tests.
  • Auto-documentation - By default you can pass --help to the CLI to get help such as flag options and argument information. This information is also automatically placed in the README whenever the npm package of the CLI is published. See the multi-command CLI example
  • Plugins - Using plugins, users of the CLI can extend it with new functionality, a CLI can be split into modular components, and functionality can be shared amongst multiple CLIs. See Building your own plugin.
  • Hooks - Use lifecycle hooks to run functionality any time a CLI starts, or on custom triggers. Use this whenever custom functionality needs to be shared between various components of the CLI.
  • TypeScript (or not) - Everything in the core of oclif is written in TypeScript and the generator can build fully configured TypeScript CLIs or plain JavaScript CLIs. By virtue of static properties in TypeScript the syntax is a bit cleaner in TypeScriptβ€”but everything will work no matter which language you choose. If you use plugins support, the CLI will automatically use ts-node to run the plugins enabling you to use TypeScript with minimal-to-no boilerplate needed for any oclif CLI.
  • Auto-updating Installers - oclif can package your CLI into different installers that will not require the user to already have node installed on the machine. These can be made auto-updatable by using plugin-update.
  • Everything is Customizable - Pretty much anything can be swapped out and replaced inside oclif if neededβ€”including the arg/flag parser.
  • Autocomplete - Automatically include autocomplete for your CLI. This includes not only command names and flag names, but flag values as well. For example, it's possible to configure the Heroku CLI to have completions for Heroku app names:
$ heroku info --app=<tab><tab> # will complete with all the Heroku apps a user has in their account

πŸ“Œ Requirements

Currently, Node 8+ 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.

πŸ— Usage

Creating a CLI:

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

COMMANDS
  hello
  help   display help for mynewcli

$ ./bin/run hello
hello world from ./src/hello.js!

πŸ“š Examples

πŸ”¨ Commands

oclif generate NAME

generate a new CLI

USAGE
  $ oclif generate [NAME]

ARGUMENTS
  NAME  directory name of new project

DESCRIPTION
  generate a new CLI

  This will clone the template repo 'oclif/hello-world' and update package properties

See code: src/commands/generate.ts

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: @oclif/plugin-help

oclif manifest [PATH]

generates plugin manifest json

USAGE
  $ oclif manifest [PATH]

ARGUMENTS
  PATH  [default: .] path to plugin

DESCRIPTION
  generates plugin manifest json

See code: src/commands/manifest.ts

oclif pack:deb

pack CLI into debian package

USAGE
  $ oclif pack:deb -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  pack CLI into debian package

See code: src/commands/pack/deb.ts

oclif pack:macos

pack CLI into macOS .pkg

USAGE
  $ oclif pack:macos -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  pack CLI into macOS .pkg

See code: src/commands/pack/macos.ts

oclif pack:tarballs

packages oclif CLI into tarballs

USAGE
  $ oclif pack:tarballs -r <value> [-t <value>] [--xz]

FLAGS
  -r, --root=<value>     (required) [default: .] path to oclif CLI root
  -t, --targets=<value>  [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64] comma-separated
                         targets to pack (e.g.: linux-arm,win32-x64)
  --[no-]xz              also build xz

DESCRIPTION
  packages oclif CLI into tarballs

  This can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.

See code: src/commands/pack/tarballs.ts

oclif pack:win

create windows installer from oclif CLI

USAGE
  $ oclif pack:win -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  create windows installer from oclif CLI

  This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to
  be set in the environment

See code: src/commands/pack/win.ts

oclif promote

promote CLI builds to a S3 release channel

USAGE
  $ oclif promote -r <value> --version <value> --sha <value> --channel <value> [-t <value>] [-d] [-m] [-w]
    [-a <value>] [--xz] [--indexes]

FLAGS
  -a, --max-age=<value>  [default: 86400] cache control max-age in seconds
  -d, --deb              promote debian artifacts
  -m, --macos            promote macOS pkg
  -r, --root=<value>     (required) [default: .] path to the oclif CLI project root
  -t, --targets=<value>  [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64] comma-separated
                         targets to promote (e.g.: linux-arm,win32-x64)
  -w, --win              promote Windows exe
  --channel=<value>      (required) [default: stable] which channel to promote to
  --indexes              append the promoted urls into the index files
  --sha=<value>          (required) 7-digit short git commit SHA of the CLI to promote
  --version=<value>      (required) semantic version of the CLI to promote
  --[no-]xz              also upload xz

DESCRIPTION
  promote CLI builds to a S3 release channel

See code: src/commands/promote.ts

oclif readme

adds commands to README.md in current directory

USAGE
  $ oclif readme --dir <value> [--multi]

FLAGS
  --dir=<value>  (required) [default: docs] output directory for multi docs
  --multi        create a different markdown page for each topic

DESCRIPTION
  adds commands to README.md in current directory

  The readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:

  # Usage

  <!-- usage -->

  # Commands

  <!-- commands -->

  Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.

See code: src/commands/readme.ts

oclif upload:deb

upload deb package built with pack:deb

USAGE
  $ oclif upload:deb -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  upload deb package built with pack:deb

See code: src/commands/upload/deb.ts

oclif upload:macos

upload macos installers built with pack:macos

USAGE
  $ oclif upload:macos -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  upload macos installers built with pack:macos

See code: src/commands/upload/macos.ts

oclif upload:tarballs

upload an oclif CLI to S3

USAGE
  $ oclif upload:tarballs -r <value> [-t <value>] [--xz]

FLAGS
  -r, --root=<value>     (required) [default: .] path to oclif CLI root
  -t, --targets=<value>  [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64] comma-separated
                         targets to upload (e.g.: linux-arm,win32-x64)
  --[no-]xz              also upload xz

DESCRIPTION
  upload an oclif CLI to S3

  "aws-sdk" will need to be installed as a devDependency to upload.

See code: src/commands/upload/tarballs.ts

oclif upload:win

upload windows installers built with pack:win

USAGE
  $ oclif upload:win -r <value>

FLAGS
  -r, --root=<value>  (required) [default: .] path to oclif CLI root

DESCRIPTION
  upload windows installers built with pack:win

See code: src/commands/upload/win.ts

🏭 Related Repositories

πŸ¦” Learn More

πŸ“£ Feedback

If you have any suggestions or want to let us know what you think of oclif, send us a message at [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].