Registry / serialization / conventional-cli

conventional-cli

JSON →
library1.2.0jsnpmunverified

conventional-cli provides a framework for defining and managing Command Line Interface (CLI) arguments in a structured and conventional manner. It allows developers to specify argument properties such as long and short names, descriptions, types (like enum or glob), default values, and whether they are required or deprecated. The library ships with TypeScript types, enabling type-safe CLI development. The current stable version is 1.2.0, released on January 29, 2020. Based on the release history, the project had a brief period of active development in early 2020 but has not seen any updates or releases since then, indicating a very low release cadence and an effectively abandoned status. Its primary differentiator is its emphasis on establishing a consistent, conventional structure for CLI argument definitions, which can aid in standardization and potentially simplify automated parsing or documentation generation for CLI tools.

npm install conventional-cli
INSTALL
IMPORT
SIG · CONVENTIONAL-CLI
C
conventional-cli
serializationjavascriptv1.2.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Argument
✓ import { Argument } from 'conventional-cli';
✗ const Argument = require('conventional-cli').Argument;
Primary class for defining a CLI argument. The library ships with TypeScript types, so prefer ESM imports.
IArgument
✓ import { IArgument } from 'conventional-cli';
TypeScript interface representing the structure of a CLI argument. Used for type-checking argument configurations.
ArgumentTypes
✓ import { ArgumentTypes } from 'conventional-cli';
✗ import { ARGUMENT_TYPES } from 'conventional-cli';
Enum defining various supported types for CLI arguments, such as `enum`, `glob`, `path`.

Demonstrates how to define a CLI argument with various properties using the Argument class and ArgumentTypes enum.

import { Argument, IArgument, ArgumentTypes } from 'conventional-cli'; const argument: IArgument = new Argument(); argument.longName = '--config-path'; argument.shortName = '-c'; argument.description = 'Specify the configuration file path.'; argument.additionalDescription = 'This path can be absolute or relative to the current working directory.'; argument.type = ArgumentTypes.path; argument.default = './config.json'; argument.required = false; argument.deprecated = false; argument.delimiter = ' '; argument.beta = ''; console.log(`Defined argument: ${argument.longName}`); console.log(`Description: ${argument.description}`); console.log(`Type: ${argument.type}`);
conventional-cli --version
Debug
Known issues
breakingThe project has been inactive since January 2020 (last release v1.2.0). It is considered abandoned and may not be compatible with newer Node.js versions, dependency updates, or modern JavaScript features. Security vulnerabilities in its transitive dependencies will likely not be patched.
fix
Evaluate alternative, actively maintained CLI argument parsing libraries for new projects. For existing projects, consider vendoring the code or migrating.
affects: >=1.0.0
gotchaThe `beta` option for arguments, added in v1.1.0, and `path` via argumentType, added in v1.2.0, are relatively new features within this inactive library. Relying on them might mean being locked into this specific, unmaintained version.
fix
Ensure your project explicitly uses `conventional-cli@^1.2.0` if you depend on these features. However, due to the project's abandoned status, consider carefully before using.
affects: <1.1.0
Errors
Common errors & fixes
TypeError: conventional_cli_1.Argument is not a constructor
Attempting to use CommonJS `require()` syntax while treating the imported module as an ES module with named exports, or vice-versa, or an incorrect import path.
fix
Ensure you are using `import { Argument } from 'conventional-cli';` for ES modules and TypeScript. If using CommonJS, it might be `const { Argument } = require('conventional-cli');` but the library primarily targets ESM/TypeScript usage.
Property 'type' does not exist on type 'IArgument'.
This error typically occurs if your TypeScript environment is not correctly picking up the library's type definitions, or if you're attempting to assign a value that doesn't conform to the `ArgumentTypes` enum.
fix
Verify that `conventional-cli` is correctly installed and its type definitions are accessible. Ensure the assigned value for `argument.type` is one of the valid `ArgumentTypes` enum members (e.g., `ArgumentTypes.enum`, `ArgumentTypes.path`).
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
conventional-cli — npm install conventional-cli · libregistry