{"id":30728,"date":"2016-05-04T12:13:13","date_gmt":"2016-05-04T06:43:13","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=30728"},"modified":"2016-05-04T14:57:08","modified_gmt":"2016-05-04T09:27:08","slug":"create-cli-in-nodejs","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/","title":{"rendered":"Create CLI in Nodejs"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after <a title=\"Nodejs development\" href=\"http:\/\/www.tothenew.com\/mean-node-js-development-consulting\">getting to know Node.js<\/a> more, \u00a0I have never thought it would be done with so much ease. NPM helps us to make it an easy and time saving process. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">After creating and publishing my first CLI module , I want to share these simple steps to create your own CLI module. \u00a0In this blog, we will see how to make a node script do things on the command line.<\/span><\/p>\n<p><span style=\"line-height: 1.71429; font-size: 1rem;\"><strong><span style=\"font-weight: 400;\">We will also see an example of a<\/span><\/strong>\u00a0<\/span>file-share<span style=\"line-height: 1.71429; font-size: 1rem;\"> module.<\/span><\/p>\n<p><b>Step 1 : Node and NPM installation<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Here We assume that you have <\/span><b><i>NodeJs<\/i><\/b><span style=\"font-weight: 400;\"> and <\/span><b><i>NPM <\/i><\/b><span style=\"font-weight: 400;\">(Node package manager) installed on your computer. If not, please install both before we proceed further. <\/span><\/p>\n<p><span style=\"line-height: 1.71429; font-size: 1rem;\"><strong><span style=\"font-weight: 400;\">Installing <\/span><b><i>NodeJs<\/i><\/b><span style=\"font-weight: 400;\"> and <\/span><b><i>NPM <\/i><\/b><\/strong><i>is a simple process, <\/i>to do so <strong><span style=\"font-weight: 400;\">follow this<\/span><\/strong>\u00a0<\/span><a style=\"line-height: 1.71429; font-size: 1rem;\" title=\"link\" href=\"https:\/\/nodejs.org\/en\/download\/package-manager\/\">link<\/a><span style=\"line-height: 1.71429; font-size: 1rem;\">.<\/span><\/p>\n<p><b>Step 2 : Creating project and package.json configuration<\/b><\/p>\n<p>Now, create a project and run <strong>npm init<\/strong> .<\/p>\n<p><span style=\"font-weight: 400;\">NPM will ask you to enter some configuration values for your project. You can provide input or can choose to skip it by pressing <\/span><i><span style=\"font-weight: 400;\">enter<\/span><\/i> <i><span style=\"font-weight: 400;\">key. <\/span><\/i><span style=\"font-weight: 400;\">You can edit these entries anytime in future. It will create a template <\/span><i><span style=\"font-weight: 400;\">package.json <\/span><\/i><span style=\"font-weight: 400;\">file. <\/span><\/p>\n<p>NPM uses <em>package.json<\/em> file to know about your project and to install its dependencies.<\/p>\n<p>Now make following changes in <em>package.json<\/em> file :<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">remove <\/span><i><span style=\"font-weight: 400;\">main<\/span><\/i><span style=\"font-weight: 400;\"> key.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">add <\/span><i><span style=\"font-weight: 400;\">preferGlobal<\/span><\/i><span style=\"font-weight: 400;\"> key and set it to <\/span><i><span style=\"font-weight: 400;\">true<\/span><\/i><span style=\"font-weight: 400;\">. Now this module will always be installed globally.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">add <\/span><i><span style=\"font-weight: 400;\">bin<\/span><\/i><span style=\"font-weight: 400;\"> object which maps commands to files. After installation, <\/span><i><span style=\"font-weight: 400;\">npm <\/span><\/i><span style=\"font-weight: 400;\">will map <\/span><i><span style=\"font-weight: 400;\">my-command<\/span><\/i><span style=\"font-weight: 400;\"> to index.js file.<\/span><\/li>\n<\/ul>\n<p>Example<em> package.json<\/em> :<\/p>\n<p>[js]<br \/>\n{<br \/>\n &quot;name&quot;: &quot;test-cli&quot;,<br \/>\n &quot;version&quot;: &quot;1.0.0&quot;,<br \/>\n &quot;description&quot;: &quot;&quot;,<br \/>\n &quot;scripts&quot;: {<br \/>\n &quot;test&quot;: &quot;echo \\&quot;Error: no test specified\\&quot; &amp;&amp; exit 1&quot;<br \/>\n },<br \/>\n &quot;author&quot;: &quot;&quot;,<br \/>\n &quot;license&quot;: &quot;ISC&quot;,<br \/>\n &quot;preferGlobal&quot; : true,<br \/>\n &quot;bin&quot; : {<br \/>\n &quot;my-command&quot; : &quot;index.js&quot;<br \/>\n }<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><b>Step 3 : Creating index.js<\/b><\/p>\n<p>Now create<em> index.js<\/em> file and add the following code in it.<\/p>\n<p>[js]<br \/>\n#! \/usr\/bin\/env node<\/p>\n<p>console.log(&quot;my-command-cli running &#8230;&quot;);<br \/>\n[\/js]<\/p>\n<p><span style=\"font-weight: 400;\">(#!) at the start of first line also known as the <\/span><b>shebang, <\/b><span style=\"font-weight: 400;\">makes the script executable with what follows it.<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">\/bin\/env<\/span><\/i><span style=\"font-weight: 400;\"> looks at the current environment. We have added a \u201c<\/span><b>bin<\/b><span style=\"font-weight: 400;\">\u201d key in <\/span><i><span style=\"font-weight: 400;\">package.json <\/span><\/i><span style=\"font-weight: 400;\">file to tell Node where it can find the file to execute as a command (my-command). <\/span><\/p>\n<p><b>Step 4 : Installation and testing<\/b><\/p>\n<p>To install this module on your computer, run <em><strong>npm link<\/strong><\/em> .<\/p>\n<p>Run <em>my-command<\/em> in terminal\/command window to test your command and you will see the following output :<\/p>\n<p>[js]<br \/>\nmy-command-cli running &#8230;<br \/>\n[\/js]<\/p>\n<p>Now you can implement <em>index.js<\/em> as per your requirements.<\/p>\n<p><b>Use case : file-share module<\/b><\/p>\n<p>Following the above described approach, I have created and published a npm module named <a title=\"file-share\" href=\"https:\/\/www.npmjs.com\/package\/file-share\">file-share<\/a> .<\/p>\n<p>You can use it for sharing files and directories over LAN.<\/p>\n<p><a title=\"Github link\" href=\"https:\/\/github.com\/abhismcet005\/file-share\">Github link<\/a> \u00a0of file-share module.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, \u00a0I have never thought it would be done with so much ease. NPM helps us to [&hellip;]<\/p>\n","protected":false},"author":712,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[1185],"tags":[3309,3310,3311],"class_list":["post-30728","post","type-post","status-publish","format-standard","hentry","category-node-js-2","tag-cli-nodejs-prompt","tag-node-js-command-line-install","tag-node-js-command-line-tutorial"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Abhishek Singh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Create CLI in Nodejs | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Create CLI in Nodejs | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#article\",\"name\":\"Create CLI in Nodejs | TO THE NEW Blog\",\"headline\":\"Create CLI in Nodejs\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/abhishek-3\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2016-05-04T12:13:13+05:30\",\"dateModified\":\"2016-05-04T14:57:08+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#webpage\"},\"articleSection\":\"Node.js, cli nodejs prompt, node js command line install, node js command line tutorial\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"position\":2,\"name\":\"Node.js\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#listItem\",\"name\":\"Create CLI in Nodejs\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#listItem\",\"position\":3,\"name\":\"Create CLI in Nodejs\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/abhishek-3\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/abhishek-3\\\/\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-secured-prod.tothenew.com\\\/public\\\/profilePic\\\/233e49f9-f9ea-42cc-b3f5-56d64e3ef7da.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Abhishek Singh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/\",\"name\":\"Create CLI in Nodejs | TO THE NEW Blog\",\"description\":\"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-cli-in-nodejs\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/abhishek-3\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/abhishek-3\\\/#author\"},\"datePublished\":\"2016-05-04T12:13:13+05:30\",\"dateModified\":\"2016-05-04T14:57:08+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Create CLI in Nodejs | TO THE NEW Blog","description":"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to","canonical_url":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#article","name":"Create CLI in Nodejs | TO THE NEW Blog","headline":"Create CLI in Nodejs","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/abhishek-3\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2016-05-04T12:13:13+05:30","dateModified":"2016-05-04T14:57:08+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#webpage"},"articleSection":"Node.js, cli nodejs prompt, node js command line install, node js command line tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","position":2,"name":"Node.js","item":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#listItem","name":"Create CLI in Nodejs"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#listItem","position":3,"name":"Create CLI in Nodejs","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/abhishek-3\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/abhishek-3\/","name":"Abhishek Singh","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#authorImage","url":"https:\/\/newersworld-secured-prod.tothenew.com\/public\/profilePic\/233e49f9-f9ea-42cc-b3f5-56d64e3ef7da.jpeg","width":96,"height":96,"caption":"Abhishek Singh"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/","name":"Create CLI in Nodejs | TO THE NEW Blog","description":"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/abhishek-3\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/abhishek-3\/#author"},"datePublished":"2016-05-04T12:13:13+05:30","dateModified":"2016-05-04T14:57:08+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Create CLI in Nodejs | TO THE NEW Blog","og:description":"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to","og:url":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Create CLI in Nodejs | TO THE NEW Blog","twitter:description":"I wanted to create a command line tool for sharing files for some time now, but given all the things we have to go through to do that same was a hassle. But after getting to know Node.js more, I have never thought it would be done with so much ease. NPM helps us to","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"30728","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 06:30:51","updated":"2024-02-29 09:55:25","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/\" title=\"Node.js\">Node.js<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCreate CLI in Nodejs\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Node.js","link":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/"},{"label":"Create CLI in Nodejs","link":"https:\/\/www.tothenew.com\/blog\/create-cli-in-nodejs\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/30728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/712"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=30728"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/30728\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=30728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=30728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=30728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}