docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a command-line tool that converts files between different text formats with configurable options.
Your task is to create a CLI application that accepts various command-line options and processes files based on those options. The tool should support the following functionality:
Your application must support the following command-line options:
Each option should have both a short form (single letter with -) and a long form (full word with --).
/**
* Main CLI application entry point
* Parses command-line arguments and processes file conversion
*/
function main() {
// Parse command-line options
// Validate required options
// Read input file
// Apply transformations
// Write output file
}
module.exports = { main };Provides command-line argument parsing with support for defining options with short and long names, type validation, and default values.