---
title: Onboard a repository
description: A coding agent creates one Go, PHP, Rust, Swift, Ruby, Elixir, Dart, Clojure, Haskell, Scala, Python, JavaScript, Erlang, Zig, Julia, OCaml, Crystal, Nim, Fortran, R, Perl, Lua, Haxe, Raku, Solidity, Move, Cairo, C/C++, Deno, or Roc route, waits for DNS and the certificate, and opens a pull request that rewrites import paths.
---

# Onboard a repository to Package URLs

Follow this document in order. The canonical URL is `https://www.packageurls.com/agents.md`. The request and response shapes are `https://www.packageurls.com/openapi.json`.

Package URLs publishes one hostname the customer owns. A Go hostname answers `?go-get=1` with a `go-import` meta tag. A PHP hostname, a Rust hostname, a Swift hostname, a Ruby hostname, an Elixir hostname, a Dart hostname, a Clojure hostname, a Haskell hostname, a Scala hostname, a Python hostname, a JavaScript hostname, an Erlang hostname, a Zig hostname, a Julia hostname, an OCaml hostname, a Crystal hostname, a Nim hostname, a Fortran hostname, an R hostname, a Perl hostname, a Lua hostname, a Haxe hostname, a Raku hostname, a Solidity hostname, a Move hostname, a Cairo hostname, a C/C++ hostname, a Deno hostname, and a Roc hostname answer every path with `307` to the same path on the forge. The edge never proxies git. The code stays on the forge.

You will create one route per language, show the human the DNS records, wait until the certificate is active, and open one pull request per repository. Almost every organization is one language, so that is one route and two DNS records. The human does two things: sign in, and create those DNS records. You do not create DNS records, buy a hostname, or change the plan.

The control plane is `https://api.packageurls.com`. Customer hostnames are not the API. Send `Authorization: Bearer` and `Content-Type: application/json` on requests that have a body. Errors are JSON `{"message":"..."}`.

## Facts you cannot derive

- Only `go`, `php`, `rust`, `swift`, `ruby`, `elixir`, `dart`, `clojure`, `haskell`, `scala`, `python`, `javascript`, `erlang`, `zig`, `julia`, `ocaml`, `crystal`, `nim`, `fortran`, `r`, `perl`, `lua`, `haxe`, `raku`, `solidity`, `move`, `cairo`, `cpp`, `deno`, and `roc` work. `POST /routes` with any other language returns `400` and `language must be go, php, rust, swift, ruby, elixir, dart, clojure, haskell, scala, python, javascript, erlang, zig, julia, ocaml, crystal, nim, fortran, r, perl, lua, haxe, raku, solidity, move, cairo, cpp, deno, or roc`.
- One hostname covers every `owner/repo` under it. Do not create a route per repository.
- The path's first two segments are the repository: `<hostname>/<owner>/<repo>` maps to `<git_url>/<owner>/<repo>`. A third segment is not another repository. A Go `/v2` (or later) suffix stays on the module path and is not a repository segment.
- Nested GitLab groups do not map. `group/subgroup/project` is three segments. Stop and ask the human before creating a route if any repository you must publish lives at a forge path deeper than `owner/repo`.
- Paths with fewer than two segments, a segment that is not `[A-Za-z0-9\-_.~+]` or that starts or ends with `.`, an unknown host, and an unclaimed host return `404` with an empty body and `Cache-Control: no-store`.
- The edge serves a route only after the hostname is verified and `ssl_status` is `active`. Verification without an active certificate is normal. It is not a failure, and the hostname is not live yet.
- `PATCH /routes/{id}` changes the forge root (`git_url`) only. Import paths stay the same. Language and hostname are fixed at creation.
- Free is 1 route and 10,000 requests a month. Past that, the lease issuer stops resolution. The edge returns `402`. On GET the body is `Free limit hit. Upgrade to Pro.` HEAD has an empty body.
- Pro is 25 routes and 100,000 requests a month. Max is 100 routes and 1,000,000 requests a month. On Pro and Max, requests past the allowance still resolve. Overage is never billed.
- There is no API-key endpoint. There is no `POST /account/api-keys`. Do not call Clerk device-authorization or token endpoints against this API. This API accepts a Clerk session JWT, and the `pkgurls` tool's OAuth access token. The tool manages its token; you never read or paste one.

## 1. The tool and sign-in

This is the first human action, and the only credential step. The `pkgurls` program signs itself in and holds its own token. You never see it, read it, or paste it.

1. If the human has no account, they open `https://www.packageurls.com/signup`, enter the email code the site sends, choose a password, and finish signup. An account that stops on Free is a complete signup.
2. Run `pkgurls login`. It prints a device URL and a user code on stderr. Give both to the human; they approve the sign-in on that page. The tool waits until userinfo reports the email verified, then stores the credentials in the operating-system keychain, or a 0700 directory and 0600 file when no keychain is available.
3. An agent that speaks MCP runs `pkgurls mcp serve` instead and calls the same operations as tools. Tool names match the commands below. Stdout is protocol frames only.

From here every call is `pkgurls <command>` or the matching MCP tool. The tool answers with the API's JSON and returns API `message` fields as errors. On a 401 it refreshes the sign-in once and retries; a second 401 or a failed refresh clears the stored credentials and it tells you to run `pkgurls login`. It never refreshes on a 403.

- `pkgurls whoami` is `GET /me`. `user.email_verified` must be true before the first API call that can pay or create.
- `user.can_create_routes: true` means you may create a route. `can_create_routes: false` means stop; tell the human to verify their email at `https://www.packageurls.com/profile`. Creating a route would return `403` and `Verify your email before creating routes.` Do not create a route.
- `401` and `{"message":"not signed in"}` means the store is empty or cleared. Run `pkgurls login` and retry the same command. Do not start over, and do not create a second route.

The calls, and the API path each one makes on `https://api.packageurls.com`:

| Call | Path |
|------|------|
| `pkgurls whoami` | `GET /me` |
| `pkgurls plan` | `GET /billing/status` |
| `pkgurls plan-free` | `POST /billing/plan` |
| `pkgurls checkout <plan>` | `POST /billing/checkout` |
| `pkgurls plan-change <plan>` | `POST /billing/portal` with `{"plan":"<plan>"}` |
| `pkgurls manage` | `POST /billing/portal` with `{"flow":"manage"}` |
| `pkgurls routes` | `GET /routes` |
| `pkgurls route <id>` | `GET /routes/{id}` |
| `pkgurls route-create <host> <git-url> <language>` | `POST /routes` |
| `pkgurls verify <id>` | `POST /routes/{id}/verify` |
| `pkgurls cert <id>` | `POST /routes/{id}/ssl` |

`GET /account/usage` stays a direct call when an account already serves traffic; the tool does not wrap it.

The tool never collects a card number, never writes DNS, never calls Domain Connect, and never reads or edits a repository. Anything paid happens on a hosted Stripe page the human opens.


## 2. Inventory and the plan

Inventory only the repositories you were given.

Count repositories whose Go module path, Composer `vcs` URL, Cargo git dependency, Swift package URL, Bundler git source, Mix git dependency, pub git dependency, Clojure git dependency, Haskell git dependency, Scala git dependency, Python git dependency, JavaScript git dependency, Erlang git dependency, Zig git dependency, Julia git dependency, OCaml git pin, Crystal git dependency, Nim git dependency, Fortran git dependency, R git dependency, Perl git dependency, Lua git dependency, Haxe git dependency, Raku git dependency, Solidity git dependency, Move git dependency, Cairo git dependency, C/C++ git dependency, Deno git dependency, or Roc git dependency uses the old forge host you are replacing, such as `github.com/acme/widgets`. That count is how many pull requests you will open. It is not how many routes you will create.

Choose one hostname with the human. It must be a domain they control, with no scheme and no path, such as `go.example.com` or `php.example.com`. A scratch run may use a name they control on `packageurls.dev`. You still do not create the DNS records.

Choose the language from the repositories:

- Go modules only: one route, `language` `go`, CNAME target `go.packageurls.com`.
- PHP packages only: one route, `language` `php`, CNAME target `php.packageurls.com`.
- Rust crates only: one route, `language` `rust`, CNAME target `rust.packageurls.com`.
- Swift packages only: one route, `language` `swift`, CNAME target `swift.packageurls.com`.
- Ruby gems only: one route, `language` `ruby`, CNAME target `ruby.packageurls.com`.
- Elixir projects only: one route, `language` `elixir`, CNAME target `elixir.packageurls.com`. Hex registry dependencies (`{:widgets, "~> 1.0"}`) stay on hex.pm. This route is the git dependency only.
- Dart packages only: one route, `language` `dart`, CNAME target `dart.packageurls.com`. Hosted packages (`widgets: ^1.0.0`) stay on pub.dev. This route is the git dependency only. Flutter uses the same git dependency.
- Clojure libraries only: one route, `language` `clojure`, CNAME target `clojure.packageurls.com`. Maven coordinates (`org.clojure/clojure {:mvn/version "1.12.0"}`) stay on Clojars or Maven Central. This route is the git dependency only.
- Haskell packages only: one route, `language` `haskell`, CNAME target `haskell.packageurls.com`. Hackage bounds and Stackage snapshots stay on their registries. This route is the git dependency only.
- Scala packages only: one route, `language` `scala`, CNAME target `scala.packageurls.com`. Maven Central coordinates and Ivy resolvers stay off this host. This route is the git dependency only.
- Python packages only: one route, `language` `python`, CNAME target `python.packageurls.com`. PyPI, the simple index, and `--index-url` stay off this host. This route is the git dependency only.
- JavaScript packages only: one route, `language` `javascript`, CNAME target `javascript.packageurls.com`. The npm registry stays off this host. `github:`, `gitlab:`, and `owner/repo` fetch a forge archive and never ask this hostname. This route is the git dependency only.
- Erlang packages only: one route, `language` `erlang`, CNAME target `erlang.packageurls.com`. Hex tuples (`{widgets, "~> 1.0"}`, `{widgets, {pkg, ...}}`, a bare `widgets`) stay on hex.pm. Mix and erlang.mk are not this language. This route is the git dependency only.
- Zig packages only: one route, `language` `zig`, CNAME target `zig.packageurls.com`. Tarball URLs (`https://…tar.gz`) stay off this host. Zig 0.13 `git+https` does not follow this 307. This route is the git+https dependency only.
- Julia packages only: one route, `language` `julia`, CNAME target `julia.packageurls.com`. Registry adds (`Pkg.add("widgets")`, `pkg> add widgets`) stay on the General registry. This route is the URL dependency only.
- OCaml packages only: one route, `language` `ocaml`, CNAME target `ocaml.packageurls.com`. Registry adds (`opam install widgets`, an opam-repository `depends` with no pin) stay on opam-repository. This route is the git pin only.
- Crystal packages only: one route, `language` `crystal`, CNAME target `crystal.packageurls.com`. `github:`, `gitlab:`, `bitbucket:`, and `codeberg:` resolvers rewrite to those forges and never ask this hostname. A named shards.info install is not this product. This route is the git dependency only.
- Nim packages only: one route, `language` `nim`, CNAME target `nim.packageurls.com`. `github:`, `gh:`, `gitlab:`, `gl:`, `codeberg:`, `cb:`, `sourcehut:`, and `srht:` aliases expand to those forges and never ask this hostname. Named installs (`nimble install widgets`, `requires "widgets"`) stay on nimble.directory / `packages.json`. This route is the git URL dependency only.
- Fortran packages only: one route, `language` `fortran`, CNAME target `fortran.packageurls.com`. Named fpm registry installs stay off this host. This route is the git dependency only.
- R packages only: one route, `language` `r`, CNAME target `r.packageurls.com`. CRAN and `install.packages` stay off this host. This route is the git install only.
- Perl packages only: one route, `language` `perl`, CNAME target `perl.packageurls.com`. PAUSE and MetaCPAN stay off this host. This route is the git install only.
- Lua packages only: one route, `language` `lua`, CNAME target `lua.packageurls.com`. Named LuaRocks registry installs stay off this host. This route is the git rockspec only.
- Haxe packages only: one route, `language` `haxe`, CNAME target `haxe.packageurls.com`. Named lib.haxe.org installs stay off this host. This route is the git install only.
- Raku packages only: one route, `language` `raku`, CNAME target `raku.packageurls.com`. Named fez / zef registry installs stay off this host. This route is the git install only.
- Solidity packages only: one route, `language` `solidity`, CNAME target `solidity.packageurls.com`. Named soldeer / foundry registry installs stay off this host. This route is the git install only.
- Move packages only: one route, `language` `move`, CNAME target `move.packageurls.com`. Named registry installs stay off this host. This route is the git dependency only. Do not add `rev` on the copied block.
- Cairo packages only: one route, `language` `cairo`, CNAME target `cairo.packageurls.com`. Named scarbs.xyz installs stay off this host. This route is the git dependency only.
- C/C++ packages only: one route, `language` `cpp`, CNAME target `cpp.packageurls.com`. vcpkg, Conan, and other registries stay off this host. This route is the git dependency only.
- Deno packages only: one route, `language` `deno`, CNAME target `deno.packageurls.com`. `npm:` and `jsr:` specifiers stay off this host. Two-segment and git-smart-HTTP paths stay on the 307 clone. A file path of three or more segments maps to the forge raw URL.
- Roc packages only: one route, `language` `roc`, CNAME target `roc.packageurls.com`. Official Roc URL packages are `.tar.zst` bundles. A two-segment URL is not a Roc package. This route 307s the request path onto the forge.
- More than one language: one hostname and one route per language. Free allows 1 route. Tell the human. If they stay on Free, create only the language they choose and stop after that route. Do not create another route hoping the cap will make an exception.

For the plan, run `pkgurls plan` (`GET /billing/status`):

- `plan_choice` is the stored choice. `null` means nobody has chosen yet. Ask the human whether they want Free, Pro, or Max, then follow the matching step below.
- `free` or a paid code means a choice exists. A `status` of `active`, `trialing`, or `past_due` with a paid `plan` means the plan is live. Any other `status`, including `none` and `canceled`, is not live.
- Free: `pkgurls plan-free` records it. It never calls Stripe.
- A paid plan that is not live: `pkgurls checkout <plan>` returns a hosted Stripe Checkout URL. Give it to the human; they pay on Stripe's page. The URL is not proof of payment.
- A paid plan while a subscription is live: `pkgurls plan-change <plan>` returns a Billing Portal URL that confirms the change on the current subscription. The URL is not proof of payment either.
- Payment-method and invoice work belongs to the human at `pkgurls manage`.
- After the human returns, poll `pkgurls plan` no faster than about two seconds apart, then back off, until `status` is live and `plan` matches the code they chose. Only `GET /billing/status` proves payment.

Before `POST /routes`, stop and ask the human when either of these is true:

- A repository you must publish is not exactly two forge segments (`owner/repo`). Nested GitLab groups (`group/subgroup/project`) do not map. Do not work around that with a route per repository, and do not put a path on `git_url`.
- You cannot tell which hostname they want.

## 3. Create the route

Call `GET /routes` first.

- If a route already exists for this hostname and language, use its `id`. Do not create another.
- If one exists for this hostname with the other language, stop. Language cannot be changed. Tell the human.
- If the list is already at the plan's route cap (1, 25, or 100) and none of the routes is the hostname you need, stop. The create would return `409` and `This account is already at the <plan> plan's route cap of <n>.` Point them at `https://www.packageurls.com/pricing`. Do not delete a route unless they say that route is abandoned.

Create when there is no matching route and the account is under its cap:

```sh
pkgurls route-create go.example.com https://github.com go
```

That posts `{"hostname":"go.example.com","git_url":"https://github.com","language":"go"}` to `POST /routes`.

`hostname` is a domain name. The API lowercases it and strips one trailing dot. `git_url` is a bare origin: `https://github.com`, `https://gitlab.com`, `https://codeberg.org`, or another `http` or `https` origin. No userinfo, path, query, or fragment. `language` is `go`, `php`, `rust`, `swift`, `ruby`, `elixir`, `dart`, `clojure`, `haskell`, `scala`, `python`, `javascript`, `erlang`, `zig`, `julia`, `ocaml`, `crystal`, `nim`, `fortran`, `r`, `perl`, `lua`, `haxe`, `raku`, `solidity`, `move`, `cairo`, `cpp`, `deno`, or `roc`. Always send it.

A `200` body includes `id`, `hostname`, `git_url`, `language`, `cname_target`, `verified` (`false`), `verify_token`, `created_at`, and `updated_at`. `ssl_status` is absent or empty until certificate provisioning starts. Save `id`, `cname_target`, and `verify_token` from this body. Do not invent the CNAME target. Go is `go.packageurls.com`. PHP is `php.packageurls.com`. Rust is `rust.packageurls.com`. Swift is `swift.packageurls.com`. Ruby is `ruby.packageurls.com`. Elixir is `elixir.packageurls.com`. Dart is `dart.packageurls.com`. Clojure is `clojure.packageurls.com`. Haskell is `haskell.packageurls.com`. Scala is `scala.packageurls.com`. Python is `python.packageurls.com`. JavaScript is `javascript.packageurls.com`. Erlang is `erlang.packageurls.com`. Zig is `zig.packageurls.com`. Julia is `julia.packageurls.com`. OCaml is `ocaml.packageurls.com`. Crystal is `crystal.packageurls.com`. Nim is `nim.packageurls.com`. Fortran is `fortran.packageurls.com`. R is `r.packageurls.com`. Perl is `perl.packageurls.com`. Lua is `lua.packageurls.com`. Haxe is `haxe.packageurls.com`. Raku is `raku.packageurls.com`. Solidity is `solidity.packageurls.com`. Move is `move.packageurls.com`. Cairo is `cairo.packageurls.com`. C/C++ is `cpp.packageurls.com`. Deno is `deno.packageurls.com`. Roc is `roc.packageurls.com`.

Other create results:

- `400` `language must be go, php, rust, swift, ruby, elixir, dart, clojure, haskell, scala, python, javascript, erlang, zig, julia, ocaml, crystal, nim, fortran, r, perl, lua, haxe, raku, solidity, move, cairo, cpp, deno, or roc`. You sent the wrong language. Fix the body.
- `400` with a hostname or forge message. Show the human the message and fix the body. A forge URL with a path is rejected.
- `403` `Verify your email before creating routes.` Stop at step 1.
- `409` `That hostname is already claimed.` This account already has a candidate for the hostname. Read `GET /routes` and use its existing ID. Another account’s pending candidate does not block creation.
- `409` route cap, as above. Stop.
- `401`. The tool refreshes once itself; if it says to sign in, run `pkgurls login` and retry this create once. If the first call returned `200`, do not create again. Use `GET /routes`.

The new route is an account-scoped unverified candidate.
It consumes one hostname slot but does not reserve exclusive ownership.
Another account may have a pending candidate or active binding for the same hostname.
Only the current DNS proof can activate a free binding; existing active ownership stays protected until its cleanup completes.
The candidate keeps its ID when activated.

## 4. DNS records

This is the second human action. You cannot edit their DNS.

Print these two records, using the `cname_target` and `verify_token` from the route. The TXT value is the token alone, with no name, quotes, or prefix. The whole TXT string must equal the token.

```text
go.example.com                 CNAME  go.packageurls.com
_packageurls.go.example.com    TXT    <verify_token>
```

The CNAME name is the route hostname. The TXT name is `_packageurls.` plus that hostname. Ask the human to create both records and reply when they have. Leave the route in place while they do it.

## 5. Poll verification

After you have printed the records, run `pkgurls verify <route-id>` (`POST /routes/{id}/verify`) until you know which branch you are in. Wait 15 seconds, then 30, then 60, then 120, and stay at 120 seconds.

```sh
pkgurls verify <route-id>
```

The body may be empty. Read `outcome`, `retryable`, and `route`.

- `verified`. DNS ownership passed. `route.verified` is `true`. Go to step 6. Do not rewrite imports yet.
- `token-missing`. A TXT record exists at `_packageurls.<hostname>` and it is not the token. Stop the timer. Show the human the same two records again and say the TXT value does not match. Do not tell them the CNAME is the problem. Do not call `POST /routes/{id}/verify-token/rotate` unless they say the token leaked. Rotation changes the token and clears verification. When they say the TXT is fixed, resume polling.
- `stale-challenge`. The token changed while DNS was being checked. Read the route again, show its current TXT record, and retry verification.
- `ownership-conflict`. An active binding or unfinished cleanup still owns the hostname. Do not rotate tokens or delete another candidate. Retry after its established release process completes.
- `dns-error`. The lookup failed. `retryable` is `true`. Keep polling. Do not tell the human the record is wrong.
- `nxdomain-or-no-txt`. No TXT yet. This is the expected state until the human publishes the record. Keep polling. `retryable` is `false` here. That flag does not mean stop. It means the lookup did not find a TXT record.
- `401`. Run `pkgurls login` if the tool says to sign in, and retry this verify.
- `404` `route not found`. Stop. The route is gone or it is not this account's. Do not create a replacement unless the human asks.
- `5xx`. Treat it like `dns-error` and keep polling.

`verified` is the only outcome that continues the run.

## 6. Wait for the certificate

On `verified`, the API starts certificate provisioning. The verify body already includes `route.ssl_status`. If that value is `active`, go to step 7.

Otherwise poll `pkgurls route <route-id>` (`GET /routes/{id}`) on the same backoff. While you wait you may run `pkgurls cert <route-id>` (`POST /routes/{id}/ssl`) to refresh a certificate that is still converging. Do not call `POST /internal/ssl-sync`. That cron is not yours. It converges pending certificates without you.

Keep polling while `ssl_status` is `initializing`, starts with `pending`, or starts with `hold`. Pending includes `pending_validation`, `pending_issuance`, `pending_deployment`, and `pending_reconciliation`.
`pending_reconciliation` means the outcome of an earlier provider request is still being established.
Keep the route and retry certificate status; do not treat this as a confirmed failure or assume deletion can release its hostname yet. A pending status after verification is normal.
An absent or empty state is unavailable, not proof that issuance is progressing.
Keep the route, retry verification to request provisioning, and contact support if unavailable persists.
Do not delete the route or open the import pull request.

Stop the wait, leave the route, and follow the section "If you stop" when `ssl_status` is `failed`, `blocked`, `not-configured`, `quota-exceeded`, or contains `timed_out`, or when it is some other value that is not `active` and not in the converging list above. Certificate readiness and edge serving are separate observations.
A successful HTTPS check confirms that request, not package installation.
For a failed certificate check the provider error before changing CAA; do not diagnose CAA on a healthy route.
Blocked issuance, exhausted provider quota, and missing provider configuration need support before retrying verification.

`active` is the only status that means you may rewrite imports.

## 7. Rewrite and open the pull request

Confirm the edge before you edit. These checks talk to the customer hostname, not the API.

Go, after replacing the example names:

```sh
curl -fsS -D - "https://go.example.com/acme/widgets?go-get=1"
```

Expect `200`, `Content-Type` HTML, `Cache-Control: no-store`, and a meta tag:

```html
<meta name="go-import" content="go.example.com/acme/widgets git https://github.com/acme/widgets">
```

The prefix is `<hostname>/<owner>/<repo>`. The repo URL is `<git_url>/<owner>/<repo>`. A browser request without `?go-get=1` is a `302` to that repo URL.

PHP:

```sh
curl -fsS -o /dev/null -D - "https://php.example.com/acme/widgets"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and a `Location` that ends in `/acme/widgets` on the forge. The PHP host forwards the full path, so Composer and git can follow `/info/refs` and `/git-upload-pack` onto `<git_url>/<owner>/<repo>/...`. `GET /acme/widgets?go-get=1` on a PHP host is still that `307`, not an HTML meta page. `POST /acme/widgets` on a Go host is `405` with `Allow: GET, HEAD`.

Rust uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://rust.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Cargo's git fetch follows that redirect and then talks to the forge.

Swift uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://swift.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Swift Package Manager's git clone follows that redirect and then talks to the forge.

Ruby uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://ruby.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Bundler's git clone follows that redirect and then talks to the forge.

Elixir uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://elixir.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Mix's git clone follows that redirect and then talks to the forge.

Dart uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://dart.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. pub's git clone follows that redirect and then talks to the forge.

Clojure uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://clojure.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. The Clojure CLI's git clone follows that redirect and then talks to the forge.

Haskell uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://haskell.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Cabal's and Stack's git clones follow that redirect and then talk to the forge.

Scala uses the same redirect. The repository segment ends in `.git`. The commit fragment is not on this request. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://scala.example.com/acme/widgets.git/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets.git/info/refs?service=git-upload-pack`. The query string stays. sbt's git clone follows that redirect and then talks to the forge. Do not paste this request URL into `build.sbt`. The path ends in `info/refs`, so it does not end in `.git`.

Python uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://python.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. pip, uv, Poetry, and PDM git clones follow that redirect and then talk to the forge. Do not paste this request URL into the dependency.

If the check is `404`, the certificate is not serving yet. Return to step 6. If it is `402`, Free has used its 10,000 requests this month. Stop the rewrite, leave the route, and tell the human to move to Pro. If it is `403` and the body is `Paused.`, stop and tell the human. Do not edit imports.

JavaScript uses the same redirect. The repository segment ends in `.git`. Do not add a fragment. The `404`, `402`, and `403` results above apply to this check. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://javascript.example.com/acme/widgets.git/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets.git/info/refs?service=git-upload-pack`. The query string stays. npm, pnpm, yarn, and bun clone through git, and git follows that redirect and then talks to the forge. Do not paste this request URL into the dependency.

Erlang uses the same redirect. The repository segment ends in `.git`. The `404`, `402`, and `403` results above apply to this check. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://erlang.example.com/acme/widgets.git/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets.git/info/refs?service=git-upload-pack`. The query string stays. rebar3 clones through git, and git follows that redirect and then talks to the forge. Do not paste this request URL into the dependency.

Zig uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://zig.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. zig fetch and zig build clone through Zig's Git HTTP client, and Zig 0.14 follows that redirect and then talks to the forge. Zig 0.13 git+https does not. Do not paste this request URL into the dependency.

Julia uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://julia.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Pkg clones through LibGit2 by default, and LibGit2 follows that redirect and then talks to the forge. CLI git does the same when `JULIA_PKG_USE_CLI_GIT` is true. Do not paste this request URL into the dependency.

OCaml uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://ocaml.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. opam clones through system git, and git follows that redirect and then talks to the forge. dune pkg does the same for a `git+https` pin. Do not paste this request URL into the pin.

Crystal uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://crystal.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Shards clones through `git clone --mirror`, and git follows that redirect and then talks to the forge. Do not paste this request URL into shard.yml.

Nim uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://nim.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Nimble clones through `git ls-remote` then `git clone --depth 1`, and git follows that redirect and then talks to the forge. Do not paste this request URL into the .nimble file or the install line.

Fortran uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://fortran.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. fpm clones through git, and git follows that redirect and then talks to the forge. Do not paste this request URL into fpm.toml.

R uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://r.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Pak's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the install line.

Perl uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://perl.example.com/acme/widgets.git/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets.git/info/refs?service=git-upload-pack`. The query string stays. Cpanm's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the cpanm line.

Lua uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://lua.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. LuaRocks' git clone follows that redirect and then talks to the forge. Do not paste this request URL into the rockspec.

Haxe uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://haxe.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Haxelib's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the haxelib line.

Raku uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://raku.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Zef's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the zef line.

Solidity uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://solidity.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Forge's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the forge line.

Move uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://move.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. The Move toolchain's git clone follows that redirect and then talks to the forge. Do not paste this request URL into Move.toml.

Cairo uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://cairo.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Scarb's git clone follows that redirect and then talks to the forge. Do not paste this request URL into Scarb.toml.

C/C++ uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://cpp.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. CMake's git clone follows that redirect and then talks to the forge. Do not paste this request URL into the CMake or PlatformIO line.

Deno uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://deno.example.com/acme/widgets/info/refs?service=git-upload-pack"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/info/refs?service=git-upload-pack`. The query string stays. Deno's fetch and git clone follows that redirect and then talks to the forge. Do not paste this request URL into the import.

A file path maps to the forge raw URL:

```sh
curl -fsS -o /dev/null -D - "https://deno.example.com/acme/widgets/mod.ts"
```

Expect `307` and `Location: https://raw.githubusercontent.com/acme/widgets/HEAD/mod.ts` on github.com.

Roc uses the same redirect. After replacing the example names:

```sh
curl -fsS -o /dev/null -D - "https://roc.example.com/acme/widgets/releases/download/1.0.0/widgets.tar.zst"
```

Expect `307`, an empty body, `Cache-Control: no-store`, and `Location: <git_url>/acme/widgets/releases/download/1.0.0/widgets.tar.zst`. The query string stays. Roc's bundle fetch follows that redirect and then talks to the forge. Do not paste this request URL into the app header.

When the check matches, open one pull request per repository you inventoried. Do not change the repository's git remote. Consumers use the vanity host. Git still clones the forge, because the edge does not proxy git.

Go, in that repository:

- The `module` line in `go.mod`, when it is the module you are moving. This is required, not cosmetic: `go` refuses a fetched module whose declared path does not match the requested one and reports `module declares its path as ... but was required as ...`. The vanity path becomes the module's only canonical path; the old forge path no longer resolves for `go get`.
- Import strings in `.go` files, and `require` lines for that module.
- README and docs that tell someone to `go get` the old module path.
- CI scripts that `go get` or install that module path.
- Keep a `/v2` or later suffix. `github.com/acme/widgets/v2` becomes `go.example.com/acme/widgets/v2`.
- A module nested below `<owner>/<repo>` keeps its remaining path segments, for example `<hostname>/<owner>/<repo>/apps/backend`.
- Leave `github.com` URLs that are not this module: issues, actions, other organizations, and the sentence that says where the source lives.
- Set `GOPRIVATE` to the vanity hostname. It covers `GONOSUMDB` and `GONOPROXY`, so the checksum database and the public proxy never see the module path. `go env -w GOPRIVATE=<hostname>` keeps the setting for later shells and CI. Then run `go get <hostname>/<owner>/<repo>` (include `/vN` when that is the module). Default `GOPROXY` (`https://proxy.golang.org,direct`) is right when the module has public dependencies. A private forge still needs the human's existing git credentials. Package URLs does not issue those. Commit the `go.sum` update.

PHP, in the consuming repository or the one that declares the `vcs` repository:

- Change the Composer repository URL from the forge to `https://<hostname>/<owner>/<repo>`. The usual shape is `{ "type": "vcs", "url": "https://php.example.com/acme/widgets" }`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` in `composer.json` as the forge publishes it.
- Run `composer install` when Composer is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.

Rust, in the consuming crate:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>`. The usual shape is `widgets = { git = "https://rust.example.com/acme/widgets" }`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` in `Cargo.toml` as the forge publishes it.
- Run `cargo build` when Cargo is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.

Swift, in the consuming package:

- Change the package URL from the forge to `https://<hostname>/<owner>/<repo>`. The usual shape is `.package(url: "https://swift.example.com/acme/widgets", from: "1.0.0")`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` in `Package.swift` as the forge publishes it.
- Run `swift package resolve` when Swift is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.

Ruby, in the consuming Gemfile:

- Change the git source from the forge URL to `https://<hostname>/<owner>/<repo>`. The usual shape is `gem "widgets", git: "https://ruby.example.com/acme/widgets"`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the gem name in the gemspec as the forge publishes it.
- Run `bundle install` when Bundler is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.

Elixir, in the consuming `mix.exs`:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>`. The usual shape is `{:widgets, git: "https://elixir.example.com/acme/widgets"}`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the app name in `mix.exs` as the forge publishes it.
- Run `mix deps.get` when Mix is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- A Hex dependency (`{:widgets, "~> 1.0"}`) stays on hex.pm. This route covers the git dependency only.

Dart, in the consuming `pubspec.yaml`:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>`. The usual shape is `git: https://dart.example.com/acme/widgets` under the package name.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` in `pubspec.yaml` as the forge publishes it.
- Run `dart pub get` when the Dart SDK is available, or `flutter pub get` when Flutter is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- A hosted dependency (`widgets: ^1.0.0`) stays on pub.dev. This route covers the git dependency only.

Clojure, in the consuming `deps.edn`:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>`. The usual shape is `{:deps {io.github.acme/widgets {:git/url "https://clojure.example.com/acme/widgets" :git/sha "..."}}}`. `:git/sha` stays the full commit the consumer already pins.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the library coordinate as the consumer declares it.
- Run `clj -P` when the Clojure CLI is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- A Maven coordinate (`org.clojure/clojure {:mvn/version "1.12.0"}`) stays on Clojars or Maven Central. This route covers the git dependency only.

Haskell, in the consuming `cabal.project` and `stack.yaml`:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>`.
- Cabal, in `cabal.project`. The stanza name has no colon. `tag` stays the full sha the consumer already pins:

```text
source-repository-package
    type: git
    location: https://<hostname>/<owner>/<repo>
    tag: "0123456789abcdef0123456789abcdef01234567"
```

- Rewrite Stack `github: owner/repo` into `git:` plus `commit:` on the vanity URL with the same commit. In `stack.yaml`:

```text
extra-deps:
- git: https://<hostname>/<owner>/<repo>
  commit: "0123456789abcdef0123456789abcdef01234567"
```

- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package name as the forge publishes it.
- Run `cabal build` or `stack build` when Cabal or Stack is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Hackage bounds and Stackage snapshots stay on their registries. Stack's `github:` form stays off this host. This route covers the git dependency only.

Scala, in the consuming `build.sbt`:

- Change the git dependency from the forge URL to `https://<hostname>/<owner>/<repo>.git`. The commit is a fragment on that URI, the same shape the route form shows. The fragment stays on the paste and is not sent to the edge.
- `RootProject` takes the URI. `ProjectRef` takes the same URI and the project id. The project id is not a path segment.

```text
RootProject(uri("https://<hostname>/<owner>/<repo>.git#0123456789abcdef0123456789abcdef01234567"))

ProjectRef(uri("https://<hostname>/<owner>/<repo>.git#0123456789abcdef0123456789abcdef01234567"), "root")
```

- Change README and CI clones of that forge repository to the vanity URL. A clone URL does not need the fragment.
- Leave the project id as the forge publishes it.
- Run `sbt compile` when sbt is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>.git`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Maven Central coordinates and Ivy resolvers stay off this host. This route covers the git dependency only.

Python, in the consuming requirements file and `pyproject.toml`:

- Change the git dependency from the forge URL to the vanity host. The first line is the pip, uv, and PDM requirement. The second line is the Poetry dependency. Both lines are the shape the route form shows.

```text
widgets @ git+https://<hostname>/<owner>/<repo>

widgets = { git = "https://<hostname>/<owner>/<repo>" }
```

- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package name as the forge publishes it.
- Run `pip install` or `uv add` when pip or uv is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- PyPI, the simple index, and `--index-url` stay off this host. This route covers the git dependency only.

JavaScript, in the consuming `package.json`:

- Change the git dependency from the forge URL to the vanity host. The line is the shape the route form shows. It has no fragment.

```text
"widgets": "git+https://<hostname>/<owner>/<repo>.git"
```

- `github:`, `gitlab:`, and `owner/repo` fetch a forge archive and never ask this hostname. Do not use those forms.
- npm 12 needs `allow-git=root` in the consumer `.npmrc`. Yarn Berry needs `approvedGitRepositories` to include `https://<hostname>/**`. pnpm and bun do not need an allow list.
- A fragment may be appended. It stays on the paste and is not sent to the edge.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` in `package.json` as the forge publishes it.
- Run `npm install` when npm is available. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>.git`. A private forge still needs the human's existing git credentials. Package URLs does not issue those. Commit `package-lock.json` when npm changes it. Do not require a pnpm, yarn, or bun lockfile unless that tool was the one that ran.
- The npm registry stays off this host. This route covers the git dependency only.

Erlang, in the consuming `rebar.config`:

- Change the git dependency from the forge URL to the vanity host. The line is the shape the route form shows. It has no `{tag|branch|ref}` third element.

```text
{deps, [{widgets, {git, "https://<hostname>/<owner>/<repo>.git"}}]}.
```

- Hex tuples (`{widgets, "~> 1.0"}`, `{widgets, {pkg, ...}}`, a bare `widgets`) stay on hex.pm. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix and erlang.mk are not this language.
- A `{tag|branch|ref, ...}` third element may be appended. It stays on the paste and is not sent to the edge.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the application name as the forge publishes it.
- Run `rebar3 compile` when rebar3 is available. After rewriting `rebar.config`, run `rebar3 upgrade widgets` (or unlock that app) and commit `rebar.lock` when rebar3 changes it, or the lock keeps cloning the old URL. Otherwise run `git ls-remote https://<hostname>/<owner>/<repo>.git`. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Hex.pm stays off this host. This route covers the git dependency only.

Zig, in the consuming `build.zig.zon`:

- Before editing `build.zig.zon`, run `zig version`. If zig is missing or older than 0.14, do not edit `build.zig.zon`, do not invent a hash, and still report the 307 curl. Zig 0.13 `git+https` does not follow this 307.
- When Zig is 0.14 or later, change the git+https dependency from the forge URL to the vanity host. The line is the shape the route form shows. It has no `#<commit-or-tag>` fragment, no `.hash`, and no `.git`. Use the existing dependency key; `widgets` is the example.

```text
.widgets = .{ .url = "git+https://<hostname>/<owner>/<repo>" }
```

- Immediately run `zig fetch --save=widgets git+https://<hostname>/<owner>/<repo>` (use the existing zon key if it is not `widgets`) so it writes the `#<commit-or-tag>` fragment and `.hash` in the same rewrite. Then commit `build.zig.zon` when zig fetch changes it, or the dependency has no `.hash` and `zig build` fails. Do not invent a hash. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Tarball URLs (`https://…tar.gz`) stay off this host. Do not convert them to `git+https` or the reverse.
- `git@`, `ssh://`, and `git://` never ask this hostname.
- A `#<commit-or-tag>` fragment or a `.git` suffix may be appended. It stays on the paste and is not sent to the edge as a fragment.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `.name` as the forge publishes it.
- There is no central registry. This route covers the git+https dependency only.

Julia, in the consuming project:

- Before running `Pkg.add`, check that `julia` is on PATH (`julia --version`). If julia is missing, do not run `Pkg.add`, do not invent `git-tree-sha1`, and still report the 307 curl.
- When julia is installed, run the line the route form shows. It has no `rev`, no `subdir`, and no `.git`.

```text
Pkg.add(url = "https://<hostname>/<owner>/<repo>")
```

- Registry adds (`Pkg.add("widgets")`, `pkg> add widgets`) stay on the General registry. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- A `.git` suffix may be added on the copied URL and is sent to the edge as path. `rev` is an extra `Pkg.add` keyword on that call, not a URL fragment or query. It stays on the customer's paste. `subdir` is not offered on the paste.
- After running the copied `Pkg.add`, commit `Manifest.toml` and `Project.toml` when Pkg changes them, or the Manifest keeps the old `repo-url` and `git-tree-sha1`. Do not invent `git-tree-sha1`. Pkg writes those files. On Julia 1.11 or later it may also write a `[sources]` url entry. The copied block stays the `Pkg.add` call. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the URL dependency only.

OCaml, in the consuming project:

- Before running `opam pin add`, check that `opam` is on PATH (`opam --version`). If opam is missing, do not run `opam pin add`, do not invent pin files, and still report the 307 curl.
- When opam is installed, run the line the route form shows. It has no `#ref`, no `-k git`, and no `.git`.

```text
opam pin add widgets git+https://<hostname>/<owner>/<repo>
```

- Registry adds (`opam install widgets`, an opam-repository `depends` with no pin) stay on opam-repository. Do not use those forms.
- dune pkg pins live in `dune-project` as `(pin (url "git+https://<hostname>/<owner>/<repo>") (package (name widgets)))`. Remote dune pin URLs must begin with `git+`. That stanza is not the copied block.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- A `.git` suffix may be added on the copied URL and is sent to the edge as path. `#ref` is an opam URL suffix on that pin, not a browser fragment the edge must see. It stays on the customer's paste. `subdir` / `--subpath` is not offered on the paste.
- After running the copied `opam pin add`, run `opam install widgets` when the pin did not install, and commit the switch pin and any lock dune pkg wrote. Do not invent pin metadata or a dune lock hash. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- A bare `https://` pin without `git+` or `-k git` may be inferred as an HTTP archive and will not clone. The copied block uses `git+https`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git pin only.

Crystal, in the consuming project:

- Before running `shards install`, check that `shards` is on PATH (`shards --version`). If shards is missing, do not run `shards install`, do not invent lock files, and still report the 307 curl.
- When shards is installed, paste the YAML the route form shows as the `dependencies` mapping in `shard.yml`, or merge the `widgets` entry into an existing `dependencies` mapping. Do not nest a second `dependencies` key. It has no `version`, no `tag`, no `branch`, no `commit`, and no `.git`.

```yaml
dependencies:
  widgets:
    git: https://<hostname>/<owner>/<repo>
```

- `github:`, `gitlab:`, `bitbucket:`, and `codeberg:` resolvers rewrite to those forges and never ask this hostname. Do not use those forms.
- A named shards.info install is not this product.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- A `.git` suffix may be added on the copied URL and is sent to the edge as path. `version`, `tag`, `branch`, and `commit` are extra mapping keys on that dependency. They stay on the customer's paste. A path resolver is not offered on the paste.
- After pasting, run `shards install` and commit `shard.lock` and `shard.yml` when Shards changes them, or the lock keeps cloning the old URL. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Known-provider hosts (github.com, gitlab.com, bitbucket.org, codeberg.org) get `.git` appended by Shards; a vanity host does not. The copied block stays the YAML. The paste omits `.git`.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.

Nim, in the consuming project:

- Before running `nimble install`, check that `nimble` is on PATH (`nimble --version`). If nimble is missing, do not run `nimble install`, do not invent lock files, and still report the 307 curl.
- When nimble is installed, paste the line the route form shows into the consumer `.nimble` file. It has no version range, no `#head`, no `#sha`, no `?subdir=`, and no `.git`.

```nim
requires "https://<hostname>/<owner>/<repo>"
```

- Named installs (`nimble install widgets`, `requires "widgets"`) stay on nimble.directory / `packages.json` and never ask this hostname. Do not use those forms.
- `github:`, `gh:`, `gitlab:`, `gl:`, `codeberg:`, `cb:`, `sourcehut:`, and `srht:` aliases expand to those forges and never ask this hostname. Do not use those forms.
- A URL whose host is already the forge never asks this hostname. Nimble's GitHub tarball shortcut is `github.com` only.
- `git@`, `ssh://`, `file://`, and Mercurial never ask this hostname. Mix, Hex, Shards, and other languages are not this language.
- `git://` on this hostname is rewritten to `https://` by Nimble's default `cloneUsingHttps` and then does ask this hostname. The copied line is still `https`.
- A `.git` suffix may be added on the copied URL and is sent to the edge as path. A version range, `#head`, `#sha`, or `?subdir=` stays on the customer's paste. The note does not pick a revision. Unpinned, Nimble uses the latest tag, else HEAD.
- After pasting, run `nimble install` and commit `nimble.lock` when Nimble changes it, or the lock keeps cloning the old URL. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- `nimble install https://<hostname>/<owner>/<repo>` is the same URL, not the copied block.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git URL dependency only.

Fortran, in the consuming project:

- Before running `fpm build`, check that `fpm` is on PATH (`fpm --version`). If fpm is missing, do not run `fpm build`, do not invent lock files, and still report the 307 curl.
- When fpm is installed, paste the TOML the route form shows as the `[dependencies]` table in `fpm.toml`, or merge the `widgets` entry into an existing table. It has no version constraint and no `.git`.

```toml
[dependencies]
widgets = { git = "https://<hostname>/<owner>/<repo>" }
```

- Named fpm registry installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- A `.git` suffix may be added on the copied URL and is sent to the edge as path. A version constraint or `rev` stays on the customer's paste.
- After pasting, run `fpm build` and commit any lock fpm writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


R, in the consuming project:

- Before running `pak::pkg_install`, check that `pak` is on PATH. If pak is missing, do not run `pak::pkg_install`, do not invent lock files, and still report the 307 curl.
- When pak is installed, paste the two lines the route form shows.

```r
pak::pkg_install("git::https://<hostname>/<owner>/<repo>")
remotes::install_git("https://<hostname>/<owner>/<repo>")
```

- CRAN and `install.packages` stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `pak::pkg_install` and commit any lock the install writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Perl, in the consuming project:

- Before running `cpanm`, check that `cpanm` is on PATH. If cpanm is missing, do not run `cpanm`, do not invent lock files, and still report the 307 curl.
- When cpanm is installed, paste the cpanm line the route form shows.

```sh
cpanm git+https://<hostname>/<owner>/<repo>.git
```

- PAUSE and MetaCPAN stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `cpanm` and commit any lock cpanm writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Lua, in the consuming project:

- Before running `luarocks make`, check that `luarocks` is on PATH. If luarocks is missing, do not run `luarocks make`, do not invent lock files, and still report the 307 curl.
- When luarocks is installed, paste the `source` table the route form shows into the consumer rockspec.

```lua
source = { url = "git+https://<hostname>/<owner>/<repo>" }
```

- Named LuaRocks registry installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `luarocks make` and commit any lock LuaRocks writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Haxe, in the consuming project:

- Before running `haxelib git`, check that `haxelib` is on PATH. If haxelib is missing, do not run `haxelib git`, do not invent lock files, and still report the 307 curl.
- When haxelib is installed, paste the haxelib line the route form shows.

```sh
haxelib git widgets https://<hostname>/<owner>/<repo>
```

- Named lib.haxe.org installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `haxelib git` and commit any lock haxelib writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Raku, in the consuming project:

- Before running `zef install`, check that `zef` is on PATH. If zef is missing, do not run `zef install`, do not invent lock files, and still report the 307 curl.
- When zef is installed, paste the zef line the route form shows.

```sh
zef install https://<hostname>/<owner>/<repo>
```

- Named fez / zef registry installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `zef install` and commit any lock zef writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Solidity, in the consuming project:

- Before running `forge install`, check that `forge` is on PATH. If forge is missing, do not run `forge install`, do not invent lock files, and still report the 307 curl.
- When forge is installed, paste the forge line the route form shows.

```sh
forge install widgets=https://<hostname>/<owner>/<repo>
```

- Named soldeer / foundry registry installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `forge install` and commit `lib/` and any remappings forge writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Move, in the consuming project:

- Before running `aptos move compile`, check that `aptos` is on PATH. If aptos is missing, do not run `aptos move compile`, do not invent lock files, and still report the 307 curl.
- When aptos is installed, paste the TOML the route form shows as the `[dependencies]` table in `Move.toml`, or merge the `Widgets` entry into an existing table. It has no `rev`.

```toml
[dependencies]
Widgets = { git = "https://<hostname>/<owner>/<repo>" }
```

- Named registry installs stay off this host. Do not add `rev` on the copied block.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `aptos move compile` and commit any lock the Move toolchain writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Cairo, in the consuming project:

- Before running `scarb build`, check that `scarb` is on PATH. If scarb is missing, do not run `scarb build`, do not invent lock files, and still report the 307 curl.
- When scarb is installed, paste the TOML the route form shows as the `[dependencies]` table in `Scarb.toml`, or merge the `widgets` entry into an existing table.

```toml
[dependencies]
widgets = { git = "https://<hostname>/<owner>/<repo>" }
```

- Named scarbs.xyz installs stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `scarb build` and commit `Scarb.lock` when Scarb changes it. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


C/C++, in the consuming project:

- Before running `cmake`, check that `cmake` is on PATH. If cmake is missing, do not run `cmake`, do not invent lock files, and still report the 307 curl.
- When cmake is installed, paste the PlatformIO `lib_deps` line and the CMake `FetchContent_Declare` the route form shows.

```cmake
lib_deps =
    https://<hostname>/<owner>/<repo>
FetchContent_Declare(widgets GIT_REPOSITORY https://<hostname>/<owner>/<repo>)
```

- vcpkg, Conan, and other registries stay off this host. Do not use those forms.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `cmake` and commit any lock CMake or PlatformIO writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Deno, in the consuming project:

- Before running `deno install`, check that `deno` is on PATH. If deno is missing, do not run `deno install`, do not invent lock files, and still report the 307 curl.
- When deno is installed, paste the import the route form shows.

```ts
import { thing } from "https://<hostname>/<owner>/<repo>/mod.ts"
```

- `npm:` and `jsr:` specifiers stay off this host. Do not use those forms. A two-segment URL is a git clone, not a Deno module. The package metadata lives in `deno.json`.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `deno install` and commit `deno.lock` when Deno changes it. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.


Roc, in the consuming project:

- Before running `roc build`, check that `roc` is on PATH. If roc is missing, do not run `roc build`, do not invent lock files, and still report the 307 curl.
- When roc is installed, paste the header the route form shows. It is a `.tar.zst` bundle URL, not a git clone.

```roc
app [main!] { pf: platform "https://<hostname>/<owner>/<repo>/releases/download/<tag>/<file>.tar.zst" }
```

- A two-segment URL is not a Roc package. Official URL packages are `.tar.zst` bundles. The consumer file is `main.roc`.
- `git@`, `ssh://`, and `git://` never ask this hostname. Mix, Hex, and other languages are not this language.
- After pasting, run `roc build` and commit any lock Roc writes. Do not invent lock hashes. A private forge still needs the human's existing git credentials. Package URLs does not issue those.
- Change README and CI clones of that forge repository to the vanity URL.
- Leave the package `name` as the forge publishes it.
- There is no npm-style `allow-git` setting. This route covers the git dependency only.

Do this on a branch. The pull request should say which hostname and route id it uses, and the output of the `go get`, Composer, `cargo build`, `swift package resolve`, `bundle install`, `mix deps.get`, `dart pub get`, `flutter pub get`, `clj -P`, `cabal build`, `stack build`, `sbt compile`, `pip install`, `uv add`, `npm install`, `rebar3 compile`, `zig fetch`, `zig build`, `Pkg.add`, `opam pin add`, `shards install`, `nimble install`, `fpm build`, `pak::pkg_install`, `cpanm`, `luarocks make`, `haxelib git`, `zef install`, `forge install`, `aptos move compile`, `scarb build`, `cmake`, `deno install`, `roc build`, or `git ls-remote` check. If that check fails after the curl check passed, fix the branch. Do not delete the route.

## If you stop

A partial run leaves setup unfinished.
If the certificate is already `active` and you stop before the pull request, the certificate is ready and the imports are unchanged.
Check an actual request before claiming that the hostname resolves.
Do not delete the route unless the human asks.
Do not rotate the verify token.
Do not open the import pull request.

Tell the human:

- `id`, `hostname`, `language`, `verified`, and `ssl_status`
- the CNAME and TXT records, when `verified` is still false
- the next call: `pkgurls verify <route-id>`, or `pkgurls route <route-id>` when it is already verified
- that imports were not changed
- the observed request result, including failures.
  If an actual request succeeded, report that result without claiming that a package was installed.
  If no request was checked, say serving is unverified.

They can resume by giving an agent this guide, the route `id`, and a signed-in `pkgurls`.
