Quick Start
This guide gets HiveGuard running locally, uploads a small dataset, and confirms that labels are being collected.
Prerequisites
- Docker + Docker Compose
- Python 3.11+ (for the CLI)
- A small dataset to label (a few image URLs, text snippets, or audio clips)
1. Clone and configure
git clone https://github.com/your-org/hiveguardcd hiveguardcp .env.example .envEdit .env:
TARGET_URL=http://httpbin.org/anything # the service to sit in front ofSECRET_KEY=change-me-in-productionDASHBOARD_USERNAME=adminDASHBOARD_PASSWORD=changemeTARGET_URL is whatever application you want HiveGuard in front of. It just needs to be an HTTP service that gets real (or test) traffic. The labeling happens on the way in.
2. Start the stack
docker compose up --build -dHiveGuard starts on port 8000. Check it’s up:
curl http://localhost:8000/api/v1/health# {"status":"ok","version":"0.2.0"}3. Install the CLI
pip install hiveguard-cli# or from the repo:uv pip install -e apps/cliConfigure it to point at your local instance:
hiveguard auth configure# Base URL [http://localhost:8000]:# Dashboard username: admin# Dashboard password: changeme4. Create an API key
hiveguard keys create my-first-key# Raw key (store this — shown once): hg_xxxxxxxxxxxxxxxxexport HIVEGUARD_API_KEY=hg_xxxxxxxxxxxxxxxx5. Create a dataset and upload items
A dataset groups items of the same type. Create one first:
hiveguard datasets create "My Images" --modality image# id: 00000000-0000-0000-0000-000000000001Then prepare a JSONL file of items to label:
{"dataset_id": "00000000-0000-0000-0000-000000000001", "data_ref": "https://example.com/img1.jpg", "modality": "image"}{"dataset_id": "00000000-0000-0000-0000-000000000001", "data_ref": "https://example.com/img2.jpg", "modality": "image"}{"dataset_id": "00000000-0000-0000-0000-000000000001", "data_ref": "https://example.com/img3.jpg", "modality": "image"}Upload them:
hiveguard items upload items.jsonl# Uploading 3 items... ✓ 3 created6. See a challenge
This is what a visitor experiences. When HiveGuard intercepts a request, it generates a challenge from your dataset:
curl -H "X-HiveGuard-Key: $HIVEGUARD_API_KEY" \ http://localhost:8000/api/v1/challenge/generateYou’ll get back a JSON challenge containing one of your items. That’s the labeling task — the visitor answers it, and their answer flows into the consensus engine.
7. Check the dashboard
Open http://localhost:8000/dashboard in your browser (admin / changeme).
The Datasets tab shows your uploaded items. The Metrics tab shows how many challenges have been served and how many labels are in progress. As traffic flows through, Labeled shows finalized labels ready for export.
What’s next
- Uploading Training Data — supported formats, batch sizes, validation
- Exporting Labels — download finalized labels as CSV, JSON, or JSONL
- Concepts: How It Works — the full labeling loop explained
- CLI Reference — automate uploads and exports from scripts