LightMesh CLI Tips

Start a trial today.

LightMesh CLI Documentation

How to get API Token from lightmesh.com

  • Register and login at next.lightmesh.com
  • Go to Admin on the top right corner
  • Click on API Keys
  • Create API Key

To use the LightMesh CLI, export the created token. Example: export LIGHTMESH_API_TOKEN=<token>

Version Downloads/week

Usage

Note: For native installation packages, please see Installation Guide

$ npm install -g lightmesh
$ lightmesh COMMAND
running command...
$ lightmesh (--version)
lightmesh/1.0.0 darwin-arm64 node-v16.13.0
$ lightmesh --help [COMMAND]
USAGE
  $ lightmesh COMMAND

Tip #1 - Generate a CSV file with your search results

To generate a CSV file with your subnet search results, follow these steps:

  1. Run the following command to search for subnets tied to the “DCN” zone and export the results to a CSV file:

    $ lightmesh subnet search --zoneName="DCN" --output=DNC_Zone_Subnets.csv
    

    This command will retrieve all the subnets associated with the “DCN” zone and create a CSV file named “DNC_Zone_Subnets.csv” with the search results.

  2. Run the following command to search for subnets tied to the “DCN” zone and export the results to a CSV file:

    $ lightmesh subnet search --zoneName="DCN" --output=DNC_Zone_Subnets.csv
    

    This command will retrieve all the subnets associated with the “DCN” zone and create a CSV file named “DNC_Zone_Subnets.csv” with the search results.

  3. Run the following command to search for IP Addresses that are in use (IP Assignments and Reservations) by “SGDC WAN” subnet and export the results to a CSV file:

    $ lightmesh ip-address search --subnetName="SGDC WAN" --output=SGDC_WAN_IP_Addresses.csv
    

    This command will retrieve all the IP Addresses in use associated with the “SGDC WAN” subnet and create a CSV file named “SGDC_WAN_IP_Addresses.csv” with the search results.

  4. Run the following command to search for IP Assignment tied to the “10.0.0.0/16” subnet and export the results to a CSV file:

    $ lightmesh ip-assignment search --subnet="10.0.0.0/16" --output=Subnet_1_IPAssignments.csv
    

    This command will retrieve all the IP Assignments associated with the “10.0.0.0/16” subnet and create a CSV file named “Subnet_1_IPAssignments.csv” with the search results.

  5. After running the command, you can find the generated CSV file in the current working directory. You can now use this file for further analysis or documentation.

Feel free to customize the command parameters or output file name based on your specific requirements.