test-locally

A command that builds OpenMetadata and starts a complete local copy of it in Docker, including the server, web interface, databases, search, and Airflow.

In plain words
What is it for?
Use it to generate models, build connector and application code, start the local OpenMetadata services, and open the interface at localhost:8585.
Why use it?
It removes the need to build and start each part separately when checking a new connector. You can test the connector in a browser using sample data and search indexing.

Command

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 commands/open-metadata/openmetadata/test-locally
Clone the repo
git clone --depth 1 https://github.com/open-metadata/OpenMetadata
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 727 The whole file, excluding the scripts and references it only reads on demand.
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.00026 $0.00727
Opus 5 $0.00013 $0.00364
Sonnet 5 $0.00005 $0.00145
Haiku 4.5 $0.00003 $0.00073

Measured 3d ago against content hash 2da5fa400fb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-locally 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 3d ago.

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.

skills/commands/test-locally.md · 108 lines

How it starts

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

Test Connector Locally

Build, deploy, and test a connector in a full local OpenMetadata stack.

What This Does

  1. Runs code generation (Python Pydantic models from JSON Schema)
  2. Builds the Java backend + UI (unless --skip-maven)
  3. Builds the ingestion Docker image with your new connector
  4. Starts all services: MySQL/PostgreSQL, Elasticsearch, OpenMetadata Server, Airflow
  5. Loads sample data and triggers search indexing
  6. Opens the UI at http://localhost:8585

Steps

Step 1: Activate the environment

source env/bin/activate

Step 2: Run code generation

make generate

This generates Python Pydantic models from the JSON Schema you created/modified.

Step 3: Build and deploy

Full build (first time, or if Java/UI changes were made):

./docker/run_local_docker.sh -m ui -d mysql -s false -i true -r true

Skip Maven (ingestion-only changes — much faster, ~2-3 minutes):

./docker/run_local_docker.sh -m ui -d mysql -s true -i true -r false

Step 4: Wait for services

The script automatically:

  • Waits for Elasticsearch to be healthy
  • Triggers sample data DAGs
  • Triggers search re-indexing

This takes 3-5 minutes on first run.

Step 5: Test in the UI

  1. Open http://localhost:8585
  2. Go to SettingsServices → select your service type (Database, Dashboard, etc.)
  3. Click Add New Service
  4. Select your connector from the dropdown
  5. Fill in connection details and click Test Connection
  6. If test passes, run metadata ingestion

Ports

Service URL
OpenMetadata UI + API http://localhost:8585
Airflow http://localhost:8080 (admin / admin)
MySQL localhost:3306
Elasticsearch http://localhost:9200

Tear Down

cd docker/development && docker compose down -v

Rebuild After Changes

If you modify connector code and want to redeploy:

# Stop existing containers
cd docker/development && docker compose down

# Rebuild with skip-maven (fast)
cd ../.. && ./docker/run_local_docker.sh -m ui -d mysql -s true -i true -r false

Read the full file on GitHub · 108 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. 3d ago First seen · 108 lines · 26 tokens per session scan A 2da5fa400fb1

Subscribe to this mod's changes

test-locally is a command published in the GitHub repository open-metadata/OpenMetadata (15,059 stars, last pushed today), licensed Apache-2.0. It adds 26 tokens to every session and 727 once invoked, about $0.0001 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.