License Key
The CLI generators and the firemap export command require a valid license key from a Pro or Team plan.
The SDK itself does not — decorators, validation and the typed model API run without any key. The check sits in front of the code-generation commands only, and it happens before your model files are loaded, so an invalid key fails immediately with a non-zero exit code instead of half-writing a rules file.
Getting Your Key
1. Sign up and subscribe to a Pro or Team plan
2. Go to Settings → API Keys
3. Click Generate License Key
4. Copy the key immediately — it's only shown once
That last point is not a UI quirk. Only a SHA-256 hash of the key is stored, along with the first twelve characters so the settings page has something to display; the full value exists only in the HTTP response that created it. If you lose it, the only recovery is to generate a new one. Keys belong to a team rather than an individual, there is exactly one active key per team, and only the team owner can create or revoke it.
Key Format
Keys follow the format fmk_{plan}_{32 hex chars} — e.g. fmk_pro_a1b2c3d4...
The plan segment is either pro or team, and the suffix is 16 bytes of cryptographic randomness rendered as hex. The recognisable fmk_ prefix exists so secret scanners can spot the key in a commit or a log line — treat it exactly like any other credential and keep it out of the repository.
Usage
There are three ways to provide your license key:
# Option 1: Environment variable
export FIREMAP_LICENSE_KEY="fmk_pro_..."
# Option 2: Config file (firemap.config.js)
export default {
licenseKey: "fmk_pro_...",
models: ["src/models/**/*.ts"],
};
# Option 3: .firemaprc (JSON)
{ "licenseKey": "fmk_pro_..." }The three are checked in a fixed order: a licenseKey in the resolved config file wins, then FIREMAP_LICENSE_KEY from the environment, then .firemaprc. That ordering catches people out on shared machines: a stale key committed to firemap.config.js silently overrides the environment variable you just exported. For CI, the environment variable is the right choice — put it in your provider's secret store and leave licenseKey out of the committed config entirely. Both .firemaprc and any config file carrying a key belong in .gitignore.
The key is cached locally for 24 hours at ~/.firemap/license-cache.json. You can regenerate your key anytime from Settings — the old key is immediately revoked.
The cache is what keeps generator runs fast and lets them work offline once a key has been verified, but it also means a revoked key can keep working locally until the cached entry expires. The cache is keyed on the key itself, so switching keys re-verifies rather than reusing the previous result. In an ephemeral CI container the cache never survives between runs, and every job verifies fresh.