Skip to Content
New release 12 available 🎉
LicensingCommand Line

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:

  • lic in the Babel zip packages: lic.exe in babel_net472_<version>.zip and lic.dll (run with dotnet lic.dll) in babel_net80_<version>.zip, babel_net90_<version>.zip and babel_net100_<version>.zip.
  • Babel.Licensing.Tool, a .NET tool package that installs the lic command 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.pem

Generate 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-8

Verify 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.serial

A 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

TaskSwitches
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 lic as 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.v1 output schema, --quiet, --strict-exit and the exit code table.
  • MSBuild Task — the Lic task in Babel.Build, its properties, and the .lcproj project file behind --project and --makeproject.
Last updated on