Go
Go 1.27.1+; standard-library client. The separate administration CLI also lives here.
go get licensebox.dev/client@v0.7.0Pick the client for your language, check access before the work you want to protect, and keep the rules themselves in licensebox.
Building with an assistant? Each client has a focused integration prompt with its public guide and runtime requirements.
The identifier for the application you are licensing.
Trusted verification keys and their key IDs. Private signing keys stay out of your app.
Names for the features you protect, such as core or export.
Create a product in the console or with the separate Go admin CLI. Early-access product creation is limited to allowed addresses. Follow the admin guide.
Search your language or explore a runtime family. Select a client for requirements, source installation and a copyable integration prompt.
Go 1.27.1+; standard-library client. The separate administration CLI also lives here.
go get licensebox.dev/client@v0.7.0Python 3.10+ and cryptography.
python3 -m pip install "git+https://github.com/licensebox/python.git@v0.2.0"Node.js 22+. JavaScript API with TypeScript declarations.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/javascript.git
cd javascript
npm ci
npm pack
# Install the generated .tgz in your application.Node.js 22+. JavaScript API with TypeScript declarations.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/javascript.git
cd javascript
npm ci
npm pack
# Install the generated .tgz in your application.Dart 3.3+, ffi, and the native C core. Native VM/AOT; no browser runtime.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/dart.git
cd dart
dart pub getRuby 3.1+, Fiddle, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/ruby.git
cd ruby
gem build licensebox.gemspecPHP 8.2+, ext-ffi with ffi.enable=true, JSON, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/php.git
cd php
composer installC11, CMake 3.20+, OpenSSL 3, libcurl 7.85+, pkg-config and json-c.
git clone --branch v0.4.0 --depth 1 https://github.com/licensebox/c.git
cd c
cmake -S . -B build -DBUILD_SHARED_LIBS=ON
cmake --build build
cmake --install build --prefix "$PWD/install"C++17 and CMake. Builds on the public C client.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/cpp.git
cd cpp
cmake -S . -B build
cmake --build buildRust 1.74+, serde_json, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/rust.git
cd rust
cargo build --releaseZig 0.14.1 and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/zig.git
cd zig
zig build -Dnative-lib-dir="$LICENSEBOX_LIB_DIR"Nim 1.6.14+, ARC memory management, threads, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/nim.git
cd nim
nimble install -yLDC 1.36+ / D 2.106+, DUB, and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/d.git
cd d
LIBRARY_PATH="$LICENSEBOX_LIB_DIR:${LIBRARY_PATH:-}" dub build --compiler=ldc2 --build=releaseFree Pascal 3.2.2 with FCL, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/pascal.git
cd pascal
makeSwift 5.9+, Foundation, and the native C core. Linux profile validated. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/swift.git
cd swift
swift build -Xcc -I"$LICENSEBOX_INCLUDE_DIR" -Xlinker -L"$LICENSEBOX_LIB_DIR"Clang, GNUstep/Foundation, and the native C core. The Linux SDK uses manual reference counting.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/objc.git
cd objc
# Follow the GNUstep build instructions in the README.Java 11+, JNA and Gson. Uses the Java SDK and native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/java.git
cd java
mvn installKotlin on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/java.git
cd java
mvn installScala on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/java.git
cd java
mvn installClojure on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/java.git
cd java
mvn install.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/dotnet.git
cd dotnet
dotnet pack src/Licensebox/Licensebox.csproj -c Release -o packages.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/dotnet.git
cd dotnet
dotnet pack src/Licensebox/Licensebox.csproj -c Release -o packages.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/dotnet.git
cd dotnet
dotnet pack src/Licensebox/Licensebox.csproj -c Release -o packagesJulia 1.12+, JSON3, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/julia.git
cd julia
julia --project=. -e 'using Pkg; Pkg.instantiate()'gfortran 13+, CMake 3.20+, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/fortran.git
cd fortran
cmake -S . -B build
cmake --build buildR 4.3+, jsonlite, native development headers, and the C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/r.git
cd r
mkdir -p build/R-library
R CMD INSTALL --library="$PWD/build/R-library" .
# Add build/R-library to R_LIBS when running your app.GNU Octave 8.4+, development headers, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/octave.git
cd octave
mkdir -p build
mkoctfile --mex -I"$LICENSEBOX_INCLUDE_DIR" src/licensebox_mex.c \
-L"$LICENSEBOX_LIB_DIR" -llicensebox -o build/licensebox_mex
# Add src/ and build/ to the Octave path.A licensed MATLAB runtime, MEX-compatible C compiler, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/matlab.git
cd matlab
# Follow the MATLAB-specific MEX instructions in the README.A licensed Wolfram runtime with J/Link, Java 17+, JNA, Gson, and the native C core.
git clone https://github.com/licensebox/wolfram.git
cd wolfram
# Read the runtime and J/Link setup instructions before building.GHC 9.4+, Cabal, aeson 2+, and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/haskell.git
cd haskell
cabal build --extra-lib-dirs="$LICENSEBOX_LIB_DIR"OCaml 4.14+, ocamlfind, Yojson, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/ocaml.git
cd ocaml
bash ci/build.sh
# Install the resulting library with ocamlfind as shown in the guide.Erlang/OTP 25+, Jiffy, a C compiler, and the C core. Elixir additionally needs Elixir 1.14+.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/beam.git
cd beam
mix compileErlang/OTP 25+, Jiffy, a C compiler, and the C core. Elixir additionally needs Elixir 1.14+.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/beam.git
cd beam
makeLuaJIT FFI, LuaRocks configured for Lua 5.1 with development headers, lua-cjson, and the native C core. Standard PUC Lua is unsupported.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/lua.git
cd lua
luarocks --lua-version=5.1 make --deps-mode=none licensebox-0.1.0-1.rockspecPerl 5.20+, a C compiler for the XS extension, and the C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/perl.git
cd perl
perl Makefile.PL INSTALL_BASE="$PWD/build/perl"
make
make install
# Add build/perl/lib/perl5 to PERL5LIB when running your app.Tcl 8.6, Tcllib JSON, development headers, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/tcl.git
cd tcl
make
# Add this directory to Tcl auto_path or TCLLIBPATH.PowerShell 7.4+ on Linux and the native C core. Imports an actual P/Invoke module.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/powershell.git
cd powershell
Import-Module ./Licensebox.psd1GnuCOBOL 3.1.2+, a C compiler, and the native C core. Set LICENSEBOX_LIB_DIR to the installed C core library directory before building.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/cobol.git
cd cobol
bash ci/test.sh
# Builds the binding and verifies the installed consumer.Linux, a POSIX shell, CMake, C compiler, json-c, and the native C core.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/cli.git
cd cli
cmake -S . -B build
cmake --build build
# Check require MODULE exit status before protected shell work.Wasmtime and the pinned Python host SDK on Linux. A trusted native host owns licensing.
git clone --branch v0.2.0 --depth 1 https://github.com/licensebox/wasm.git
cd wasm
python3 -m pip install .No matching clients. Try a language name, a runtime family, or clear the filters.
Native bindings share the public C core; each repository states its exact dependencies. JVM and .NET languages share their runtime's client. SDK source releases on GitHub and package-registry publication are separate. Validation of a Linux runtime does not establish support for Windows, macOS or another host. The application CLI and Go administration CLI have different jobs. See the distinction.
Create a client for your product and trusted public keys. Before loading user files or running a protected operation, require the module that operation needs. Continue only after the check succeeds.
Keep access policy on the server. Do not reproduce grants, trials, seat allocation or location rules in your app. The SDK checks the server's signed decision.
All clients expose the same capabilities: lease checks, module authorization, local status, explicit sign-in, logout, module discovery, requests, private access links and opt-in usage counts. Exact method names and ownership rules are in each SDK's guide.
For another language, choose its client above. This example uses the Go SDK's public API:
go get licensebox.dev/client@v0.7.0import (
"licensebox.dev/client"
"licensebox.dev/lease"
)
lic, err := client.New(client.Config{
Product: "YOUR_PRODUCT_ID",
Keys: lease.Keys{
"YOUR_KEY_ID": lease.MustKey("YOUR_PUBLIC_KEY"),
},
Version: version,
})
if err != nil { return err }
if _, err := lic.Require(ctx, "export"); err != nil {
return err
}
// Protected work starts here.Replace the placeholders with administrator-provided IDs and public verification keys. Use the Go integration guide for context, imports and full error handling.
On first protected use, the application presents a short code and verification link. The user opens that link on any device, confirms their email, supplies the requested purpose and accepts the product's terms. The licensed installation is the app requesting access.
In each new process, the first protected call silently attempts renewal with a three-second bound. A fresh lease can be reused within that process until expiry. SDKs do not start a background heartbeat automatically.
Eligible transport failures and server outages can use a verified, unexpired cached lease. The product controls the offline allowance; the default is 24 hours, potentially shortened by a grant's expiry. Once it expires, the app needs a connection. Expiry alone does not require another email sign-in.
Explicit server refusals are access decisions. An app must not reinterpret them as an outage or fall back to an old lease. Long-running operations can explicitly use heartbeat checks at application checkpoints.
Call your SDK's heartbeat operation with the protected module to force a fresh online check. It never opens sign-in or creates a new machine identity. The result includes the verified lease and whether contact succeeded. Eligible outages preserve access only until the last signed expiry; an explicit refusal stops authorization.
Go, Python and Node also offer an explicitly started monitor. Its expiry watchdog works independently of a stalled request or observer callback. Other clients expose the primitive for your application's own timer or event loop. Follow the selected client's guide for method names and cleanup.
Your application owns safe checkpoints and shutdown. Respond to cancellation or failure by pausing or stopping protected work safely; the SDK does not kill the process.
In product settings, admins can enable a check interval and maximum time without contact. The policy is off by default. It caps signed lease expiry and supplies monitor timing; your application still chooses to start periodic checks. Existing offline and grant limits can shorten the deadline further.
Set a seat limit per user and product; zero means unrestricted. At capacity, a completed sign-in transfers the oldest seat. Ordinary renewal never takes a transferred seat back. A displaced installation must explicitly sign in if the user chooses to move it again.
Leases are tied to the installation key and native machine binding. Copying credentials to another ordinary machine is refused. Raw native IDs remain local; cloned or spoofed system identities are a limitation, so this is not hardware attestation.
Allow or block countries, cities, or radius areas from the admin console. These use the app connection's approximate IP location. Blocks take precedence; required location data that cannot be established refuses access. VPNs and proxies affect the apparent location.
A client offline cannot discover a new policy decision until contact or lease expiry. Seat and location refusals are retained locally until successful renewal or explicit sign-in. Configure the product policy.
A module is a feature name your app checks, such as core, export or batch. A lease names the modules the user may run:
Module discovery shows available features, descriptions and existing requests. Your app can submit a request and list the user's answers, or open a short-lived private access link. Administrators approve all or some modules, optionally until a date, or decline with a note. Approved access reaches the app at its next check.
Access links are credentials. Do not place them in analytics, logs, shared prompts or public pages.
If the product enables collection, record fixed command names, outcomes and durations. Counts queue locally and are sent with renewal, with retry-safe cumulative IDs. Do not record filenames, arguments, user files, geometry or application data. Usage reporting never authorizes a feature and does not create a background process.
Use the selected SDK's stable error code and stop protected work. The table describes shared behavior; language-specific exception names live in each README.
| Decision | What the app should do |
|---|---|
module_denied | Explain which module is missing and offer an access request. |
offline | Ask for a connection so the lease can renew. Expiry is not automatically a new sign-in. |
seat_transferred | Explain that the seat moved. Let the user explicitly sign in to transfer it back. |
machine_changed | Require explicit activation on the current machine. |
location_deniedlocation_unknown | Explain the product restriction. Keep cached offline access blocked. |
revoked | Stop; the SDK discards local authorization. Direct the user to the product's contact. |
| Sign-in refused or expired | Let the user decide whether to try again. Respect cancellation. |
callback_error | Fix the application integration; do not suppress the access failure. |
Official clients handle signed HTTPS requests, native identity, verification and persistence. If you maintain a client, work from the exact shared specification and run its complete conformance suite. API paths retain /v1; signed proofs and leases use format v2.
The SDK verifies the lease's signature, trusted key, product, installation, native machine binding, modules and expiry. Parsing JSON does not authorize an operation. The client also retains the latest observed time so a clock rollback cannot revive an expired lease.
Keep the installation key private and allow the SDK to manage its storage. Logout removes licensing state and queued usage while preserving the installation identity and saved clock. Follow the selected client's storage and cleanup requirements.
For shell scripts and native application launchers. Authorize a module with require and check its exit status before protected work.
For product administrators. Create products, manage policy, grant access and revoke users or machines. Keep admin credentials outside apps.
Admin CLI guideLicensebox manages access. It does not collect payments or handle billing; commercial arrangements stay with the product's team.