const moveOptions = autoConfig({
force: {
args: '-f',
help: 'Do not prompt for confirmation before overwriting the destination path. (The -f option overrides any previous -i or -n options.)'type: 'boolean',
},
interactive: {
args: '-i',
help: 'Cause mv to write a prompt to standard error before moving a file that would overwrite an existing file. If the response from the standard input begins with the character `y` or `Y`, the move is attempted. (The -i option overrides any previous -f or -n options.)'type: 'boolean',
},
noOverwrite: {
args: '-n',
help: 'Do not overwrite an existing file. (The -n option overrides any previous -f or -i options.)',
type: 'boolean',
},
verbose: {
args: '-v',
help: 'Cause mv to be verbose, showing files after they are moved.',
type: 'boolean',
}
});
Zod validators for optional, min, max, gt, gte, lt, lte.
Credit and References
Projects researched, with any notes on why it wasn't a good fit.
yargs - like the fluent API, and command syntax. Could use as base library. Env vars could be handled via default helper function to check for env keys. Or we could transform yargs config into overlapping format.
commander - like the many ways to configure arguments. Could probably be used as underlying library, however initial attempt was slower than starting from scratch.
cosmiconfig - focused too much on disk-backed config.
rc - focused on 'magically' locating disk-backed config.
node-convict - great pattern, but limited TypeScript support.
nconf - setter & getter, plus the hierarchy adds extra layers.
conf - too opinionated (writing to disk.) Interesting use of JSON Schemas, Versioning, and Migrations.
gluegun - great design, focused on opinionated design of CLI apps though.
A Unified Config & Arguments Library for Node.js. Featuring support for environment variables, command line arguments, and JSON files!
We found that @elite-libs/auto-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 30 Aug 2023
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Malicious Go packages are impersonating popular libraries to install hidden loader malware on Linux and macOS, targeting developers with obfuscated payloads.
Bybit's $1.46B hack by North Korea's Lazarus Group pushes 2025 crypto losses to $1.6B in just two months, already surpassing all of 2024's $1.49B total.
OpenSSF has published OSPS Baseline, an initiative designed to establish a minimum set of security-related best practices for open source software projects.