# MasterPack — developer platform > MasterPack is a one-subscription app marketplace. Subscribers pay once; > their fee is split among the apps they actually use. Apps integrate > MasterPack as their ONLY authentication ("Sign in with MasterPack") and > run the usage SDK; makers get paid monthly by usage share (70% of > subscriber revenue goes to makers). ## Onboard an app (agents) Setup runs through the official CLI — it registers the app, waits for the human to claim it in a browser, and writes credentials to .env.local (never printing the API key): npx -y @masterpack/cli init --name "..." --url "https://..." --tagline "..." --description "... (40+ chars)" --category "..." # human claims it; then: npx -y @masterpack/cli config --redirect-uri "https://your.app/callback" npx -y @masterpack/cli submit Categories: Productivity, Games, Music, Food, Finance, Learning, Outdoors, Social, Other. Flags: --print (show credentials instead of writing files), --env-file, --base, --yes. Then integrate the SDK: npm install @masterpack/sdk MasterPackAuth (PKCE sign-in, gateUrl https://auth.masterpack.app) provides "Sign in with MasterPack"; HeartbeatEngine (browserEnv("https://auth.masterpack.app/api/beats")) must run on every page while signed in — that is how usage, and therefore payout, is measured. Listed apps use MasterPack as their only sign-in; add it alongside any existing login and let the maker decide what to retire. The CLI writes MASTERPACK_APP_ID, MASTERPACK_API_KEY (secret — never echo it), MASTERPACK_TEST_CLIENT_ID (sandbox: no subscription needed, localhost redirects allowed, usage never earns, tokens carry mode="test") and MASTERPACK_LIVE_CLIENT_ID (production). Both ids are also shown in the maker dashboard. Raw HTTP endpoints exist (POST /api/v1/registrations, PATCH and POST /api/v1/apps/{id}) but the CLI is the supported path. ## Docs - https://masterpack.app/docs/integrate.md — full guide with framework recipes ## Notes - All payments run through MasterPack; apps never handle money. - Apps see a pairwise user id, display name, and tier — never emails. - Gate (auth + heartbeat ingest) origin: https://auth.masterpack.app