---
title: "Adapters and runtime detection · GeoHarness"
description: "How GeoHarness detects and builds static sites, npm, SvelteKit, Vite single-page apps, Python, Make and existing Workers, and how build commands run without a shell."
canonical: "https://geo.avarok.net/docs/adapters/"
tokens: 998
---

# Adapters and runtime detection

GeoHarness builds almost any static site. An adapter knows how to detect a kind of project, build it and list its pages; GeoHarness runs every adapter's detection, picks the most confident one and logs the evidence it found.

Updated 2026-11-19

## How does GeoHarness choose an adapter?

- Every adapter inspects the site directory and returns a confidence between 0 and 1 with the evidence behind it.
- The highest confidence wins and its evidence is printed in the log.
- When the top two tie, the run fails and names both, rather than guessing.
- The `adapter` input overrides detection entirely.

## Which adapters are there?

| Adapter            | Detected when                                                | What it does                                                                                                                        |
| ------------------ | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `worker-assets`    | A wrangler config with `assets.directory`                    | Builds, writes into the assets directory and deploys with your own wrangler config, so your Worker code and bindings stay in charge |
| `sveltekit-static` | A Svelte config using `@sveltejs/adapter-static`             | Runs the build; output is adapter-static's directory                                                                                |
| `vite-prerender`   | A Vite config and an empty SPA mount point in `index.html`   | Builds, then renders `/` and every llms route (or `prerender.routes`) with headless Chromium so pages carry real text               |
| `command`          | The `build-command` input is set                             | Runs it (no shell) and reads `output-dir`; works for any language                                                                   |
| `python`           | `tools/build.py`, or `pyproject.toml` with a `build-command` | Runs the build; attaches markdown sources it finds to their pages                                                                   |
| `npm`              | `package.json` with a `build` script                         | Runs the script; output from `output-dir` or the generator's config                                                                 |
| `make`             | A Makefile with a `build` target                             | Runs `make build`; reads `output-dir`                                                                                               |
| `static`           | `output-dir/index.html` exists and no `build-command`        | Nothing to build: the committed output is used as is                                                                                |

## How are build commands run?

Commands run as an argument vector, never through a shell. Quotes group words; pipes, redirects, `;`, `&`, `$` and globs are rejected, so an input can never inject a command. Put multi-step builds in a script and call it.

Pages are every `.html` file in the output except `404.html`. A page's `lastmod` is the date of the last commit that touched it (or its markdown source), never the time of the build.

```json
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "author": {
    "@type": "Organization",
    "name": "Avarok Cybersecurity",
    "sameAs": [
      "https://github.com/Avarok-Cybersecurity"
    ],
    "url": "https://avarok.net"
  },
  "description": "How GeoHarness detects and builds static sites, npm, SvelteKit, Vite single-page apps, Python, Make and existing Workers, and how build commands run without a shell.",
  "inLanguage": "en",
  "isPartOf": {
    "@type": "WebSite",
    "name": "GeoHarness",
    "url": "https://geo.avarok.net/"
  },
  "name": "Adapters and runtime detection · GeoHarness",
  "url": "https://geo.avarok.net/docs/adapters/"
}
```
