Source: https://docs.any.org/index.html
# Any
A reactive, **local-first** database. Documents live on your devices, merge as CRDTs, sync end-to-end encrypted, and answer Mongo-style queries with live subscriptions — online or not. Chat and a block editor are built in as CRDT modules, and anyrt runs sandboxed Python programs, scheduled jobs, and agents right alongside your data.
**Developer preview.** APIs may change; MIT licensed. [Preview status](https://docs.any.org/understanding/preview.md.txt).
local-first e2e encrypted crdt mongo queries sse live queries wasm-sandboxed programs single go binary
## Get started
The block below is the whole loop; [Install](https://docs.any.org/quickstart/install.md.txt) explains each line. A binary with nothing configured joins the **production** any-sync network — [Networks](https://docs.any.org/quickstart/networks.md.txt) if you want a sandbox.
```sh
$ export ANY_DATA_DIR="$HOME/.any-demo"
$ export ANY_INDEX_EMBEDDER=local
$ any init
A new wallet was generated. Write down the recovery phrase below.
You will NOT see it again. Anyone with this phrase owns the account.
{
"accountId": "A8tR…",
"created": true
}
$ any run &
LISTENING 127.0.0.1:7001
$ until any status >/dev/null 2>&1; do sleep 0.2; done
$ API=http://127.0.0.1:7001/v1
$ S=$(curl -fsS $API/spaces -H 'content-type: application/json' -d '{"name":"notes"}' | jq -er .id)
$ curl -fsS $API/spaces/$S/objects -H 'content-type: application/json' \
-d '{"type":"page","initialProperties":{"any":{"name":"hello"}}}'
{
"objectId": "bafyrei…"
}
$ curl -fsSN $API/spaces/$S/objects/query/subscribe -H 'content-type: application/json' \
-d '{"sort":["-modifiedAt"],"limit":20}'
event: ready
data: {}
event: snapshot
data: {"records":[{"id":"bafyrei…","any":{"type":"page","name":"hello"},…}]}
event: changes
data: [{"versionId":"…","updated":[…]}]
```
### Database
Spaces of objects and datasets, typed properties, Mongo-style filters, aggregation pipelines, version history — every byte CRDT-merged and encrypted.
[Learn more](https://docs.any.org/database/index.md.txt)
### Sync & realtime
Windowed live queries over SSE, head-sync with peers, sync status, an ephemeral event bus, end-to-end encrypted push.
[Learn more](https://docs.any.org/realtime/index.md.txt)
### Runtime
Python programs in a wasm cage with a recorded effect boundary; cron / once / event triggers pinned to a device; the bao agent.
[Learn more](https://docs.any.org/programs/index.md.txt)
## Everything
[**1. Understanding any** — Local-first, encryption, CRDT consistency, the invariants.](https://docs.any.org/understanding/index.md.txt)
[**2. Quickstart** — Install, first space in curl, CLI, JS, Python, mobile, anyrt.](https://docs.any.org/quickstart/index.md.txt)
[**3. Tutorial** — Objects, properties, datasets, apps — four parts that build on each other.](https://docs.any.org/tutorial/index.md.txt)
[**4. Database** — Spaces, objects, types, collections, reading & writing, aggregation, history.](https://docs.any.org/database/index.md.txt)
[**5. Realtime** — Subscribe, sync status, space list, event bus.](https://docs.any.org/realtime/index.md.txt)
[**6. Auth & identity** — Mnemonic accounts, devices, identities directory.](https://docs.any.org/auth/index.md.txt)
[**7. Collaboration** — Members, invites, ACL, one-to-one spaces, bundles.](https://docs.any.org/collaboration/index.md.txt)
[**8. Modules** — Chat, block editor, the page type, any:// links and backlinks.](https://docs.any.org/types/index.md.txt)
[**9. Files** — Encrypted attachments, durability, cache.](https://docs.any.org/files/index.md.txt)
[**10. Search** — Full-text, vector, hybrid — with a local embedder.](https://docs.any.org/search/index.md.txt)
[**11. Notifications** — E2E push and process progress.](https://docs.any.org/notifications/index.md.txt)
[**12. Programs** — Sandboxed Python, effects, traces that replay bit-exact.](https://docs.any.org/programs/index.md.txt)
[**13. Scheduling** — Cron, once and event triggers as synced records.](https://docs.any.org/scheduling/index.md.txt)
[**14. Agents** — bao: conversations, tools, memory, connectors.](https://docs.any.org/agents/index.md.txt)
[**15. Operations** — Server lifecycle, config, networks, builds.](https://docs.any.org/operations/index.md.txt)
[**16. Testing** — e2e patterns and the kernel-fidelity harness.](https://docs.any.org/testing/index.md.txt)
[**17. Reference** — HTTP API, CLI, events, errors, config, glossary.](https://docs.any.org/reference/index.md.txt)
## Why local-first
> **Why it matters.** A hosted backend is available exactly when its vendor is. In any every device holds the full state of every space it belongs to, every write lands locally first, and peers converge later through encrypted sync — the network is an optimisation, not a dependency. Relay nodes store ciphertext and can't read a single document.
- **Reactive** — every read has a live form: `/query` gives a snapshot, `/query/subscribe` keeps a window of results current.
- **Mongo-style queries** — `$eq`, `$in`, `$regex`, `$text`, nested paths, array matching, `$group`/`$unwind` pipelines.
- **CRDT** — concurrent edits from any number of devices merge deterministically; versions are content-addressed changes you can diff and view.
- **Built-in messenger and editor** — chat messages with reactions, mentions and read tracking; block documents with a markdown bridge; ready-made apps (wiki, journal, contacts, CRM) installed from a server catalog.
- **Runtime in your data** — programs, triggers and agent memory are records in your encrypted space, not rows in a vendor's database.
Also available as [`llms.txt`](https://docs.any.org/llms.txt) for language models.