{"id":22111017,"url":"https://github.com/fcouceiro/nutiljs","last_synced_at":"2026-05-04T02:39:59.830Z","repository":{"id":65466786,"uuid":"127052153","full_name":"fcouceiro/nutiljs","owner":"fcouceiro","description":"A node.js command-line tool for generating boilerplate (controllers, services, models and resources) based on placeholders provided by the user.","archived":false,"fork":false,"pushed_at":"2018-04-05T14:05:48.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T14:07:41.437Z","etag":null,"topics":["boilerplate","cli","generator","nodejs","placeholder","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcouceiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-27T22:18:52.000Z","updated_at":"2018-04-07T13:55:11.000Z","dependencies_parsed_at":"2023-02-28T12:45:35.458Z","dependency_job_id":null,"html_url":"https://github.com/fcouceiro/nutiljs","commit_stats":null,"previous_names":["fcouceiro/nutil"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcouceiro%2Fnutiljs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcouceiro%2Fnutiljs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcouceiro%2Fnutiljs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcouceiro%2Fnutiljs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcouceiro","download_url":"https://codeload.github.com/fcouceiro/nutiljs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924944,"owners_count":20532898,"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":["boilerplate","cli","generator","nodejs","placeholder","utility"],"created_at":"2024-12-01T10:32:37.120Z","updated_at":"2026-05-04T02:39:54.810Z","avatar_url":"https://github.com/fcouceiro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"484\" alt=\"logoxhdpi\" src=\"https://user-images.githubusercontent.com/3154879/38369604-0bb512de-38e0-11e8-9e26-00bb2c465b37.png\"\u003e\n\n# nutil - Node Utility\n\nA command-line tool for generating boilerplate (controllers, services, models and resources) based on placeholders provided by the user.\n\n## Installation\n\n### Globally:\n* `yarn global add nutiljs`\n\nor \n* `npm i -g nutiljs`\n\nYou will then be able to run `nutil` from the command line. \n\n### Locally:\n* `yarn add nutiljs`\n\nor \n* `npm i nutiljs`\n\nUse a package runner like [npx](https://www.npmjs.com/package/npx) to run locally installed packages.\n\nYou will then be able to run `npx nutil` from the command line.\n\n## Usage\n\nCreate a controller based on the [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/controllers):\n\n    nutil --controller (-c) \u003ccontrollerName\u003e\n\n  \n\nCreate a service based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/services):\n\n    nutil --service (-s) \u003cserviceName\u003e\n\n  \n\nCreate a model based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/models):\n\n    nutil --model (-m) \u003cmodelName\u003e\n\n  \n\nCreate a resource based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/resources):\n\n    nutil --resource (-r) \u003cresourceName\u003e\n\n  \nMultiple generations can take place with a single command, by concatenatig different options. Example: create both a controller and a service:\n\n    nutil -s \u003cserviceName\u003e -c \u003ccontrollerName\u003e\n\n\n__Note:__ Generated files will be created in the directory where you run `nutil` from (cwd)\n\n## How it works\nThere is a pre-defined set of placeholder keys, as represented in the following table:\n\nKey | Meaning\n--- | ---\n[name] | Singular lower case\n[NAME] | Singular upper case\n[Name] | Singular pascal case\n[names] | Plural lower case\n[NAMES] | Plural upper case\n[Names] | Plural pascal case\n\nWhen the user requests the generation of a certain type, the generator spawns a process that \"search and replace\" the corresponding type placeholders (both in file name and file content). It substitutes all found keys with the appropriate casing (e.g. [name] would be replaced by the controller name in singular lower case; [Names] in plural pascal case; etc).\n\nCase representations are generated by the great [inflection package](https://www.npmjs.com/package/inflection).\n\n## Placeholders\nAll boilerplate is generated based on placeholders provided by the user. \nFeel free to use different placeholder keys in both file name and content, as described in [How it works](#how-it-works) section.\n\nPlaceholders must be placed inside `placeholders/` folder. \n\nA few basic placeholders are included by default (using mongoose for model generation and [Joi](https://www.npmjs.com/package/joi) for model validation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcouceiro%2Fnutiljs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcouceiro%2Fnutiljs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcouceiro%2Fnutiljs/lists"}