{"id":18561280,"url":"https://github.com/apostrophecms/boring","last_synced_at":"2025-04-10T03:30:37.298Z","repository":{"id":30230185,"uuid":"33781292","full_name":"apostrophecms/boring","owner":"apostrophecms","description":"A minimalist command line option parser.","archived":false,"fork":false,"pushed_at":"2021-03-24T16:10:34.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-03T05:30:03.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apostrophecms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-11T15:37:51.000Z","updated_at":"2024-05-18T20:06:20.000Z","dependencies_parsed_at":"2022-09-13T18:32:58.036Z","dependency_job_id":null,"html_url":"https://github.com/apostrophecms/boring","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Fboring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Fboring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Fboring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Fboring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apostrophecms","download_url":"https://codeload.github.com/apostrophecms/boring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248150677,"owners_count":21055965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T22:06:24.747Z","updated_at":"2025-04-10T03:30:36.649Z","avatar_url":"https://github.com/apostrophecms.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boring\n\n\u003ca href=\"https://apostrophecms.com/\"\u003e\u003cimg src=\"https://raw.github.com/apostrophecms/boring/master/logos/logo-box-madefor.png\" align=\"right\" alt=\"Made for ApostropheCMS\"/\u003e\u003c/a\u003e\n\nA command line argument parser without pirates\n\n## What you get with Boring\n\nInput:\n\n```\nnode app jump sideways --foo --bar=whee --super-cool=totally\n```\n\nResponse:\n\n```javascript\n{\n  _: [ \"jump\", \"sideways\"],\n  foo: true,\n  bar: \"whee\",\n  \"super-cool\": \"totally\"\n}\n```\n\nNotice that parameters without `--`, if any, go into the `_` array. Parameters with `--` become properties in their own right.\n\n## How you get it\n\n```javascript\nconst argv = require('boring')({});\n```\n\nThe options object is optional.\n\n## Options\n\n### Passthrough\n\nIt is a common convention to never treat any arguments that appear after a `--` placeholder (by itself) as named options, even if they start with `--`.\n\nInstead, the remainder are treated as positional arguments, no matter what.\n\nTo get this behavior with Boring, pass the `end: true` option:\n\n```javascript\nconst argv = require('boring')({\n  end: true\n});\nconsole.log(argv);\n```\n\nNow, when you run this command:\n\n```bash\nnode app hello --pretty -- --boring\n```\n\nYou will get:\n\n```javascript\n{\n  _: [ 'hello', '--boring' ],\n  pretty: true\n}\n```\n\n## What you don't get with boring\n\n### Single hyphens: nope\n\nThere is no support for old-fashioned \"single-hyphen\" options, like:\n\n```\n-x 50\n```\n\nOr:\n\n```\n-h\n```\n\nYou can't tell which are boolean and which take arguments unless a specification is passed in. And that's not boring enough for us.\n\n### Usage messages, strictness, etc.: nope\n\nThese are very simple to implement, and if you're like us, you'd rather do it yourself.\n\n## Philosophy\n\nWe have nothing against full-featured, pirate-themed option parsers, which are very nice if you're into that sort of thing. We just find ourselves walking the plank when our options don't follow the pattern of what's easy to validate with piracy.\n\nThis simple module is too dumb to break.\n\n## About ApostropheCMS\n\nBoring was created for use in ApostropheCMS, an open-source content management system built on node.js. If you like Boring you should definitely [check out apostrophecms.org](http://apostrophecms.org).\n\n## Support\n\nFeel free to open issues on [github](http://github.com/apostrophecms/boring).\n\n\u003ca href=\"http://apostrophecms.com/\"\u003e\u003cimg src=\"https://raw.github.com/apostrophecms/boring/master/logos/logo-box-builtby.png\" /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapostrophecms%2Fboring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapostrophecms%2Fboring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapostrophecms%2Fboring/lists"}