> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ancha.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# Open-Meteo

> A replica of Open-Meteo's forecast and geocoding API with a synthetic climate for ten seeded places. No API key.

The Open-Meteo replica implements the forecast and geocoding endpoints of Open-Meteo's v1 API. Weather comes from a synthetic climate for each seeded place, driven by the world's simulated clock. Its key is `open-meteo`.

## Connect

| Variable | Value |
| - | - |
| `OPEN_METEO_API_URL` | Base URL for `/v1/forecast`. |
| `OPEN_METEO_GEOCODING_URL` | Base URL for `/v1/search`. The real service hosts geocoding separately; the replica serves both from one URL. |

Open-Meteo needs no key. `ancha connect open-meteo` has no snippet in 0.1.1; call the API directly:

```js Node theme={null}
const url = new URL(process.env.OPEN_METEO_API_URL.replace(/\/+$/, '') + '/v1/forecast');
url.search = new URLSearchParams({ latitude: '37.77', longitude: '-122.42', current: 'temperature_2m,wind_speed_10m' });
const forecast = await (await fetch(url)).json();
```

## Endpoints

| Method | Path | Behavior |
| - | - | - |
| `GET` | `/v1/forecast` | Current, hourly and daily variables for one location. The nearest seeded place answers for any coordinate. |
| `GET` | `/v1/search` | Places by name, from the seeded places only. |

Both are partial. Units are metric and times are ISO 8601. Daily variables need `timezone` (`auto` or an IANA name), as on the real API; without it the request fails with HTTP 400. Forecasts reach 16 days ahead and 7 days back. Historical archives and marine and air-quality data are not implemented and return HTTP 501 with `x-ancha-gap: 1`.

## Starter data

The `open-meteo-starter` dataset has ten places, each with its own climate:

| Place | ID | Country | Time zone |
| - | - | - | - |
| San Francisco | `5391959` | United States | America/Los\_Angeles |
| New York | `5128581` | United States | America/New\_York |
| London | `2643743` | United Kingdom | Europe/London |
| Berlin | `2950159` | Germany | Europe/Berlin |
| Tokyo | `1850147` | Japan | Asia/Tokyo |
| Sydney | `2147714` | Australia | Australia/Sydney |
| Portland | `5746545` | United States | America/Los\_Angeles |
| Chicago | `4887398` | United States | America/Chicago |
| Toronto | `6167865` | Canada | America/Toronto |
| Singapore | `1880252` | Singapore | Asia/Singapore |

## Checks

Open-Meteo is read-only and has no state checks. Use trace checks, for example `{ called: "GET /v1/forecast" }`.

## Limits

* One location per request.
* Synthetic weather; it does not match real observations.
* Open-Meteo is not part of a preset. Add it with `--tools open-meteo` or `twins: [open-meteo]`.


## Related topics

- [Tools](https://docs.ancha.io/tools/overview.md)
- [Changelog](https://docs.ancha.io/changelog.md)
- [Test file (scene.yaml)](https://docs.ancha.io/reference/test-file.md)
- [Introduction](https://docs.ancha.io/index.md)
- [ancha connect](https://docs.ancha.io/cli/connect.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.