OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb / skills / paparam / api-extract.json

135 lines · json ref:
{
  "repo": "paparam",
  "timestamp": "2026-01-16T23:56:12.129Z",
  "entryPoint": "index.js",
  "exports": {
    "packageJson": {
      "main": "index.js"
    }
  },
  "api": {
    "file": "index.js",
    "exports": [],
    "classes": [
      {
        "name": "Parser"
      },
      {
        "name": "Command"
      },
      {
        "name": "Flag"
      },
      {
        "name": "Arg"
      },
      {
        "name": "Rest"
      },
      {
        "name": "Data"
      },
      {
        "name": "Validation"
      },
      {
        "name": "Bail"
      }
    ],
    "functions": [
      {
        "name": "argv"
      },
      {
        "name": "command"
      },
      {
        "name": "hiddenCommand"
      },
      {
        "name": "bail"
      },
      {
        "name": "sloppy"
      },
      {
        "name": "summary"
      },
      {
        "name": "description"
      },
      {
        "name": "header"
      },
      {
        "name": "footer"
      },
      {
        "name": "hiddenFlag"
      },
      {
        "name": "flag"
      },
      {
        "name": "rest"
      },
      {
        "name": "arg"
      },
      {
        "name": "validate"
      },
      {
        "name": "unindent"
      },
      {
        "name": "trimLine"
      },
      {
        "name": "snakeToCamel"
      },
      {
        "name": "parseFlag"
      },
      {
        "name": "trimFlag"
      },
      {
        "name": "createBail"
      },
      {
        "name": "defaultFlag"
      },
      {
        "name": "dedent"
      },
      {
        "name": "runValidation"
      },
      {
        "name": "runSync"
      },
      {
        "name": "runAsync"
      }
    ]
  },
  "readme": {
    "content": "# paparam\n\nStrict and fair parameter papa\n\n```\nnpm install paparam\n```\n\n## Usage\n\n### Simple Command\n\nUse `paparam` to build a simple cli parser. Here is an example app invocation from the command line:\n\n```bash\n> app -i uuid-284h43j -b peer1 -b peer2 --storage /tmp/file/place link-32832uifsdjsfda\n```\n\nTo handle this invocation, here is the `paparam` code\n\n```js\nimport { header, summary, command, flag, arg } from 'paparam'\nconst cmd = command(\n  'run',\n  header('A simple example app'),\n  summary('Example app that uses a roomLink to join a room and do work.'),\n  arg('<roomLink>', 'the room link key'),\n  flag('--uuid|-i [uuid]', 'The specific schema uuid to use'),\n  flag('--user|-u [user]', 'The user name associated with the entry'),\n  flag('--storage|-s [storage]', 'Path to storage directory'),\n  flag('--blind|-b [blind]', 'Blind peer keys (can be specified multiple times)').multiple()\n)\nconst program = cmd.parse() // default args: process.argv.slice(2)\nif (program === null) throw new E",
    "sections": [
      "intro",
      "usage",
      "api",
      "license"
    ],
    "hasApi": true,
    "hasExamples": true,
    "exampleCount": 6,
    "examples": [
      "npm install paparam",
      "To handle this invocation, here is the `paparam` code",
      "### Composed Commands\n\nUse `paparam` exports to compose commands together:"
    ]
  },
  "patterns": []
}