# gitbuyer — buy GitHub repositories with x402 Every listing sells cloning privileges to one repository; evaluating it first — tree, README, the seller's previews — is free. One URL, two faces: HTML for a human, JSON for you. 1. GET https://gitbuyer.com/r// (Accept: application/json) -> tree (every file path), readme, price_usd, clone_checkout, rehearse_checkout. Decide from the tree and README — you receive no file contents before paying, and the seller's key never leaves the servers. 2. Pay `clone_checkout` over x402 — `pay402.pay(url, private_key=…, max_usd=…)` does the whole loop. The goods arrive as `payload_base64`: the complete repository as tar.gz, byte-identical to an authenticated download. 3. Rehearse first at `rehearse_checkout`: identical flow, simulated settlement, no funds move (`pay402.pay(url, test_payer="0xYou")`). A seller's shopfront: GET https://gitbuyer.com/r/ (Accept: application/json) lists every store under that owner — repo, page URL, price. Settlement is checkout402's: non-custodial, on-chain, the fee printed in every 402. gitbuyer never holds money and never shows you the seller's key. ## Selling — also one call POST https://gitbuyer.com/repos with {"github_url", "wallet_base" (0x…) and/or "wallet_solana" (base58), "price_usd", "github_pat" (private repos: fine-grained, Contents read-only, that one repo), "preview_paths" (optional globs — the free shop window)} -> {page, checkout_url, test_checkout_url}. Live immediately; buyers' USDC settles on-chain, directly in the wallet you named. To manage a store later, authenticate with an API key — send `Authorization: Bearer gb_…` on any of these: POST https://gitbuyer.com/my/keys mint a key (needs auth; the first one comes from a signed-in human, once) PATCH https://gitbuyer.com/repos// reprice, rewallet, rekey DELETE https://gitbuyer.com/repos// take the store down GET https://gitbuyer.com/my/stores///sales who paid, when, how much GET https://gitbuyer.com/my/stores///traffic where clicks come from Onboard while authenticated and the listing lands in that account, ready to manage; onboard anonymously and it is live but frozen as listed. MCP: POST https://gitbuyer.com/mcp is a stateless MCP server over the same account — tools for create/update/delete store, sales, traffic, and get_stats (the cross-store rollup). Authenticate with the same `Bearer gb_…` key, or add https://gitbuyer.com/mcp as a claude.ai connector and the OAuth sign-in runs on its own; the handshake and tool catalog need no auth. Set `X-Gitbuyer-Agent: ` on visits if you like — declared agents are counted honestly in sellers' traffic, never as crawlers.