Developer workflow
Development against any is one long-running server process on your machine and whatever clients you point at it. This page is the loop you will repeat: init, run, call, inspect.
1. Init an account
any init
Creates ~/.any/ (mode 0700), generates an account, writes ~/.any/<accountId>/wallet.key, and prints the BIP-39 mnemonic to stderr once. Back it up. Re-running any init when an account exists is a no-op that lists them.
To attach a second machine to the same account, restore from the phrase — the account id is the same, the device key is fresh:
any init --mnemonic-stdin < phrase.txt # never copy wallet.key between machines
2. Run the server
any run # foreground, 127.0.0.1:7001
any run --addr 127.0.0.1:0 # ephemeral port; prints "LISTENING <addr>" on stdout
any run --account <id> # pick one when the data dir holds several
any run --mode managed # a host-owned server: phrase per launch, control token
any run is foreground-only: run it in a terminal, tmux, or a user service. It never creates a wallet — on a fresh data dir it starts unauthorized and every route except /v1/health, /v1/shutdown, /v1/openapi.json, /v1/auth answers 401 auth.required until POST /v1/auth (or any auth login) boots an account in place. The default standalone mode is the one to develop against; managed is how an app shell embeds the server (Accounts).
Stop it with Ctrl-C or:
any stop # finds the server by its account lock, SIGTERM —
# drains in-flight, 10 s deadline
3. Check health
any status # GET /v1/health
{ "status": "ok", "version": "any v0.1.2 (commit 1a2b3c4, built 2026-09-09)",
"startedAt": "2026-08-24T09:00:00Z", "networkId": "N83gJpVd…",
"account": "A8tR…", "bootstrapping": false }
networkId is the any-sync network the server joined (Networks). bootstrapping: true means the background space-loading pass is still running; the server is serving already. crdtVersion ({supported, stored, newer}) is the account's data-model version: every release stamps its own on first open and the mark only rises, so a release older than the data refuses to boot (409 sdk.crdt_version_newer) or, when the raise arrives from another device while running, turns read-only — newer: true is the client's "upgrade required" signal.
4. Call it
Everything is http://127.0.0.1:7001/v1/… with JSON bodies. Pick whichever client fits:
| Client | When |
|---|---|
curl |
Exploring; the curl quickstart creates a space, an object, and a subscription. |
any … CLI |
Scripts and shells — subcommands mirroring the endpoints, pretty JSON on stdout, jq-friendly (CLI quickstart). |
| Web UI | http://127.0.0.1:7001/ui — a debug harness with a space picker, object tree, chat, members, and a network log. Disable with webUI.enabled: false. |
| Your app | Any HTTP client; live updates are SSE over a streaming POST (JavaScript, Python). |
any --verbose space get $SPACE # log the HTTP exchange to stderr
any --addr 127.0.0.1:7002 status # a second server on another port
Without --addr the CLI finds the server serving the data dir's account through its server.addr file, so an ephemeral-port server needs no flag. When the server is down the CLI exits 3 with start it with any run in another terminal; it never auto-starts one.
5. Inspect
- Sync —
any sync-status space $SPACE,any sync-status subscribe. - Search index —
any search $SPACE "reranker"; checkvectorStatusin the reply. - Raw datasets —
any query-subscribe $SPACE $OBJ --dataset chat_messages --limit 20 --sort='-_ver.id'prints one JSON line per SSE frame. - Diagnostics —
any debug space $SPACE/any debug object $SPACE $OBJdump head-sync counters and per-object tree state (unstable output, diagnostic only). - Logs — one stream on stderr through the SDK logger;
--log-level debugorANY_LOG_LEVEL=debug. Add an absolute file path underlog.outputPathsinconfig.yamlto tee to a file (Debugging).
The data dir
~/.any/ # dataDir — a ROOT that can hold several accounts
├── config.yaml # optional
├── models/ # shared embedder model cache (~600 MB, downloaded once)
└── <accountId>/
├── wallet.key # standalone: account + device keys (0600)
├── device.key # managed: this device's key only (0600)
├── server.lock # single-instance lock (an OS file lock)
├── server.pid # holder's pid, for error messages only
├── server.addr # holder's bound address, read by the CLI
├── sdk/ # any-store databases — owned by the SDK
├── files/ # file bytes, one CARv2 per root CID
└── index/ # local search index — derived, safe to delete
Two servers may share a root as long as they serve different accounts on different ports. The index/ directory is derived state: removing it with the server stopped is safe, and the next start re-indexes every space from the change feed. Never delete files/ by hand — a file that has not been backed up yet has its only copy there (Data dir).
Config precedence is file → ANY_* env → flags; the file is looked up at --config, $XDG_CONFIG_HOME/any/config.yaml, ~/.config/any/config.yaml, then <data-dir>/config.yaml (Configuration).
Building from source
make build # → bin/any (+ bin/llamacpp for the local embedder)
go test ./...
make build adds the local embedder (-tags llamacpp) and its llama.cpp libraries; a bare go build serves full-text search, and vector search only through an online provider named by index.openai.*. go test ./... runs everything except the local-embedder tests, which make test adds. On NixOS run builds and the binary through nix develop -c … so the local embedder finds libffi (Builds and CI).
Note. An unconfigured binary syncs against the production network. For experiments use a staging or local nodeconf via
ANY_NETWORK_NODECONF_PATH, or the embedded placeholder that joins no network at all (Networks).