NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3845 most downloaded on npm
base library for oclif CLIs
Last release 9 days ago
25 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
483 releases · first in 2020
One column per quarter.
revert ignoreDuplicates in warn
# 4.0.0-beta.5 (2024-05-06) ### Features * support rc files (#1067) (6af9c71) # 4.0.0-beta.4 (2024-04-25) # 4.0.0-beta.3 (2024-04-24) ### Bug Fixes *
### Features * support rc files
Nothing published for this version
### Bug Fixes * cache child loggers (2a9164d) ### Features * add customizable logger (371edda) * remove native error logger
### Features * slimmer ux
Nothing published for this version
added option to specify example flag value in docopts (#1095) (0345ac3), closes #1091
only replace command id in usage if it's at beginning of string
deps: bump debug from 4.3.4 to 4.3.5
### Bug Fixes * get core meta version
new "dont check npm" option for plugin-update
### Bug Fixes * better warnings
deps: bump tar from 6.1.15 to 6.2.1
deps: bump ejs from 3.1.9 to 3.1.10
do not throw an error if a flag with allowStdin='only' is immediately followed by another flag
deps: bump minimatch from 9.0.3 to 9.0.4
### Features * add preparse hook
show options when required flag or arg is not given a value
allow .tsx and .jsx help class files
ensure string is passed to process.emitWarning
show truncated help on some errors
print ellipsis on arg if static is false
remove configured id from usage override
### Features * deprecate ux module
### Features * support plugins with wildcards
improve module load error handling
### Bug Fixes * allow arg to be empty string
The default property has always been a less-than-ideal workaround and will be deprecated in favor of these settings:
Support three strategies for command discovery:
pattern - this is the current behavior that finds commands based on glob patternsexplicit - find commands that are exported from a specified file. This is to support developers who wish to bundle their CLI into a single file.single - CLI contains a single command executed by top-level binpattern StrategyFor pattern, plugins could continue to do this:
{
"oclif": {
"commands": "./dist/commands",
}
}
which will tell oclif to look for commands in that directory (this is skipped if an oclif.manifest.json is present)
Alternatively, plugins could set this configuration:
{
"oclif": {
"commands": {
"strategy": "pattern",
"target": "./dist/commands"
}
}
}
And they could even add globPatterns to override the glob patterns that oclif uses when searching for command files:
{
"oclif": {
"commands": {
"strategy": "pattern",
"target": "./dist/commands",
"globPatterns": [
"**/*.+(js|cjs|mjs|ts|tsx|mts|cts)",
"!**/*.+(d.*|test.*|spec.*|helpers.*)?(x)"
]
}
}
}
explicit StrategyFor explicit, plugins would add a new file (e.g. src/commands.ts) and then add this configuration to the package.json
{
"oclif": {
"commands": {
"strategy": "explicit",
"target": "./dist/index.js",
"identifier": "COMMANDS",
}
}
}
src/index.ts would then need to have an export with the same name as the identifier (if not set, it defaults to default) that's an object of command names to command classes, e.g.
import Hello from './commands/hello'
import HelloWorld from './commands/hello/world'
export const COMMANDS = {
hello: Hello,
'hello:world': HelloWorld,
howdy: Hello, // alias the `hello` command to `howdy`
}
The explicit strategy is useful to those who can't rely on file paths because they've bundled their code (https://github.com/oclif/oclif/issues/653) but it can also be used if you simply prefer to be more explicit about your commands instead of relying on oclif "magically" finding commands from the file system.
It can also be leveraged to create or modify commands at runtime (e.g. add flags to a command based on an API spec - see oclif + dynamic commands section below).
Unfortunately, there is no notable performance improvement for development since most of the time is spent auto-transpiling typescript with ts-node
single StrategyThis strategy is for single command CLIs, i.e. CLIs whose bin invokes a single command.
The current way to achieve this to set this in the package.json
{
"oclif": {
"default": ".",
"commands": "./dist",
}
}
The default tells oclif to use . as the command id when no command is found and commands tells oclif where to find the command file. In the example, ./dist will resolve to to ./dist/index.js
The default property has always been a less-than-ideal workaround and will be deprecated in favor of these settings:
{
"oclif": {
"commands": {
"strategy": "single",
"target": "./dist"
}
}
}
oclif.manifest.jsonFor all strategies, the oclif.manifest.json will be used to load the commands instead of the default behavior of the strategy.
allow pjson to be provided to Config
only register command ids if they have valid cmd
add enableAutoTranspile setting
dont assume plugin-help is installed
revert to original prompt implementation
### Bug Fixes * only set timeout for TTY
add import strategy for command discovery
deps: bump ip from 2.0.0 to 2.0.1
clear timeout when prompt times out
### Bug Fixes * update perf marker (0073a78) ## 3.19.2 (2024-02-14) ### Bug Fixes * allow long text in ux.prompt
### Bug Fixes * allow long text in ux.prompt
add import strategy for command discovery
### Features * bundle friendly
parser: cache stdin value in global scope
### Bug Fixes * update keywords
make @types/cli-progress a dependency
### Features * no longer use tsconfck
add node.options to pjson typings (#919) (42b113b), closes oclif/oclif#1238
add 'only' option to allowStdin
deps: bump password-prompt from 1.1.2 to 1.1.3
add flagSortOrder to help options
peserve original error coming from failed flag parsing
### Features * allowStdin option for flags
add exit codes to different flag validation errors
### Bug Fixes * cache this.commandsDir
add 'multipleNonGreedy' flag option to assign only one value per multiple flag
### Bug Fixes * command not found on empty arg
### Features * enable themes
### Bug Fixes * always convert to hex
change http to https in order to pass lockfile-check workflow
Your coding agent can read these notes before it upgrades. Set up the MCP server →