Getting started with LPM
Installation
Prerequisites
LPM is meant to be run in a Windows environment.
You will need to have Python and NPM installed locally for it to work properly. You can download installers for each of these by following the links below:
- Python: download from the Python Releases for Windows page.
- NPM: download with Node from the NodeJS downloads page.
Installer Download
LPM is packaged within an installer. The latest installer is available for download here. Once downloaded, run LPM-Setup.exe
and walk through the prompts to complete the installation.
Check the Installation
If the installation completed successfully, running lpm -v
from a command prompt will return the current version of LPM.
Basic Usage
LPM is a command line tool that should be invoked from the root folder of your project (i.e. for an Automation Studio project this is the folder that contains your project’s .apj file). After installation, LPM is added to the Path environment variable, and is accessible globally. Basic invocation works as follows:
lpm <command> [packages]
where <command>
is one of the available commands described below, and packages
is the name of the package you want to work with. Some commands accept an array of packages
separated by spaces, and will act on all of them at once.
Logging In
After installation, the first requirement is to log in to LPM. This is necessary in order to get access to the Loupe packages:
lpm login
The login
command is interactive, and prompts you to enter a token. This is a Github Personal Access Token. If you have a Github account with access to Loupe’s packages, you can generate your own token and enter it here. Otherwise, you can use the following default-user
token, which will give you read access to all of Loupe’s packages: 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
Once you log in to LPM on a workstation, your credentials are stored with your user. You can run LPM from any folder and it will remember the credentials you supplied.
Initializing your Folder
The next step is to create a new directory and initialize it for use with LPM:
mkdir test
cd test
lpm init
When prompted to set up an Automation Studio project, select Yes. This will automatically create a project in the current directory that will be ready to receive further packages.
Once the initialization is complete, LPM is ready to install packages into your project.
Install your First Package
Within the local directory that you just created, install the piperpkg
package:
lpm install piperpkg
This pulls in several Loupe libraries and a few Loupe tasks, and inserts them automatically into your Automation Studio project. You can quickly open up your project from the command line via:
lpm as
This opens up the correct version of Automation Studio, and you can see within your Logical View the new assets that were added in by LPM.
Check LPM Status
You can check both the login and initialization status of LPM at any time:
lpm status
This will indicate whether or not you’re logged in, what user is logged in, and the status of the current directory.