DialCatz can start a mock server from an API spec: a small server on 127.0.0.1 that answers with the
examples of a collection, so you can build against an API that is not there yet. DevCatz gives each running mock a
domain of its own, the way it does for your sites:
https://shop-api.dialcatz.test → 127.0.0.1:<the mock's port>
The name is <name>.dialcatz.<default domain>: shop-api.dialcatz.localhost with .localhost, shop-api.dialcatz.test
with .test. It works on macOS, Windows and Linux.
How it works
- They come and go with DialCatz. DialCatz lists its running mocks in its own
bridge.json. DevCatz watches that file: a mock gets its domain when DialCatz starts it and loses it when DialCatz stops it (or quits). You start, stop and change a mock’s port in DialCatz only. - HTTPS and HTTP, no redirect. Both schemes answer as they are, because an API client calls the one it was given. HTTPS uses the DevCatz Local CA, like your sites.
- Names are unique. A second mock called
shop-apibecomesshop-api-2. Names under.dialcatz.<tld>belong to the mocks, so no site can take one. - DialCatz can find the domain too. DevCatz writes each mock’s domain into its own
bridge.json(dialcatzMocks), so DialCatz’s Mock server panel can show it and open the mock’s page in DevCatz (devcatz://mocks?workspace=…&collection=…).
Make one from a site
On a site’s API tab, each OpenAPI file has Create mock server. DialCatz imports the file (or uses the collection that already follows it), starts a mock server that answers with its examples, and DevCatz gives it a domain. The button then reads Mock server running · Open. See A site’s tabs.
In the sidebar
While at least one mock runs, a card Mock Servers (DialCatz) sits at the bottom of the sidebar, apart from your sites, with the number running. Click its header to fold it to that line; DevCatz remembers. Each row opens the mock’s page, and a copy button on hover copies its URL.
A mock’s page
The header shows the mock’s name, Mock server from DialCatz, its port, since when it runs and, when it was made from a site, that site and the spec file. Its buttons:
- Open opens the HTTPS address in your browser.
- Open in DialCatz opens the mock’s collection and its Mock server panel in DialCatz, where you stop it or change its port.
Overview
| Field | What it shows |
|---|---|
| HTTPS | https://<name>.dialcatz.<tld>, with Copy |
| HTTP | http://<name>.dialcatz.<tld>, with Copy |
| Forwards to | 127.0.0.1:<port>, where DialCatz serves it |
| Try it | A ready curl line, with Copy |
Domain
Change the part before .dialcatz.<tld> and press Save: lowercase letters, digits and hyphens. The name is kept for
that mock, so the next time it runs in DialCatz it gets the same domain again. Use <DialCatz’s name> goes back
to the name DialCatz gave it.
Write to .env
Points a site’s API calls at the mock while the real API is not ready:
- Pick a site.
- Pick or type a variable —
API_BASE_URLat first, orAPI_URL,VITE_API_URL,NEXT_PUBLIC_API_URL,NUXT_PUBLIC_API_BASE. - Preview changes shows what will be added or replaced.
- Write to .env writes it. An existing key is replaced where it is; a new one goes under
# Mock server (DialCatz, served by DevCatz). Nothing is written before you click it.
Copy copies the line instead. A running site needs a restart to pick up the new value.
When the mock stops, its page says This mock server stopped in DialCatz. Start it again there and it comes back with the same domain.
With an AI assistant
Through MCatzP, an assistant can list the running mocks (list_mocks) and, after you allow it,
create one from a site’s OpenAPI file, open one in DialCatz or rename its domain.
Last updated 2026-11-20