尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Generate, fix and validate Google Cloud resource names against the official naming rules (AWS and Azure coming) — web UI + edge API on Cloudflare Workers
翻译准备中
正在加载完整 README。
查看完整 README ↗Cloudonym makes cloud resource names that the cloud provider will accept.
You give it five context values — owner · system · purpose · env · region. It generates, corrects and validates a name for each resource, against that provider's real naming limits (length, allowed characters, reserved words). AWS and Google Cloud are enabled now. Azure is in the rule table and comes in a later release.
Try it: https://cloudonym.uranos.dev
The home page introduces the tool; the naming wizard is at /aws and /gcp (see docs/web-ui.md).
Input: owner=platform, system=payments, purpose=batch, env=prod, region=asia-northeast3-a.
Output for a Compute Engine VM: payments-batch-prod-ane3-gce-01 — valid: true.
A whole project (demo · payment · prod · asia-northeast3) gives one name per part:
What Name Check
Project ID demo-payment-prod PASS
VPC network 01 payment-prod-vpc-01 PASS
Subnet 01 payment-prod-ane3-snet-01 PASS
Web server 01 (shop) payment-shop-prod-ane3-gce-web-01 PASS
Database (Cloud SQL) 01 (shop) payment-shop-prod-ane3-sql-pg-01 PASS
If a name is too long, Cloudonym shortens it step by step. If it still does not fit, it says valid: false and why. It never marks an invalid name as valid.
Web UI. Open the site and fill in the naming wizard. It names a whole project and gives Terraform or JSON. /pick names single resources. Details: docs/web-ui.md.
API. Send JSON to /v1/generate, /v1/names, /v1/wizard or /v1/validate (and a wizard share link to /v1/plan/from-link to get its plan file):
curl -s -X POST https://<your-deployment>/v1/validate -H 'content-type: application/json' \
-d '{"provider":"gcp","resource_type":"storage_bucket","name":"Payments-Prod-Bucket"}'
Details: docs/api.md.
CLI. Run node cli/cloudonym.mjs from a clone. On a terminal it asks a few questions, saves a plan file and prints the names. It calls the API, so the names match the web UI. Details: docs/cli.md.
Point your agent at /llms.txt (every rule and formula in plain text). Machine-readable specs are at /openapi.json and /catalog.json. See docs/api.md.
217 AWS and 153 Google Cloud rules are enabled. Azure (377) rules exist but are not enabled yet. Every rule links to the provider's official document. The list and the known limitations: docs/rules.md.
The site and the API count usage without collecting what you type. Generated names, the five context values, the URL hash, the raw User-Agent, cookies and identifiers are never collected; each event records only its name, the time, a client class (ai_agent, browser, cli or other) and a few fixed fields such as which copy button was used. The client IP is read only as the key of Cloudflare's rate-limiting binding and is not stored. KV day counters are approximate (Cloudflare KV accepts about one write per second to a key, so a burst is under-counted) and expire after 366 days; the closer count comes from the Axiom records (one per event; a record that fails to send is lost), which are kept for 30 days; the operator keeps a copy of each record for two years. Requests from the operator's own release checks carry a secret value in the x-cloudonym-telemetry-skip header and are not counted. Separately, Cloudflare adds its Web Analytics script to every page; it sends page-view and performance data to Cloudflare at the site's own /cdn-cgi/rum, which Cloudflare handles itself, and the operator sees only Cloudflare's aggregated reports. The full list, retention and hosting details are on the site's /privacy page (source).
examples/terraform/ calls /v1/generate from a data "http" block and creates a google_compute_instance with the returned name and labels. apply is blocked unless valid is true and there are no label violations. ignore_changes = [name] keeps an existing VM's name when the rules change, rules_version turns a rules change into a 409, and pinned skips the API with the name you already created. instance_name is the VM's real name; cloudonym_candidate_name is what the API proposes now. For a whole project, the wizard's Terraform button gives one map gcp_names keyed by the item key; the example README shows the same map built from a /v1/wizard response.
Node version comes from .nvmrc (22).
nvm use
npm install
npm run dev # Vite + workerd — UI and /v1/* together, from source
npm test # Vitest
npm run typecheck # tsc -b --noEmit (plain `npx tsc --noEmit` checks nothing here)
npm run lint # oxlint
npm run build # tsc -b && vite build → dist/client + dist/cloudonym
npm run preview # build, then vite preview
npm run deploy # build, then wrangler deploy (needs `npx wrangler login`)
Local secrets go in .dev.vars (template: .dev.vars.example). To run the last build (not the sources) locally, use npm run build && npx wrangler dev --port 8799 — wrangler dev serves dist/cloudonym/, so run the build first or you will see stale code. Production secrets are set with npx wrangler secret put AXIOM_API_KEY (and TELEMETRY_SKIP_TOKEN, the value scripts/release-check.sh reads from CLOUDONYM_TELEMETRY_SKIP_TOKEN so that its requests are not counted).
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗