Views:

The Luminesce CLI runs queries either:

  • At the command line or from files, in which case results can be returned in CSV, Excel or SQLite formats.
  • Using interactive mode, in which case results can be printed.

See all tools and interfaces to Luminesce.

Installing the CLI

  1. Make sure your computer has .NET 6 installed.
  2. As a LUSID user with the lusid-administrator role, navigate to https://<your-domain>.lusid.com/honeycomb/swagger/index.html, where <your-domain> is the root of your LUSID domain, for example acmecorp. If you do not have the lusid-adminstrator role, see the appendix.
  3. Use Swagger's Try it out button for the DownloadBinary API to request the CommandLineTool binary:
  4. Click the Download file link in the response to download the binary to your browser's download location: 
  5. Navigate to the download location and run the following install command (omitting the .nupkg file extension):
    C:\Users\JohnDoe\Download> dotnet tool install Finbourne.Luminesce.Cli -g --add-source "."
    • Windows: %USERPROFILE%\.dotnet\tools\.store\
    • Linux/MacOS: $HOME/.dotnet/tools/.store/
  6. Run the following command to start the service (omitting the .exe extension on Linux or MacOS):
    C:\Users\JohnDoe\.dotnet\tools> luminesce-cli.exe --quiet --authClientDomain=<your-domain> --certificateFallback=DownloadMayMint
    ...where <your-domain> is the root of your LUSID domain, for example --authClientDomain=acmecorp. Note the DownloadMayMint option mints a new certificate if you do not have one already; more information on managing certificates is coming soon.
     

    Note: For information on all the command line options, run the command luminesce-cli.exe --help.

The CLI starts in interactive mode, so you can write a query like this and press CTRL-ENTER to run it:

To uninstall the package, perhaps in order to upgrade to a newer version, run the command dotnet tool uninstall Finbourne.Luminesce.Cli -g.
 

Appendix A: Allowing non-administrative users to downloading binaries

Once a license is granted, users with the lusid-administrator role have permission to download the CommandLineTool binary out-of-the-box.

To enable less privileged users to download, create a feature policy consisting of the following JSON, assign it to a role, and the role to their LUSID user:

{
    "description": "User can download CLI binary",
    "applications": [
        "Honeycomb"
    ],
    "grant": "Allow",
    "selectors": [
        {
            "idSelectorDefinition": {
                "identifier": {
                    "code": "CommandLineTool",
                    "scope": "Honeycomb"
                },
                "actions": [
                    {
                        "scope": "Honeycomb",
                        "activity": "DownloadBinary",
                        "entity": "Feature"
                    }
                ],
                "name": "Command line tool binary",
                "description": "User can download CLI binary"
            }
        }
    ],
    "when": {
        "activate": "2023-01-01T00:00:00.0000000+00:00",
        "deactivate": "9999-12-31T23:59:59.9999999+00:00"
    }
}