Unopinionated, no-frills CLI argument parser for Node.js applications
Overall
score
99%
{
"context": "This criteria evaluates how well the engineer uses the arg package to implement a CLI parser that handles negative numbers correctly, distinguishing them from flags while also supporting multiple temperature readings and basic string/boolean argument types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Number type usage",
"description": "Uses the Number type constructor for the --temp argument to enable negative number parsing. The arg package only allows negative numbers for Number and BigInt types.",
"max_score": 25
},
{
"name": "Array type syntax",
"description": "Uses array type syntax [Number] to allow multiple temperature readings to be collected (e.g., '--temp 20 --temp -5' should result in temp: [20, -5]).",
"max_score": 20
},
{
"name": "Proper spec structure",
"description": "Creates a valid arg specification object with keys starting with '--' for long arguments, correctly mapping to type handlers (Number, String, Boolean) or aliases.",
"max_score": 15
},
{
"name": "Alias configuration",
"description": "Configures short argument aliases (-t for --temp, -f for --fahrenheit, -v for --verbose) using string values that point to the long argument names.",
"max_score": 15
},
{
"name": "String type usage",
"description": "Uses the String type constructor for the --sensor argument to parse string values.",
"max_score": 10
},
{
"name": "Boolean type usage",
"description": "Uses the Boolean type constructor for --fahrenheit and --verbose flags so they don't consume values and set to true when present.",
"max_score": 10
},
{
"name": "Custom argv handling",
"description": "Passes the args parameter to arg() via the argv option (e.g., arg(spec, { argv: args })) to parse custom argument arrays instead of process.argv.",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-argdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10