Hi Carlos,
We are working implementing the capability to run an LK script from the command line. Please see this GitHub.com Issue for more information:
github.com/NREL/SAM/issues/309
In the meantime, the only option for running an LK script outside of the SAM desktop application is to use SDKtool as described on the SAM SDK page of the SAM website:
sam.nrel.gov/sdk
Note that LK is slightly different in different contexts. For example in a script made to run in SAM, you use set() and get() to set and get values of variables. In LK for SDKtool, you use var(). The function reference in each environment lists the functions that work in that environment.
Best regards,
Paul.