{"id":2910,"date":"2024-04-19T02:21:43","date_gmt":"2024-04-19T02:21:43","guid":{"rendered":"https:\/\/www.vuepilot.com\/support\/?post_type=article&#038;p=2910"},"modified":"2024-11-05T10:02:45","modified_gmt":"2024-11-05T00:02:45","slug":"vuepilot-cli","status":"publish","type":"article","link":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/","title":{"rendered":"Using The VuePilot CLI"},"content":{"rendered":"<p>The VuePilot CLI allows you to programmatically control your VuePilot players and the content displayed on your screens using a terminal or automated process.<\/p>\n<p>Trigger apps, notifications and send remote commands to your VuePilot controlled screens from the command line using scripts or shell commands triggered by build pipelines, system events or other automated processes.<\/p>\n<p>The VuePilot CLI unlocks a powerful set of automation tools that can be used to automate and control content on your screens without the need to manually interact with the VuePilot<\/p>\n<h2>Use Cases<\/h2>\n<ul>\n<li>Deployment pipeline progress notifications<\/li>\n<li>Automated app configuration updates (update URLs, content, images and video etc)<\/li>\n<li>Automated synchronisation of screen rotations (start, stop on schedule)<\/li>\n<li>Automated notifications for information and alarms displayed on screens<\/li>\n<\/ul>\n<h2>Installation<\/h2>\n<ul>\n<li>Download the version for your operating system at <a href=\"https:\/\/www.vuepilot.com\/cli\">https:\/\/www.vuepilot.com\/cli<\/a><\/li>\n<li>Extract the contents of the package and move the executable to a location on your system of your choice\n<ul>\n<li><strong>sudo cp .\/vuepilot \/usr\/local\/bin\/vuepilot<\/strong> &#8211; on linux systems for example for the binary to be available in your <strong>$PATH<\/strong><\/li>\n<li>We will assume <strong>vuepilot<\/strong> is within your <strong>$PATH<\/strong> for the following steps, if not ensure you run with relative path ie <strong>.\/vuepilot<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Open a terminal \/ command line and run\u00a0<strong>vuepilot\u00a0<\/strong>to test.<\/li>\n<\/ul>\n<h2>Setup Credentials<\/h2>\n<p>The VuePilot CLI requires that your API key is available in your shell environment.\u00a0 This must be available within the <strong>VUEPILOT_API_KEY<\/strong> environment variable<br \/>\nYour API key can be found on your profile page from the dashboard &#8211; <a href=\"https:\/\/www.vuepilot.com\/users\/edit\">https:\/\/www.vuepilot.com\/users\/edit<\/a><\/p>\n<h3>Linux \/ Mac OS<\/h3>\n<ul>\n<li>Open your <strong>~\/.zshrc<\/strong> or <strong>~\/.bash_profile<\/strong> for editing<\/li>\n<li>Add the line <strong>export<\/strong> <strong>VUEPILOT_API_KEY=&lt;your api key&gt;<\/strong><\/li>\n<li>Save the file and reload your shell environment<\/li>\n<\/ul>\n<h3>Windows<\/h3>\n<p>Follow the instructions from the following article to add the <strong>VUEPILOT_API_KEY<\/strong> environment variable to your system<\/p>\n<p><strong>How to set the path and environment variables in Windows<br \/>\n<\/strong><a href=\"https:\/\/www.computerhope.com\/issues\/ch000549.htm\">https:\/\/www.computerhope.com\/issues\/ch000549.htm<\/a><\/p>\n<h2>Usage<\/h2>\n<p>Once you have installed the tool and setup your credentials you are ready to use the CLI.\u00a0 The CLI follows standard command line argument conventions which will be familiar to you if you have ever used a tool like the <strong>aws<\/strong> CLI or <strong>kubectl<\/strong><\/p>\n<p>Type <strong>vuepilot<\/strong> to see a listing of available commands.\u00a0 The commands <strong>app<\/strong> , <strong>rotation<\/strong> , <strong>machine<\/strong> etc allow you to interact with these resources from the VuePilot API.<\/p>\n<p>Type the name of the command and hit enter to see any available sub commands.<\/p>\n<p>For example: Type <strong>vuepilot machine<\/strong>to see available sub commands for the <strong>machine<\/strong> command.<br \/>\nYou can then append these sub commands. ie <strong>vuepilot machine list<\/strong> to list your machines<\/p>\n<p>With any command you can pass the option <strong>-h<\/strong> or <strong>&#8211;help<\/strong> to see the help instructions and available options for that particular command or sub command.<\/p>\n<h3>Output Formats &#8211; JSON vs List<\/h3>\n<p>Some commands offer an output option (<strong>-o<\/strong> or <strong>&#8211;output<\/strong>) this will allow you to either print the results to screen in a human readable list or as JSON which can be used to integrate into other systems.<\/p>\n<p>Outputting as JSON will also display additional attributes that are not shown in the standard list view.\u00a0 The standard list contains the most common attributes you would want to see.<\/p>\n<p>As an example<\/p>\n<ul>\n<li><strong>vuepilot machine list<\/strong> lists out your machines in a human readable format<\/li>\n<li><strong>vuepilot machine list -o json<\/strong><\/li>\n<\/ul>\n<p>JSON outputs can be piped into command line JSON parsing tools such as JQ which can then be queried directly creating a very powerful set of\u00a0 command line tools.<\/p>\n<p><strong>JQ Example<\/strong><\/p>\n<p>To get a listing of all machine names in your account, using JSON output and JQ:<\/p>\n<p><strong>vuepilot machine list -o json | jq &#8220;.[] | .name&#8221;<\/strong><\/p>\n<h2>Notifications<\/h2>\n<p><img class=\"wp-image-2918 size-large aligncenter\" data-original=\"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2024\/04\/notify-warning-1024x599.webp\" alt=\"Warning Notification\" width=\"699\" height=\"409\" \/><\/p>\n<p>Notifications are a powerful tool for triggering alarms and information messages for a brief period of time on screens in your business. You can integrate these notifications into your backend processes and build pipelines to show information on screens in your business triggered by automated processes.<\/p>\n<p>There are 4 types of notifications, each with a different colour and image, these are\u00a0 <strong>success, warning, info<\/strong> and <strong>alarm<\/strong><\/p>\n<p>A custom image can also be provided instead of the default notification images using the\u00a0<strong>&#8211;url<\/strong> option.<\/p>\n<p>You can specify how long you want the notification to by passing in the number of seconds to the command with the\u00a0<strong>-s\u00a0<\/strong>option.<\/p>\n<p><strong>Example Notify Commands<\/strong><\/p>\n<p><strong><em>Notify Machines 8726 &amp; 8847 Success Message &#8220;Application Deployed&#8221; For 30 Seconds<\/em><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">vuepilot machine notify -m 8726,8847 -t \"Application Deployed\" -d \"The application\u00a0 has been successfully deployed\" -c success -s 30<\/pre>\n<p><strong><em>Notify Machines 8726 &amp; 8847 Alarm Message &#8220;Application Failed&#8221; For 60 Seconds<\/em><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">vuepilot machine notify -m 8726,8847 -t \"Application Failed\" -d \"The application has failed\" -c alarm -s 60<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The VuePilot CLI allows you to programmatically control your VuePilot players and the content displayed on your screens using a terminal or automated process. Trigger apps, notifications and send remote commands to your VuePilot controlled screens from the command line using scripts or shell commands triggered by build pipelines, system events or other automated processes. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2923,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","article-category":[36,66],"article-tag":[84,83],"class_list":["post-2910","article","type-article","status-publish","format-standard","has-post-thumbnail","hentry","article-category-getting-started","article-category-software","article-tag-automation","article-tag-cli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using The VuePilot CLI &#8211; VuePilot<\/title>\n<meta name=\"description\" content=\"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using The VuePilot CLI &#8211; VuePilot\" \/>\n<meta property=\"og:description\" content=\"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"VuePilot\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vuepilot\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-05T00:02:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2024\/04\/cli-hero-3.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@vuepilot\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/\",\"url\":\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/\",\"name\":\"Using The VuePilot CLI &#8211; VuePilot\",\"isPartOf\":{\"@id\":\"https:\/\/www.vuepilot.com\/support\/#website\"},\"datePublished\":\"2024-04-19T02:21:43+00:00\",\"dateModified\":\"2024-11-05T00:02:45+00:00\",\"description\":\"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vuepilot.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using The VuePilot CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vuepilot.com\/support\/#website\",\"url\":\"https:\/\/www.vuepilot.com\/support\/\",\"name\":\"VuePilot\",\"description\":\"Digital signage help and assistance\",\"publisher\":{\"@id\":\"https:\/\/www.vuepilot.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vuepilot.com\/support\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vuepilot.com\/support\/#organization\",\"name\":\"VuePilot\",\"url\":\"https:\/\/www.vuepilot.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vuepilot.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2020\/06\/vuepilot-social-banner.jpg\",\"contentUrl\":\"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2020\/06\/vuepilot-social-banner.jpg\",\"width\":1200,\"height\":630,\"caption\":\"VuePilot\"},\"image\":{\"@id\":\"https:\/\/www.vuepilot.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vuepilot\",\"https:\/\/twitter.com\/vuepilot\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using The VuePilot CLI &#8211; VuePilot","description":"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/","og_locale":"en_US","og_type":"article","og_title":"Using The VuePilot CLI &#8211; VuePilot","og_description":"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events","og_url":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/","og_site_name":"VuePilot","article_publisher":"https:\/\/www.facebook.com\/vuepilot","article_modified_time":"2024-11-05T00:02:45+00:00","og_image":[{"width":1400,"height":400,"url":"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2024\/04\/cli-hero-3.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_site":"@vuepilot","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/","url":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/","name":"Using The VuePilot CLI &#8211; VuePilot","isPartOf":{"@id":"https:\/\/www.vuepilot.com\/support\/#website"},"datePublished":"2024-04-19T02:21:43+00:00","dateModified":"2024-11-05T00:02:45+00:00","description":"Programmatically control your office dashboard screens using the VuePilot command line interface. Show notifications and alerts in response to events","breadcrumb":{"@id":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vuepilot.com\/support\/article\/vuepilot-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vuepilot.com\/support\/"},{"@type":"ListItem","position":2,"name":"Using The VuePilot CLI"}]},{"@type":"WebSite","@id":"https:\/\/www.vuepilot.com\/support\/#website","url":"https:\/\/www.vuepilot.com\/support\/","name":"VuePilot","description":"Digital signage help and assistance","publisher":{"@id":"https:\/\/www.vuepilot.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vuepilot.com\/support\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vuepilot.com\/support\/#organization","name":"VuePilot","url":"https:\/\/www.vuepilot.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vuepilot.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2020\/06\/vuepilot-social-banner.jpg","contentUrl":"https:\/\/www.vuepilot.com\/wp-content\/uploads\/2020\/06\/vuepilot-social-banner.jpg","width":1200,"height":630,"caption":"VuePilot"},"image":{"@id":"https:\/\/www.vuepilot.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vuepilot","https:\/\/twitter.com\/vuepilot"]}]}},"_links":{"self":[{"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article\/2910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/comments?post=2910"}],"version-history":[{"count":8,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article\/2910\/revisions"}],"predecessor-version":[{"id":2925,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article\/2910\/revisions\/2925"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/media\/2923"}],"wp:attachment":[{"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/media?parent=2910"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article-category?post=2910"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/www.vuepilot.com\/support\/wp-json\/wp\/v2\/article-tag?post=2910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}