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 boolean flag parsing. The focus is on correct usage of arg's specification object, Boolean type handling, and alias configuration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses arg function",
"description": "Imports and uses the arg package's main parsing function (typically imported as `arg` or similar)",
"max_score": 15
},
{
"name": "Boolean type specification",
"description": "Uses JavaScript's Boolean constructor to specify boolean flags in the spec object (e.g., '--verbose': Boolean, '--force': Boolean)",
"max_score": 25
},
{
"name": "String type specification",
"description": "Uses JavaScript's String constructor to specify string options in the spec object (e.g., '--name': String)",
"max_score": 15
},
{
"name": "Alias configuration",
"description": "Correctly configures short flag aliases by mapping them to long flag names as strings (e.g., '-v': '--verbose')",
"max_score": 20
},
{
"name": "Spec object format",
"description": "Creates a proper arg specification object with keys starting with '-' or '--' as required by the arg package",
"max_score": 10
},
{
"name": "Custom argv support",
"description": "Passes the argv parameter to arg using the options object format (e.g., { argv: argv }) when provided, or uses default process.argv.slice(2) behavior",
"max_score": 10
},
{
"name": "Result object usage",
"description": "Returns the result object from arg directly, which includes the '_' property for positional arguments automatically",
"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