Local alpha

Run WriteFence locally.

This quickstart runs WriteFence with a tiny mock memory store. It does not require LightRAG, Qdrant, Ollama, auth, billing, or hosted services.

1. Run the smoke script

./demo/smoke-quickstart.sh

The smoke script builds the binaries, starts the mock store and proxy on temporary ports, checks the local UI, verifies blocked and allowed writes, runs replay, and stops background processes.

2. Build the binaries manually

go build -o bin/writefence ./cmd/writefence
go build -o bin/writefence-cli ./cmd/writefence-cli

3. Start the mock memory store

go run ./demo/mock-memory-store.go -addr 127.0.0.1:9621

The mock store accepts POST /documents/text and keeps accepted writes in a local JSONL file under /tmp/writefence-mock-store by default.

4. Start WriteFence

env WRITEFENCE_DATA_DIR=/tmp/writefence-alpha ./bin/writefence --addr 127.0.0.1:9622 --upstream http://127.0.0.1:9621

Open the local operator UI at http://127.0.0.1:9622/_writefence.

5. Run the demo flow

env WRITEFENCE_DATA_DIR=/tmp/writefence-alpha WRITEFENCE_WAL=/tmp/writefence-alpha/writefence-wal.jsonl ./demo/canonical-demo.sh
Semantic quarantine requires embeddings plus Qdrant. Without those optional services, the demo prints a note and continues with deterministic local rules.

6. Load deterministic UI data

WRITEFENCE_DEMO_OVERWRITE=1 ./demo/ui-demo-data.sh /tmp/writefence-ui-demo
env WRITEFENCE_DATA_DIR=/tmp/writefence-ui-demo ./bin/writefence --addr 127.0.0.1:9622 --upstream http://127.0.0.1:9621

Docker Compose

docker compose up --build

Open http://127.0.0.1:9622/_writefence. Stop the stack with docker compose down. To start fully fresh, use docker compose down -v.

If host port 9622 is busy:

WRITEFENCE_PORT=19622 docker compose up --build

Troubleshooting