- Notifications
You must be signed in to change notification settings - Fork333
CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
License
oclif/oclif
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
oclif
CLI- 🗒 Description
- 🚀 Getting Started Tutorial
- 📌 Requirements
- 📌 Migrating from V1
- 🏗 Usage
- 📚 Examples
- 🔨 Commands
- Command Topics
- 🚀 Contributing
- 🏭 Related Repositories
- 🦔 Learn More
This is theoclif
CLI for theOpen CLI Framework, that supports the development of oclif plugins and CLIs.
See the docs for more information.
TheGetting 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.
SeeUsage below for an overview of theoclif
CLI.
Currently, Node 18+ is supported. We support theLTS versions of Node. You can add thenode package to your CLI to ensure users are running a specific version of Node.
If you have been using version 1 of theoclif
CLI there are some important differences to note when using the latest version.
oclif multi
,oclif plugin
, andoclif single
have all been removed in favor ofoclif generate
, which generates an oclif based CLI using thehello-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 nowoclif generate:hook
oclif command
is nowoclif generate:command
Version 2 now includes all the commands from theoclif-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 asoclif-dev publish
)oclif upload:deb
(formerly known asoclif-dev publish:deb
)oclif upload:macos
(formerly known asoclif-dev publish:macos
)oclif upload:win
(formerly known asoclif-dev publish:win
)oclif readme
Creating a CLI:
$npx oclif generate mynewcli? npm package name (mynewcli): mynewcli$cd mynewcli$./bin/run.js --versionmynewcli/0.0.0 darwin-x64 node-v9.5.0$./bin/run.js --helpUSAGE $ mynewcli [COMMAND]COMMANDS hello help display help for mynewcli$./bin/run.js hello worldhello world! (./src/commands/hello/world.ts)
oclif generate
- Generate a new CLIoclif help
- Display help for oclif.oclif init
- Initialize a new oclif CLIoclif manifest
- Generates plugin manifest json (oclif.manifest.json).oclif pack
- Package an oclif CLI into installable artifacts.oclif promote
- Promote CLI builds to a S3 release channel.oclif readme
- Adds commands to README.md in current directory.oclif upload
- Upload installable CLI artifacts to AWS S3.
See thecontributing guide.
- @oclif/core - Base library for oclif. This can be used directly without the generator.
- @oclif/test - Test helper for oclif.
About
CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.