SunLicenseSign in

Add licensing to your product with one prompt.

  1. Copy
  2. Paste
  3. Sell

Creates a free guest account · Terms · Privacy

Manage keys by asking.

Works with what you use.

Claude CodeClaude Code
CodexCodex
CursorCursor
AntigravityAntigravity
GitHub CopilotGitHub Copilot
WindsurfWindsurf
Gemini CLIGemini CLI
KiroKiro
JunieJetBrains Junie
Zed
ClineCline
Roo CodeRoo Code
TraeTrae
Kilo CodeKilo Code
opencodeopencode
AmpAmp
ReplitReplit
LovableLovable
Bolt
v0v0
JavaJava
JavaScript
TypeScript
Python
C# / .NET
PHP
Lua
Go
Rust
C++
Swift
Kotlin
Dart
Ruby
Minecraft plugins
FiveM resources
Discord bots
Desktop apps
Windows apps
macOS apps
Unity games & assets
Unreal plugins
Godot games
Minecraft mods
Garry's Mod addons
WordPress plugins
Blender add-ons
Tauri apps
CLIs & scripts
Linux tools
BuiltByBit
SpigotMC
Voxel Shop
Tebex
Gumroad
Lemon Squeezy
Payhip
Stripe
Ko-fi
itch.io
WooCommerce
Envato

Licensing, done in minutes.

See the prompt
Add SunLicense license checks to this project and prove they work. Do it all yourself: don't ask me anything. Where you must choose, pick a sensible default and list it at the end.

SunLicense checks license keys for software people sell. Docs for AI agents: https://docs.sunlicense.com/llms.txt

Rules:
- Never put a full license key or API key in source code, logs, commits or your messages. They live in the gitignored .env file that step 2 writes. In messages show keys masked (first 4 characters).
- Use the project's own shell. Windows: use PowerShell. If your sandbox blocks network access, ask for it once.
- Each step says what success looks like. If a step fails, read the error, fix the cause and retry; after two failed tries use the next option.
- Don't commit or push. Apart from the SunLicense CLI, install nothing outside the project: no system packages, language toolchains or package managers. If the SDK needs a package manager that isn't there, use the HTTP request from step 2 instead.

1. Get the SunLicense CLI. Use the first option that works; success: `sunlicense --version` prints a version.
   a. Already installed: `sunlicense --version`.
   b. macOS, Linux, WSL, Git Bash: `curl -fsSL https://sunlicense.com/install.sh | sh`
      Windows PowerShell: `irm https://sunlicense.com/install.ps1 | iex` (cmd: `powershell -c "irm https://sunlicense.com/install.ps1 | iex"`)
      If `sunlicense` isn't found afterwards, call it by the full path the installer printed.
   c. Node.js is installed: write `npx -y @sunlicense/cli@latest` wherever a step says `sunlicense`.
   d. Nothing can be installed or run: follow https://docs.sunlicense.com/guide/agent-setup.md instead of the CLI (the same steps as plain HTTPS calls), then continue at step 3.

2. In the project's root folder run `sunlicense init --json`.
   Success: JSON with "ok": true. It found or created a free account (a guest account when none is signed in), a product, an API key and one test license, and wrote SUNLICENSE_API_KEY and SUNLICENSE_LICENSE_KEY to the gitignored file in "envFile". Keep this JSON: the next steps use it.
   If "ok" is false with error.code "guest_limit" or "guest_unavailable": stop and tell me to sign up at https://app.sunlicense.com/signup and run `sunlicense login`, then paste this prompt again.
   If "ok" is false with error.code "plan_limit": my plan has no room for another product. Stop and pass on error.message (it names my products and the upgrade); don't pick a product for me.

3. Add the license check to the app, as "integration" in the JSON says:
   - "kind" "sdk": install the official SDK (integration.sdk.install) and adapt integration.sdk.code. "kind" "http", or an SDK that can't be installed or has no code to adapt: send the request in integration.http with the language's usual HTTP client.
   - Base URL: account.server. API key: the SUNLICENSE_API_KEY environment variable, loaded the way the project loads its settings.
   - License key: the customer's own, from the app's settings (config file, environment variable or a first-run prompt, whatever fits the app). During development it falls back to SUNLICENSE_LICENSE_KEY.
   - Check once at start-up. Rejected: show the reason and stop the paid features. SunLicense unreachable (network error or HTTP 5xx): keep working (fail open).
   - Follow integration.rules. Keep the change small and in the project's style. Success: the project builds.

4. Prove it with the test license. Run the app, or a short script or test that calls your check. License changes reach license checks within seconds: on an unexpected answer (such as NOT_FOUND right after step 2), retry every 5 seconds for up to 30 seconds before you change code.
   a. It reports the license as valid. `sunlicense validate --release` also prints VALID (--release keeps the CLI from using one of the test license's 2 machines).
   b. `sunlicense licenses suspend [email protected] --yes`, then run your check again. Success: rejected with SUSPENDED.
   c. `sunlicense licenses reinstate [email protected]`, then your check reports valid again.
   If a check gives the wrong answer, fix the code and repeat 4. Delete scripts you only made for this step; keep real tests.

5. Run `sunlicense mcp install` so I can manage licenses by asking you. Success: it names the file it wrote. If it prints a snippet instead, add it to your editor's MCP settings if you can, or put it in your last message. Web apps without a shell use the remote server https://api.sunlicense.com/mcp.

6. End with a short message to me (at most 20 lines):
   - What you changed (files) and the defaults you picked.
   - How to run the app with a license: where the customer's key goes.
   - How to issue, suspend and reinstate licenses: `sunlicense licenses issue`, `sunlicense licenses suspend <key>`, `sunlicense licenses reinstate <key>`, by asking you (MCP), or in the dashboard (`sunlicense open`).
   - "Run `sunlicense guide` for a short interactive tour on your test license."
   - If account.guest is true: "This is a guest account. It's deleted 30 days after it was last used: run `sunlicense claim` to keep it. Already have a SunLicense account? Run `sunlicense login`: everything moves into it, keys unchanged."
   - Pass on any "warnings" from step 2.
   - Set up over HTTP without the CLI (step 1d)? Then give the claim link (claimUrl) instead of `sunlicense claim`, the dashboard (it opens once the account is claimed) instead of the CLI commands, and the guest token once, to keep in a password manager.

prompt.txt · No shell? HTTP recipe