{"id":1098,"date":"2025-03-12T21:21:30","date_gmt":"2025-03-12T21:21:30","guid":{"rendered":"https:\/\/razvanvancea.ro\/blog\/?p=1098"},"modified":"2026-07-15T07:03:56","modified_gmt":"2026-07-15T07:03:56","slug":"how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command","status":"publish","type":"post","link":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/","title":{"rendered":"How to repeat any CLI Command for X times using NPM repeat-cli-command"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1098\" class=\"elementor elementor-1098\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-38e860a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"38e860a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4052d63\" data-id=\"4052d63\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-aa2256f elementor-widget elementor-widget-text-editor\" data-id=\"aa2256f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this article I will show you an awesome NPM tool that I created called <a href=\"https:\/\/www.npmjs.com\/package\/repeat-cli-command\" target=\"_blank\" rel=\"noopener\"><strong>repeat-cli-command<\/strong><\/a>.<strong>\u00a0<\/strong>It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times.\u00a0<\/p><p>Whether you are running tests, debugging, or just want to loop a command, this tool has you covered.<\/p><p>Let&#8217;s dive in!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3f78d0d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3f78d0d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-127141a\" data-id=\"127141a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-af1df11 elementor-widget elementor-widget-heading\" data-id=\"af1df11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Installation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f95ad39 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f95ad39\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b1a1c5a\" data-id=\"b1a1c5a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-310385e elementor-widget elementor-widget-text-editor\" data-id=\"310385e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>First, install it globally (-g) or at project level (-D) with npm.<br \/><br \/><strong>npm install -g repeat-cli-command<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ae23dd2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ae23dd2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7ad483b\" data-id=\"7ad483b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3ee732e elementor-widget elementor-widget-heading\" data-id=\"3ee732e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Usage<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b4765ce elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b4765ce\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3b6370e\" data-id=\"3b6370e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9d3c794 elementor-widget elementor-widget-text-editor\" data-id=\"9d3c794\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>Let's say we want to repeat a simple command like printing \"Hello\" to the terminal, for 5 times. We just run<\/pre><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4cd73df elementor-widget elementor-widget-text-editor\" data-id=\"4cd73df\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>npx repeat-cli-command \"echo 'Hello' \" --times=5<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6ef2c48 elementor-widget elementor-widget-text-editor\" data-id=\"6ef2c48\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Now, let&#8217;s say you&#8217;re working with PactumJS for API testing (or any other testing framework) and want to rerun the tests for 10 times.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cfb7f3c elementor-widget elementor-widget-text-editor\" data-id=\"cfb7f3c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>npx repeat-cli-command 'npx mocha api_tests --timeout=10000' --times=10<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-352d0b8 elementor-widget elementor-widget-text-editor\" data-id=\"352d0b8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>What if you have some web e2e automated tests with TestCafe? No problem!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8fec97a elementor-widget elementor-widget-text-editor\" data-id=\"8fec97a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>npx repeat-cli-command 'npx testcafe chrome:headless web_tests' --times=2<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-490c573 elementor-widget elementor-widget-text-editor\" data-id=\"490c573\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Simple, isn&#8217;t it?<\/p><p>This is how you can use repeat-cli-command to boost productivity! It works with any CLI command and can become handy for testing, debugging, and much more.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ecad10f elementor-widget elementor-widget-spacer\" data-id=\"ecad10f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cbaa528 elementor-widget elementor-widget-text-editor\" data-id=\"cbaa528\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Enjoyed this article?<br \/>I share more practical automation tips on\u00a0<a href=\"https:\/\/www.youtube.com\/c\/LearnwithRV\/videos\" target=\"_blank\" rel=\"noopener\"><strong>YouTube<\/strong><\/a>\u00a0and\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/razvanvancea\/\" target=\"_blank\" rel=\"noopener\"><strong>LinkedIn<\/strong><\/a>.<\/p><p><strong>Need structured guidance instead of learning alone?<\/strong><br \/>I offer\u00a0<strong>1-on-1 mentoring<\/strong>\u00a0&#8211; learn more \u2192\u00a0<strong><a href=\"https:\/\/razvanvancea.ro\/1on1.html\" target=\"_blank\" rel=\"noopener\">HERE<\/a><\/strong><\/p><p>Or email me at\u00a0<strong>iamqarv [at] gmail [dot] com<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9b675bb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9b675bb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e5b8914\" data-id=\"e5b8914\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6bf972b elementor-widget elementor-widget-video\" data-id=\"6bf972b\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=efD08BFvILk&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>In this article I will show you an awesome NPM tool that I created called&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[13,12],"tags":[],"class_list":["post-1098","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tools"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"RV\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-03-12T21:21:30+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-15T07:03:56+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/razvanvancea\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/razvanvancea\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@RazvanVancea\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@RazvanVancea\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#blogposting\",\"name\":\"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog\",\"headline\":\"How to repeat any CLI Command for X times using NPM repeat-cli-command\",\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/Copy-of-MacOS-Tools-to-BOOST-Productivity-1.png\",\"width\":1920,\"height\":1080,\"caption\":\"repeat-cli-command-logo\"},\"datePublished\":\"2025-03-12T21:21:30+00:00\",\"dateModified\":\"2026-07-15T07:03:56+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#webpage\"},\"articleSection\":\"Linux, Tools\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/tools\\\/#listItem\",\"name\":\"Tools\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/tools\\\/#listItem\",\"position\":2,\"name\":\"Tools\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/tools\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#listItem\",\"name\":\"How to repeat any CLI Command for X times using NPM repeat-cli-command\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#listItem\",\"position\":3,\"name\":\"How to repeat any CLI Command for X times using NPM repeat-cli-command\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/tools\\\/#listItem\",\"name\":\"Tools\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\",\"name\":\"RV\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#personImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588\",\"width\":96,\"height\":96,\"caption\":\"RV\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/razvanvancea\\\/\",\"https:\\\/\\\/twitter.com\\\/RazvanVancea\",\"https:\\\/\\\/www.youtube.com\\\/@LearnwithRV\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/razvanvancea\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/\",\"name\":\"RV\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#authorImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588\",\"width\":96,\"height\":96,\"caption\":\"RV\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/razvanvancea\\\/\",\"https:\\\/\\\/twitter.com\\\/RazvanVancea\",\"https:\\\/\\\/www.youtube.com\\\/@LearnwithRV\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/razvanvancea\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#webpage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/\",\"name\":\"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog\",\"description\":\"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/Copy-of-MacOS-Tools-to-BOOST-Productivity-1.png\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#mainImage\",\"width\":1920,\"height\":1080,\"caption\":\"repeat-cli-command-logo\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2025\\\/03\\\/12\\\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\\\/#mainImage\"},\"datePublished\":\"2025-03-12T21:21:30+00:00\",\"dateModified\":\"2026-07-15T07:03:56+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/\",\"name\":\"Learn with RV - Tech Blog\",\"description\":\"#testautomation #qa #programming #linux #devops\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog","description":"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,","canonical_url":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#blogposting","name":"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog","headline":"How to repeat any CLI Command for X times using NPM repeat-cli-command","author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2025\/03\/Copy-of-MacOS-Tools-to-BOOST-Productivity-1.png","width":1920,"height":1080,"caption":"repeat-cli-command-logo"},"datePublished":"2025-03-12T21:21:30+00:00","dateModified":"2026-07-15T07:03:56+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#webpage"},"isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#webpage"},"articleSection":"Linux, Tools"},{"@type":"BreadcrumbList","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/razvanvancea.ro\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/tools\/#listItem","name":"Tools"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/tools\/#listItem","position":2,"name":"Tools","item":"https:\/\/razvanvancea.ro\/blog\/category\/tools\/","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#listItem","name":"How to repeat any CLI Command for X times using NPM repeat-cli-command"},"previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#listItem","position":3,"name":"How to repeat any CLI Command for X times using NPM repeat-cli-command","previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/tools\/#listItem","name":"Tools"}}]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/#person","name":"RV","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#personImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588","width":96,"height":96,"caption":"RV"},"sameAs":["https:\/\/www.facebook.com\/razvanvancea\/","https:\/\/twitter.com\/RazvanVancea","https:\/\/www.youtube.com\/@LearnwithRV","https:\/\/www.linkedin.com\/in\/razvanvancea"]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author","url":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/","name":"RV","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#authorImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588","width":96,"height":96,"caption":"RV"},"sameAs":["https:\/\/www.facebook.com\/razvanvancea\/","https:\/\/twitter.com\/RazvanVancea","https:\/\/www.youtube.com\/@LearnwithRV","https:\/\/www.linkedin.com\/in\/razvanvancea"]},{"@type":"WebPage","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#webpage","url":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/","name":"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog","description":"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#breadcrumblist"},"author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"creator":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2025\/03\/Copy-of-MacOS-Tools-to-BOOST-Productivity-1.png","@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#mainImage","width":1920,"height":1080,"caption":"repeat-cli-command-logo"},"primaryImageOfPage":{"@id":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/#mainImage"},"datePublished":"2025-03-12T21:21:30+00:00","dateModified":"2026-07-15T07:03:56+00:00"},{"@type":"WebSite","@id":"https:\/\/razvanvancea.ro\/blog\/#website","url":"https:\/\/razvanvancea.ro\/blog\/","name":"Learn with RV - Tech Blog","description":"#testautomation #qa #programming #linux #devops","inLanguage":"en-US","publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops","og:type":"article","og:title":"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog","og:description":"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,","og:url":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/","article:published_time":"2025-03-12T21:21:30+00:00","article:modified_time":"2026-07-15T07:03:56+00:00","article:publisher":"https:\/\/www.facebook.com\/razvanvancea","article:author":"https:\/\/www.facebook.com\/razvanvancea\/","twitter:card":"summary_large_image","twitter:site":"@RazvanVancea","twitter:title":"How to repeat any CLI Command for X times using NPM repeat-cli-command - Learn with RV - Tech Blog","twitter:description":"In this article I will show you an awesome NPM tool that I created called repeat-cli-command. It is open source and I invite you to contribute to it. This tool allows you to repeat any CLI command effortlessly for an X number of times. Whether you are running tests, debugging, or just want to loop a command,","twitter:creator":"@RazvanVancea"},"aioseo_meta_data":{"post_id":"1098","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","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":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","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":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","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":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-03-12 21:21:30","updated":"2026-07-23 11:30:18","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\/category\/tools\/\" title=\"Tools\">Tools<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to repeat any CLI Command for X times using NPM repeat-cli-command\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/razvanvancea.ro\/blog\/"},{"label":"Tools","link":"https:\/\/razvanvancea.ro\/blog\/category\/tools\/"},{"label":"How to repeat any CLI Command for X times using NPM repeat-cli-command","link":"https:\/\/razvanvancea.ro\/blog\/2025\/03\/12\/how-to-repeat-any-cli-command-for-x-times-using-npm-repeat-cli-command\/"}],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2025\/03\/Copy-of-MacOS-Tools-to-BOOST-Productivity-1.png","_links":{"self":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/comments?post=1098"}],"version-history":[{"count":13,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1098\/revisions"}],"predecessor-version":[{"id":1593,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1098\/revisions\/1593"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/media\/1100"}],"wp:attachment":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/media?parent=1098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/categories?post=1098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/tags?post=1098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}