{"id":50854740,"url":"https://github.com/marvinvista/pricebench","last_synced_at":"2026-06-14T17:32:19.954Z","repository":{"id":358810704,"uuid":"1243132695","full_name":"marvinvista/pricebench","owner":"marvinvista","description":"Stress-test AI pricing models before customers do.","archived":false,"fork":false,"pushed_at":"2026-05-19T23:08:30.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T10:30:49.605Z","etag":null,"topics":["agentic-ai","ai-pricing","ai-products","b2b-saas","cli","gross-margin","monetization","nodejs","pricing","usage-based-pricing"],"latest_commit_sha":null,"homepage":"https://fob.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marvinvista.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-19T04:36:59.000Z","updated_at":"2026-05-19T23:08:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marvinvista/pricebench","commit_stats":null,"previous_names":["marvinvista/pricebench"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marvinvista/pricebench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvinvista%2Fpricebench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvinvista%2Fpricebench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvinvista%2Fpricebench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvinvista%2Fpricebench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marvinvista","download_url":"https://codeload.github.com/marvinvista/pricebench/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvinvista%2Fpricebench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34331808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai-pricing","ai-products","b2b-saas","cli","gross-margin","monetization","nodejs","pricing","usage-based-pricing"],"created_at":"2026-06-14T17:32:19.238Z","updated_at":"2026-06-14T17:32:19.947Z","avatar_url":"https://github.com/marvinvista.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pricebench\n\n[![CI](https://github.com/marvinvista/pricebench/actions/workflows/ci.yml/badge.svg)](https://github.com/marvinvista/pricebench/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nPricebench is a CLI for stress-testing AI pricing models against usage COGS, margin targets, free-plan spend, overage rules, credit policies, and outcome-pricing risk. It is deliberately simple: JSON in, report out, tests around the math, and commands that agents can run repeatedly while editing the model.\n\nBuilt by [Marvin Vista](https://github.com/marvinvista). Need hands-on help? [fob.dev](https://fob.dev) helps B2B AI teams pressure-test pricing, usage COGS, free-plan exposure, and packaging before launch.\n\n## Install\n\nInstall from GitHub with `gh`:\n\n```bash\ngh repo clone marvinvista/pricebench\ncd pricebench\nnode bin/pricebench.js quickstart\n```\n\nAdd the binary to your shell path:\n\n```bash\nmkdir -p ~/.local/bin\nln -sf \"$PWD/bin/pricebench.js\" ~/.local/bin/pricebench\npricebench demo ai-support\n```\n\nValidate the checkout:\n\n```bash\nnode --test\nnode scripts/alpha-smoke.js\nnode scripts/run-alpha-trial.js\nnode scripts/outside-alpha-check.js\n```\n\n## Five-Minute Benchmark\n\n1. Create a starter model and see the next commands:\n\n```bash\nnode bin/pricebench.js quickstart pricing.json\n```\n\n2. Edit the generated `pricing.json` so the unit cost, included usage, average usage, and price match your current plan.\n\n   Add any second or third cost unit, usage percentiles, and billing readiness details that matter for your product.\n\n3. Run the benchmark:\n\n```bash\nnode bin/pricebench.js analyze pricing.json\n```\n\n4. Get concrete pricing knobs:\n\n```bash\nnode bin/pricebench.js suggest pricing.json\n```\n\n5. Write a patched copy you can review:\n\n```bash\nnode bin/pricebench.js suggest pricing.json --apply --output pricing.fixed.json\n```\n\n6. Stress-test cost and usage changes:\n\n```bash\nnode bin/pricebench.js sensitivity pricing.json --cost 0.8,1,1.2 --usage 1,1.5\n```\n\n## Commands\n\n```bash\npricebench quickstart [pricebench.json] [--example ai-support] [--force] [--json]\npricebench demo [ai-support|creative-agent|agentic-research] [--json]\npricebench analyze \u003cmodel.json\u003e [--json]\npricebench bench \u003cmodel.json\u003e [--json]\npricebench compare \u003cleft.json|demo:name\u003e \u003cright.json|demo:name\u003e [--json]\npricebench sensitivity \u003cmodel.json|demo:name\u003e [--cost 0.8,1,1.2] [--usage 0.75,1,1.25] [--json]\npricebench suggest \u003cmodel.json|demo:name\u003e [--target-margin 0.7] [--patch] [--apply --output fixed.json] [--json]\npricebench init [pricebench.json] [--example ai-support] [--wizard] [--force]\npricebench lint \u003cmodel.json\u003e [--json]\npricebench explain [model.json|demo:name] [--plan Pro] [--json]\npricebench doctor [--json]\npricebench status [--json]\n```\n\n## Demos\n\nThe bundled examples cover three real pricing shapes:\n\n- `ai-support`: hybrid and outcome pricing that clears margin checks, verdict `ship`.\n- `creative-agent`: credit pricing with basic billing readiness and a tight COGS profile, verdict `watch`.\n- `agentic-research`: underpriced agentic work with unbounded outcome risk, verdict `revise`.\n- More messy fixtures: `chat-copilot`, `code-agent`, `data-enrichment`, `image-api`, and `meeting-notes`.\n\nCopyable examples live in `examples/`:\n\n- `examples/ai-support.json`\n- `examples/chat-copilot.json`\n- `examples/code-agent.json`\n- `examples/creative-agent.json`\n- `examples/data-enrichment.json`\n- `examples/image-api.json`\n- `examples/meeting-notes.json`\n- `examples/agentic-research.json`\n\n```bash\nnode bin/pricebench.js compare demo:ai-support demo:creative-agent\nnode bin/pricebench.js suggest demo:agentic-research\nnode bin/pricebench.js explain demo:agentic-research --plan Pro\nnode bin/pricebench.js sensitivity demo:agentic-research --cost 0.8,1,1.2 --usage 1,1.5\n```\n\nAlpha trial models live in `alpha/models/` and can be run together:\n\n```bash\nnode scripts/run-alpha-trial.js\n```\n\n## Model\n\n```json\n{\n  \"schemaVersion\": \"0.2\",\n  \"name\": \"AI support desk\",\n  \"currency\": \"USD\",\n  \"period\": \"month\",\n  \"assumptions\": {\n    \"targetGrossMargin\": 0.7,\n    \"freeMarketingBudgetPerAccount\": 1.5,\n    \"activationMoment\": \"First correctly resolved support question\",\n    \"billingReadiness\": \"metered-events-ready\"\n  },\n  \"unitCosts\": [\n    { \"unit\": \"resolution\", \"cost\": 0.18 }\n  ],\n  \"plans\": [\n    {\n      \"name\": \"Team\",\n      \"model\": \"hybrid\",\n      \"price\": 149,\n      \"accounts\": 900,\n      \"included\": { \"resolution\": 250 },\n      \"overage\": { \"resolution\": 0.75 },\n      \"averageUsage\": { \"resolution\": 310 },\n      \"usagePercentiles\": {\n        \"p50\": { \"resolution\": 240 },\n        \"p90\": { \"resolution\": 390 },\n        \"p99\": { \"resolution\": 520 }\n      }\n    }\n  ]\n}\n```\n\nThe JSON Schema lives at [schema/pricebench.schema.json](schema/pricebench.schema.json).\n\n## What It Checks\n\n- Whether AI usage has real COGS that can break SaaS-style margin assumptions.\n- Whether paid plans have limits, credits, add-ons, or overages before usage scales.\n- Whether outcome pricing has a measurable success event and bounded workload.\n- Whether free AI usage is budgeted as marketing spend after an activation moment.\n- Whether billing can support usage events, aggregation, topups, invoices, and grandfathering.\n- Whether sensitivity to cost or usage spikes turns a good-looking plan into a bad one.\n- Whether P50, P90, and P99 usage exposes tail-risk that averages hide.\n- Which price, limit, overage, or workload-cap changes would move a risky plan closer to target margin.\n\n## Example\n\n```bash\nnode bin/pricebench.js demo ai-support\n```\n\nOutput:\n\n```text\nPricebench: AI support desk\nVerdict: ship\nOverall gross margin: 72.7% (target 70.0%)\n```\n\nSuggestion output:\n\n```bash\nnode bin/pricebench.js suggest demo:agentic-research\n```\n\n```text\nPricebench suggest: Agentic research workspace\nVerdict: revise\nSummary: 12 suggested changes (9 high, 3 medium).\n- [high] Pro: Raise Pro base price to at least $270.00 or add $221.00 equivalent usage revenue to hit 70.0% margin.\n```\n\nMath explanation:\n\n```bash\nnode bin/pricebench.js explain demo:agentic-research --plan Pro\n```\n\nPatch dry run:\n\n```bash\nnode bin/pricebench.js suggest demo:agentic-research --patch\n```\n\nApply a patched copy:\n\n```bash\nnode bin/pricebench.js suggest examples/agentic-research.json --apply --output /tmp/agentic-research.fixed.json\n```\n\n## What It Does Not Do\n\n- It does not replace buyer research, willingness-to-pay work, or positioning.\n- It does not connect to billing systems.\n- It does not estimate unit costs for you.\n- It does not publish, transmit, or store your pricing model.\n\n## Release Boundary\n\nThis repo contains the product surface only: code, examples, docs, tests, and schema. Keep background research and local-only notes out of the release.\n\nSee [ALPHA.md](ALPHA.md), [docs/github-install.md](docs/github-install.md), [docs/pricing-principles.md](docs/pricing-principles.md), [docs/estimate-unit-costs.md](docs/estimate-unit-costs.md), [docs/billing-mapping.md](docs/billing-mapping.md), [docs/usage-percentiles.md](docs/usage-percentiles.md), [docs/model-first-product.md](docs/model-first-product.md), [docs/walkthrough.md](docs/walkthrough.md), [docs/alpha-trial.md](docs/alpha-trial.md), [docs/alpha-findings.md](docs/alpha-findings.md), [docs/package-contents.md](docs/package-contents.md), and [docs/release.md](docs/release.md) before a public GitHub release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvinvista%2Fpricebench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarvinvista%2Fpricebench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvinvista%2Fpricebench/lists"}