Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
17 - Castor
17 - Castor

Whether you are sharing Macros or Tools with your friends and colleagues or building tool kits for the Community Gallery, the Alteryx Tool Installer file is the perfect way to package them.


YXI Gif.gif

Source: GIPHY


Topics Covered

  • What are yxi files
  • Creating a yxi file from a macro/macros
  • Creating a yxi automatically using the SKD CLI



Understanding how to first create a Tool is useful before learning how to create a Tool Installer. Check out the Alteryx Communities interactive videos for a quick and straightforward guide on how to build Macros: Alteryx Macros. Likewise, if you want to code, check out Alteryx SDK QuickStart Guide for an introductory course on the Alteryx SDK.


What are .yxi files?


Opening YXI.gif


Alteryx Tool Installer files come with the .yxi file extension. It allows for the simple installation of one or many macros and/or SDK-based tools (and dependencies) in one file. The .yxi file type, developed by Alteryx, when opened in Designer, prompts the user with an installer pop-up containing both the tool’s metadata, including name, category, version, author, picture, etc., as well as the option to install either locally or to all users on a machine.


For local user installs, the tool will be added to the \Users\USERNAME\AppData\Roaming\Alteryx\Tools\ directory.  


For all user installs, the tool will be added to the \ProgramData\Alteryx\Tools directory. 


Creating a yxi file from a macro/macros


It is very straightforward to create a yxi file for a macro. The first step is to create a config file that contains all the metadata about your tool installer file.


The config file is structured in an XML format; an example structure is shown below:


<?xml version=”1.0” encoding=”UTF-8”?>




      <Name>Example Tool</Name>

      <Description>Example Description</Description>



      <Author>Ira Watt</Author>






The metadata information is contained within each tag. For example, to change the tool installer’s name, simply change the text contained between the <Name> and </Name> tags.


The simplest way to create your Config.xml file is to copy the above example into notepad (any text editor should do), change the details as appropriate, and save it as Config.xml. It is very important to save the file exactly as Config.xml, as that is what Alteryx will look for when opening the yxi file.


The final step is to package the Macro(s) up. To do this, put your macros into folders in the same directory as your Config.xml file. After that, highlight them all and zip them up. With the new zip file, change the extension to yxi, and you are done!

Full Gif walkthrough:


Zipping YXI.gif

In the gif above, we have two Macros, which are then put into separate folders, zipped together with the config file, and zipped into a yxi. This is the same process for 1 to 100+ Macros. This process also works if we put all the macros in one folder and is entirely down to preference.


If you are on Windows and have any troubles changing the file extension, go to view in File Explorer and make sure this box is ticked:




One last thing to note about macros is the meta info within the macros which defines its tool information. To define information such as which Tool Category the macro will appear in, go to the workflow configuration -> Meta Info and change the category:




And voila:




Source: GIPHY


Creating a yxi from the SKD CLI


Unlike Macros, the SDK automates the whole process of packaging tools through a CLI (Command Line Interface). The two requirements to set this up are a Python environment with the SDKEnv setup and a Node and NPM version compatible with the SDKEnv. Full details on the environment requirements and setup can be found here: Platform SDK Quickstart Guide | Alteryx Help.


Once you have the CLI installed, you can run these three commands to create your Tool Installer.


To create your workspace:


ayx_plugin_cli sdk-workspace-init


To create your Tool:


ayx_plugin_cli create-ayx-plugin


Finally, to create your tool installer in the build/yxi/ directory:


ayx_plugin_cli create-yxi


Full details on the parameters for each of these commands can be found here: AYX Plugin CLI Commands | Alteryx Help

Gif walkthrough:





Alteryx Installer files are a great and practical way to share tools. Once you have gotten the hang of it, the process is very easy to set up.


Please comment below if you have any questions!