base-cli-process is a utility package designed to normalize command-line arguments (`argv`) for applications built on the `base` framework. It functions as a `base` plugin, pre-processing the input object with `base-cli-schema` before invoking the `.process()` method from `base-cli`. This package, currently at version 0.1.19, helps structure and standardize CLI input, offering commands for configuration management (`--config`), current working directory (`--cwd`), data definition (`--data`), option setting (`--option`), and plugin loading (`--plugins`). It is part of an older ecosystem and has not seen recent development. Given its low version number and lack of recent updates, it operates under a pre-1.0 development model where API stability is not guaranteed across minor versions.
npm install base-cli-processVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize a `base` application, register `base-cli-process` as a plugin, and then simulate processing command-line arguments to affect `app.options` and `app.config`.
Consider migrating to a modern, actively maintained CLI parsing library. If continued use is necessary, pin to the exact version and be aware of potential breaking changes if upstream 'base' packages are updated.
Ensure your project is configured for CommonJS, or use tools to transpile/bundle if integrating into an ESM project. For new projects, prefer ESM-first alternatives.
Always install `base`, `base-cli`, and `base-cli-schema` alongside `base-cli-process`. Refer to their respective documentations for compatibility and usage.
Ensure `app.use(cli())` is called *after* initializing `app = new Base()`. Also, verify that `base-cli` is installed and registered if it provides the `.cli` property directly to your `base` instance.
This package is CommonJS. If you must use it in an ESM project, consider using a build tool that handles CJS-to-ESM conversion, or if running Node.js, wrap the import in an async `import()` call (though direct `require` is usually the issue here).