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
- A blocked write with a suggested fix.
- A corrected write that is admitted.
- Replay over the local WAL.
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
- Use Go 1.25 or newer for source builds.
- If ports
9621or9622are busy, use the smoke script or pass different--addrand--upstreamvalues. - The smoke script uses ports
19621and19622by default. Override withWRITEFENCE_SMOKE_STORE_PORTandWRITEFENCE_SMOKE_PROXY_PORT. - Set
WRITEFENCE_DATA_DIR=/path/to/dirto keep logs and WAL files in a predictable directory. - In Docker Compose, only the WriteFence proxy is published to the host. The mock store stays internal so writes still pass through admission.
- Semantic quarantine requires embeddings plus Qdrant. Without those optional services, deterministic rules and replay still work.
- On Windows, use WSL or Docker for the alpha. Native Windows release archives are planned after the alpha.