TPM · Technical Product Manager

Open source · MIT

Self-host TPM

Every device gets one free audit on the maintainer's Cloudflare Workers AI credits. For unlimited audits, run TPM on your own Cloudflare account — 5 minutes of setup, then you own the pipeline end-to-end.

1. Cloudflare setup

  1. Sign up at dash.cloudflare.com/sign-up (free). The Workers AI free allowance covers plenty of audits; heavy usage is metered and cheap.
  2. From the dashboard home, copy your Account ID (shown in the right sidebar on any Cloudflare page).
  3. Create an API token: My Profile → API Tokens → Create Token. Use the Custom token template and grant Workers AI → Read and Workers AI → Run. Save the token — Cloudflare only shows it once.

2. Point TPM at your account

tpm config set gateway byo
tpm config set byo.account_id <your-account-id>
tpm config set byo.api_token <your-api-token>
tpm config show

The token is stored in ~/.tpm/config.yaml with mode 0600 and never synced anywhere. Audits in BYO mode talk directly to Cloudflare's AI REST API — no TPM proxy.

3. Run audits

cd your-product-repo
tpm init
tpm audit

No URL argument. TPM reads the code in your current directory, reconstructs the intended product, imagines the user journey from the code, and produces the audit artifacts.

Cloudflare bills you directly for usage. Expect ~$0.10–$0.50 per full audit depending on product complexity — the exact cost is printed after every run.

Prefer to stay on the hosted trial?

Every device gets one free audit on our credits. If that's all you need, just cd into your repo and run tpm audit with no config — the hosted gateway is the default.