Skip to content

Adding licensebox to your app

Pick the client for your language, check access before the work you want to protect, and keep the rules themselves in licensebox.

Choose your SDK

Building with an assistant? Each client has a focused integration prompt with its public guide and runtime requirements.

What you need before you start

Open the admin console

Product ID

The identifier for the application you are licensing.

Public keys

Trusted verification keys and their key IDs. Private signing keys stay out of your app.

Module names

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.

SDK catalog

Search your language or explore a runtime family. Select a client for requirements, source installation and a copyable integration prompt.

Linux validation is client-specificPreview and pending work stay labeled
40 language and runtime entries

Go

Application languages
Linux validated

Go 1.27.1+; standard-library client. The separate administration CLI also lives here.

Guide ↗︎

Python

Application languages
Linux validated

Python 3.10+ and cryptography.

Guide ↗︎

JavaScript

Application languages
Linux validated

Node.js 22+. JavaScript API with TypeScript declarations.

Guide ↗︎

TypeScript

Application languages
Linux validated

Node.js 22+. JavaScript API with TypeScript declarations.

Guide ↗︎

Dart

Application languages
Linux validated

Dart 3.3+, ffi, and the native C core. Native VM/AOT; no browser runtime.

Guide ↗︎

Ruby

Application languages
Linux validated

Ruby 3.1+, Fiddle, and the native C core.

Guide ↗︎

PHP

Application languages
Linux validated

PHP 8.2+, ext-ffi with ffi.enable=true, JSON, and the native C core.

Guide ↗︎

C

Native & systems
Linux validated

C11, CMake 3.20+, OpenSSL 3, libcurl 7.85+, pkg-config and json-c.

Guide ↗︎

C++

Native & systems
Linux validated

C++17 and CMake. Builds on the public C client.

Guide ↗︎

Rust

Native & systems
Linux validated

Rust 1.74+, serde_json, and the native C core.

Guide ↗︎

Zig

Native & systems
Linux validated

Zig 0.14.1 and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.

Guide ↗︎

Nim

Native & systems
Linux validated

Nim 1.6.14+, ARC memory management, threads, and the native C core.

Guide ↗︎

D

Native & systems
Linux validated

LDC 1.36+ / D 2.106+, DUB, and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.

Guide ↗︎

Pascal

Native & systems
Linux validated

Free Pascal 3.2.2 with FCL, and the native C core.

Guide ↗︎

Swift

Native & systems
Linux validated

Swift 5.9+, Foundation, and the native C core. Linux profile validated. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.

Guide ↗︎

Objective-C

Native & systems
Linux validated

Clang, GNUstep/Foundation, and the native C core. The Linux SDK uses manual reference counting.

Guide ↗︎

Java

JVM & .NET
Linux validated

Java 11+, JNA and Gson. Uses the Java SDK and native C core.

Guide ↗︎

Kotlin

JVM & .NET
Linux validated

Kotlin on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.

Guide ↗︎

Scala

JVM & .NET
Linux validated

Scala on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.

Guide ↗︎

Clojure

JVM & .NET
Linux validated

Clojure on the JVM, Java 11+, JNA and Gson. Uses the Java SDK and native C core.

Guide ↗︎

C#

JVM & .NET
Linux validated

.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.

Guide ↗︎

F#

JVM & .NET
Linux validated

.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.

Guide ↗︎

Visual Basic .NET

JVM & .NET
Linux validated

.NET 10 and the native C core. C#, F# and VB.NET share the managed assembly.

Guide ↗︎

Julia

Scientific & numerical
Linux validated

Julia 1.12+, JSON3, and the native C core.

Guide ↗︎

Fortran

Scientific & numerical
Linux validated

gfortran 13+, CMake 3.20+, and the native C core.

Guide ↗︎

R

Scientific & numerical
Linux validated

R 4.3+, jsonlite, native development headers, and the C core.

Guide ↗︎

GNU Octave

Scientific & numerical
Linux validated

GNU Octave 8.4+, development headers, and the native C core.

Guide ↗︎

MATLAB

Scientific & numerical
Linux validated

A licensed MATLAB runtime, MEX-compatible C compiler, and the native C core.

Guide ↗︎

Wolfram Language

Scientific & numerical
Source preview

A licensed Wolfram runtime with J/Link, Java 17+, JNA, Gson, and the native C core.

Guide ↗︎

Haskell

Functional & BEAM
Linux validated

GHC 9.4+, Cabal, aeson 2+, and the native C core. Set LICENSEBOX_LIB_DIR and LICENSEBOX_INCLUDE_DIR for your C core installation.

Guide ↗︎

OCaml

Functional & BEAM
Linux validated

OCaml 4.14+, ocamlfind, Yojson, and the native C core.

Guide ↗︎

Elixir

Functional & BEAM
Linux validated

Erlang/OTP 25+, Jiffy, a C compiler, and the C core. Elixir additionally needs Elixir 1.14+.

Guide ↗︎

Erlang

Functional & BEAM
Linux validated

Erlang/OTP 25+, Jiffy, a C compiler, and the C core. Elixir additionally needs Elixir 1.14+.

Guide ↗︎

Lua

Scripting & legacy
Linux validated

LuaJIT FFI, LuaRocks configured for Lua 5.1 with development headers, lua-cjson, and the native C core. Standard PUC Lua is unsupported.

Guide ↗︎

Perl

Scripting & legacy
Linux validated

Perl 5.20+, a C compiler for the XS extension, and the C core.

Guide ↗︎

Tcl

Scripting & legacy
Linux validated

Tcl 8.6, Tcllib JSON, development headers, and the native C core.

Guide ↗︎

PowerShell

Scripting & legacy
Linux validated

PowerShell 7.4+ on Linux and the native C core. Imports an actual P/Invoke module.

Guide ↗︎

COBOL

Scripting & legacy
Linux validated

GnuCOBOL 3.1.2+, a C compiler, and the native C core. Set LICENSEBOX_LIB_DIR to the installed C core library directory before building.

Guide ↗︎

Shell / application CLI

CLI & WebAssembly
Linux validated

Linux, a POSIX shell, CMake, C compiler, json-c, and the native C core.

Guide ↗︎

WebAssembly / WASI

CLI & WebAssembly
Linux validated

Wasmtime and the pinned Python host SDK on Linux. A trusted native host owns licensing.

Guide ↗︎

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.

Jump to a guide section

One check before protected work.

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.

  1. Configure once. Keep a client per process and provide your app version. Follow the chosen SDK's native dependency and storage instructions.
  2. Present sign-in. Show the device verification link and user code in your UI, or use the SDK's default instructions. Keep private credentials out of logs.
  3. Authorize the feature. Use the client's require/module-check operation. A local status display or usage record does not authorize work.
  4. Handle failure and cleanup. Surface the stable error code, stop protected work when refused, and close clients deterministically where required.

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.

A small Go example.

For another language, choose its client above. This example uses the Go SDK's public API:

go get licensebox.dev/client@v0.7.0
import (
    "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.

Sign in once. Renew when needed.

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.

When the network is unavailable

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.

Optional checks during long-running work.

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.

Shared rules for machines and locations.

Machine seats

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.

Location rules

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.

Modules, trials and individual access.

A module is a feature name your app checks, such as core, export or batch. A lease names the modules the user may run:

  • Free modules are available to everyone who signs in.
  • Trial modules are available for a configured period after first sign-in.
  • Individual grants can be permanent or expire on a date.

Let users request more access

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.

Optional command usage

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.

Make refusals understandable.

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.

DecisionWhat the app should do
module_deniedExplain which module is missing and offer an access request.
offlineAsk for a connection so the lease can renew. Expiry is not automatically a new sign-in.
seat_transferredExplain that the seat moved. Let the user explicitly sign in to transfer it back.
machine_changedRequire explicit activation on the current machine.
location_denied
location_unknown
Explain the product restriction. Keep cached offline access blocked.
revokedStop; the SDK discards local authorization. Direct the user to the product's contact.
Sign-in refused or expiredLet the user decide whether to try again. Respect cancellation.
callback_errorFix the application integration; do not suppress the access failure.

The shared HTTP protocol.

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.

Protocol specification
Wire format, exact signed bytes, identity and offline rules
Shared contract & conformance suite
Compatibility pins, fixtures and maintenance process

A signed lease, kept locally.

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.

Two command-line tools. Different jobs.

Application licensing CLI

For shell scripts and native application launchers. Authorize a module with require and check its exit status before protected work.

Application CLI guide ↗︎

Go administration CLI

For product administrators. Create products, manage policy, grant access and revoke users or machines. Keep admin credentials outside apps.

Admin CLI guide

Licensebox manages access. It does not collect payments or handle billing; commercial arrangements stay with the product's team.

Build with your coding agent

A useful starting prompt.

For Codex, Claude Code, Cursor, or another assistant working in your project. The SDK catalog can tailor this to your language.

Open llms.txt

If your assistant cannot open links, paste the full guide alongside the prompt. It contains public documentation, not account data.