Command Line Tools Server
The lic command line tool generates, signs, updates and verifies Babel licenses from a terminal, a script or a build, on Windows, Linux and macOS.
lic is the command line counterpart of license generation in Babel Desktop. It takes the assembly you are licensing, or an existing license file, and a set of switches that describe the license: who it is for, which product, when it expires, which features it unlocks, which restrictions apply, and which key signs it. The result is an XML license file or a string license such as a serial. The same tool generates key pairs, exports public keys, computes hardware keys, verifies signatures and updates licenses that already exist.
The tool is available in two forms, with identical options:
licin the Babel zip packages:lic.exeinbabel_net472_<version>.zipandlic.dll(run withdotnet lic.dll) inbabel_net80_<version>.zip,babel_net90_<version>.zipandbabel_net100_<version>.zip.Babel.Licensing.Tool, a .NET tool package that installs theliccommand on any operating system with the .NET SDK.
Both come with the Babel Licensing editions, Server and Data Center.
Quick Start
Generate a key pair once, keep the private key safe, and embed the public key in your application. The same PEM file signs every license you issue:
lic --keygen rsa --keysize 2048 --keyfile keys.pem
lic --publickey --keyfile keys.pemGenerate a signed license for an assembly. The licensee, product, dates, features, fields and restrictions are all switches; --sign signs the result with the key in --keyfile:
lic MyApp.dll --keyfile keys.pem --sign --licensee name="Contoso" --licensee email=info@contoso.com --product name="MyApp" --product version=2.1 --expiredate 365 --feature Pro=1 --field Seats=25 --trial days=30 --output MyApp.licenses --encoding utf-8Verify a license file against the public key, update a license in place, or emit a serial instead of an XML file:
lic MyApp.licenses --verify --keyfile keys.pem
lic MyApp.licenses --update --keyfile keys.pem --sign --field Seats=50
lic MyApp.dll --keyfile ecdsa.pem --sign --format serial --product name="MyApp" --expiredate 30 --output MyApp.serialA license is written unsigned unless --sign is on the command line, and an unsigned license fails validation in the application. Pass --sign whenever you pass --keyfile or --keyname, or use the MSBuild task property Sign.
What You Can Do
| Task | Switches |
|---|---|
| Create a key pair, export the public key | --keygen, --keysize, --publickey |
| Describe the license | --id, --type, --sites, --issuedate, --expiredate, --supportexpiredate, --licensee, --product, --component, --assembly |
| Unlock and carry data | --feature, --field |
| Restrict use | --trial, --hardware, --domain, --usage, --beta, --restriction |
| Sign, verify, update | --keyfile, --keyname, --keypwd, --sign, --verify, --update |
| Choose the output | --output, --format, --encoding, --xmldeclaration, --keyinfo, --logfile |
| Identify a machine | --hardwareid, --salt, --showhardwareinfo |
| Script and automate | --format json, --quiet, --strict-exit, --project, --makeproject |
Every switch is described in the Reference. For CI pipelines and AI agents, the AI-Friendly Mode turns the output into a versioned JSON stream with semantic exit codes, and lic --help --format json describes every option in machine-readable form.
Licensing the Tool
lic needs a Babel Licensing license of its own. It looks for babel.licenses in its installation folder, then in the path held by the BABEL_LICENSE_PATH environment variable; the --license switch overrides both with a file, a folder to search, or env:VARIABLE for a license key stored in an environment variable. lic --license with no argument prints the license in use. See Licensing the Tool for the dotnet tool setup.
In This Section
- Babel Licensing Tool — install
licas a global or local dotnet tool, license it, and run it on a build server. - Reference — every option, grouped as in
lic --help, with the key-value pairs each restriction accepts. - AI-Friendly Mode — the
lic.cli.v1output schema,--quiet,--strict-exitand the exit code table. - MSBuild Task — the
Lictask inBabel.Build, its properties, and the.lcprojproject file behind--projectand--makeproject.