CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-arg

Unopinionated, no-frills CLI argument parser for Node.js applications

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "This criteria evaluates how well the engineer uses the arg package's alias resolution chain functionality to create a multi-level argument aliasing system. The focus is on correct implementation of alias chains where aliases point to other aliases (e.g., -d -> --log-level -> -v -> --verbosity), demonstrating understanding of how arg resolves these chains to canonical argument names.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import arg package",
      "description": "Correctly imports the arg package using require() or import statement",
      "max_score": 5
    },
    {
      "name": "Define canonical argument",
      "description": "Defines --verbosity as the canonical argument mapped to the Number type handler in the specification object",
      "max_score": 15
    },
    {
      "name": "Create direct short alias",
      "description": "Defines -v as a string alias pointing to '--verbosity' in the specification object",
      "max_score": 20
    },
    {
      "name": "Create direct long alias",
      "description": "Defines --log-level as a string alias pointing to '--verbosity' in the specification object",
      "max_score": 20
    },
    {
      "name": "Create alias chain",
      "description": "Defines -d as a string alias pointing to '--log-level', creating a multi-level alias chain (-d -> --log-level -> --verbosity)",
      "max_score": 25
    },
    {
      "name": "Call arg function",
      "description": "Invokes the arg() function with the specification object and the argv parameter using the options object format { argv: argv }",
      "max_score": 10
    },
    {
      "name": "Return parsed result",
      "description": "Returns the result object from arg() which contains the canonically-named properties and the _ array",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-arg

tile.json