{"id":17556,"library":"conventional-cli","title":"Conventional CLI Tooling","description":"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.","status":"abandoned","version":"1.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/svoboda-rabstvo/conventional-cli","tags":["javascript","cli","conventional","typescript"],"install":[{"cmd":"npm install conventional-cli","lang":"bash","label":"npm"},{"cmd":"yarn add conventional-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add conventional-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Primary class for defining a CLI argument. The library ships with TypeScript types, so prefer ESM imports.","wrong":"const Argument = require('conventional-cli').Argument;","symbol":"Argument","correct":"import { Argument } from 'conventional-cli';"},{"note":"TypeScript interface representing the structure of a CLI argument. Used for type-checking argument configurations.","symbol":"IArgument","correct":"import { IArgument } from 'conventional-cli';"},{"note":"Enum defining various supported types for CLI arguments, such as `enum`, `glob`, `path`.","wrong":"import { ARGUMENT_TYPES } from 'conventional-cli';","symbol":"ArgumentTypes","correct":"import { ArgumentTypes } from 'conventional-cli';"}],"quickstart":{"code":"import { Argument, IArgument, ArgumentTypes } from 'conventional-cli';\n\nconst argument: IArgument = new Argument();\nargument.longName = '--config-path';\nargument.shortName = '-c';\nargument.description = 'Specify the configuration file path.';\nargument.additionalDescription = 'This path can be absolute or relative to the current working directory.';\nargument.type = ArgumentTypes.path;\nargument.default = './config.json';\nargument.required = false;\nargument.deprecated = false;\nargument.delimiter = ' ';\nargument.beta = '';\n\nconsole.log(`Defined argument: ${argument.longName}`);\nconsole.log(`Description: ${argument.description}`);\nconsole.log(`Type: ${argument.type}`);","lang":"typescript","description":"Demonstrates how to define a CLI argument with various properties using the Argument class and ArgumentTypes enum."},"warnings":[{"fix":"Evaluate alternative, actively maintained CLI argument parsing libraries for new projects. For existing projects, consider vendoring the code or migrating.","message":"The 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.","severity":"breaking","affected_versions":">=1.0.0"},{"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.","message":"The `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.","severity":"gotcha","affected_versions":"<1.1.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"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.","cause":"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.","error":"TypeError: conventional_cli_1.Argument is not a constructor"},{"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`).","cause":"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.","error":"Property 'type' does not exist on type 'IArgument'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}