datahub-dev

Development rules for DataHub that require using a project command-line wrapper for setup, building, testing, and feature-flag operations.

In plain words
What is it for?
They help set up the project, start services, rebuild containers, run tests, use frontend hot reload, and manage feature flags.
Why use it?
They give agents one consistent workflow for working across DataHub’s Python, Java, and frontend parts.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/datahub-project/datahub/datahub-dev
Clone the repo
git clone --depth 1 https://github.com/datahub-project/datahub

Made for: Cursor.

Per session 940 This file is loaded in full into every session.
When invoked 940 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00940 $0.00940
Opus 5 $0.00470 $0.00470
Sonnet 5 $0.00188 $0.00188
Haiku 4.5 $0.00094 $0.00094

Measured yesterday against content hash 6dba60e0c224, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

datahub-dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/datahub-dev.mdc · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DataHub Agent Workflow

datahub-dev CLI Tool

A stdlib-only Python CLI for agent-driven development. No venv needed — runs with system python3.

Always use the shell wrapper as the entry point:

scripts/dev/datahub-dev.sh <command>

Run scripts/dev/datahub-dev.sh --help to see all available subcommands (start, setup, frontend, status, wait, rebuild, test, flag list/get, env, sync-flags, reset, nuke).

End-to-End Workflow

  1. Setup (once): scripts/dev/datahub-dev.sh setup — installs Python dev environment (provides datahub CLI). For frontend work, also run scripts/dev/datahub-dev.sh setup frontend.
  2. Start: scripts/dev/datahub-dev.sh start
  3. Code: Make changes to Java/Python/frontend code
  4. Rebuild: scripts/dev/datahub-dev.sh rebuild --wait
  5. Test: scripts/dev/datahub-dev.sh test <test-path>
  6. Iterate: Repeat steps 2–4

Frontend hot-reload: Run scripts/dev/datahub-dev.sh frontend to start the React dev server with hot-reload (instead of rebuilding the frontend container).

Module-to-Container Mapping

Source directory Container
metadata-service/ datahub-gms
datahub-graphql-core/ datahub-gms
metadata-io/ datahub-gms
datahub-frontend/ datahub-frontend-react
metadata-jobs/mce-consumer-job/ datahub-mce-consumer
metadata-jobs/mae-consumer-job/ datahub-mae-consumer
metadata-models/ All (triggers full rebuild + code generation)

Environment Variables

Set any env var for DataHub containers via env set + env restart:

scripts/dev/datahub-dev.sh env set KEY=VALUE
scripts/dev/datahub-dev.sh env restart       # required — changes take effect on restart
scripts/dev/datahub-dev.sh env list           # show current vars and pending_restart status

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 97 lines · 940 tokens per session scan A 6dba60e0c224

Subscribe to this mod's changes

datahub-dev is a cursor rule published in the GitHub repository datahub-project/datahub (12,618 stars, last pushed yesterday), licensed Apache-2.0. It adds 940 tokens to every session, about $0.0047 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.