Skip to main content
KelpMesh

Code-native data transformation — SQL and Python models, no Jinja required.

License: Apache 2.0 Python 3.11+

pip install KelpMesh
kelpmesh init my_project && cd my_project
kelpmesh run

📖 Full user guide at docs/user-guide.md — covers CLI, Studio, VS Code, migration, and all features.


Why KelpMesh?

dbt models are Jinja-templated SQL. Your files look like this:

{{ config(materialized='table') }}
SELECT customer_id, {{ surrogate_key(['order_id','sku']) }} AS id
FROM {{ ref('stg_orders') }}
WHERE {{ is_incremental() }}

No IDE autocomplete. No AI assistant support. Weeks to learn.

KelpMesh models are plain SQL:

-- materialized: table
SELECT customer_id, surrogate_key(order_id, sku) AS id
FROM stg_orders
WHERE is_incremental()

Works in every SQL editor, every AI tool, every linter — on day one.


Features

SQL engine

  • Pure SQL models — no Jinja; files work natively in DBeaver, DataGrip, Cursor, any AI tool
  • 32 built-in SQL macrossurrogate_key, safe_divide, datediff, haversine, generate_surrogate_key, and 27 more; called as plain SQL functions, expanded at compile time
  • Python modelsdef model(dbt, session) interface; return SQL string or pandas DataFrame
  • All materializationstable, view, incremental (merge/append), ephemeral, SCD Type 2 snapshots
  • 9 warehouse adapters — DuckDB · Postgres · Snowflake · BigQuery · Databricks · Redshift · Microsoft Fabric · MySQL · Trino
  • Incremental merge — consistent MERGE/UPSERT API across all 9 warehouses
  • kelpmesh plan — Terraform-style impact analysis before any warehouse query runs
  • kelpmesh compile — render macros and substitutions without touching the warehouse

CI/CD and version control

  • kelpmesh ci — one command: diff → plan → run changed models → test → post PR comment
  • GitHub PR comments — posts a structured run report on every PR; updates (not spams) existing comment
  • GitLab MR comments — same, auto-detected from CI environment variables
  • Bitbucket PR comments — same
  • Ready-to-use CI templates.github/workflows/ci.yml, .gitlab-ci.yml, bitbucket-pipelines.yml included

Scheduling and orchestration

  • Built-in cron schedulerkelpmesh schedule start; cron syntax + every 1h intervals; no Airflow required
  • Dagster integrationKelpMeshResource, @asset, @op, schedule sensor
  • Prefect integrationKelpMeshBlock, @task, @flow, pre-built standard flow
  • AirflowKelpMeshOperator, DagFactory-compatible

Security (free in Core)

  • PII auto-classification — 7 types: email, phone, SSN, NPI, card, IP, DOB
  • Row-level security (RLS) — policy-based access control applied per model
  • Column masking — per-column masking strategy; format-preserving options
  • GDPR right-to-erasurekelpmesh security erasure deletes subject data across all models
  • Immutable audit log — append-only JSONL; every execution recorded
  • Secret scanning — scans for hardcoded credentials in SQL files
  • Zero telemetry — import blocklist enforced in code; no phone-home possible

Tooling

  • VS Code extension — 37 SQL snippets, model tree view, CodeLens run/test/preview buttons, plan panel
  • dbt migrationkelpmesh import converts models, tests, sources, seeds, snapshots
  • Data mesh — cross-project ref(), public/private access contracts, column guarantees
  • Semantic layer — metric definitions, BI export for LookML, Tableau, PowerBI, Qlik

Quickstart

# Install
pip install KelpMesh

# Create a project
kelpmesh init my_project
cd my_project

# Run all models
kelpmesh run

# Preview 100 rows from a model
kelpmesh preview orders

# See what would change before running
kelpmesh plan

# Test all models
kelpmesh test

# Run + test in one command
kelpmesh build

# Generate documentation site
kelpmesh docs

CI/CD — one line in any pipeline

kelpmesh ci    # detects changed models, runs them, tests, posts PR comment

In GitHub Actions — add to your workflow:

- name: KelpMesh CI
  run: kelpmesh ci
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Every PR gets a structured report showing exactly which models were affected, what ran, and whether tests passed — updated automatically on every push.


Packages

Package What it is Price
pip install KelpMesh Full CLI engine — 9 adapters, 32 macros, scheduler, security, CI/CD Free forever · Apache 2.0
pip install kelpmesh-studio Core + browser dashboard (DAG viz, run history, team features) Free for personal use · Freemium for commercial

KelpMesh will never have features gated behind a paid tier.


Studio (browser dashboard)

pip install kelpmesh-studio
kelpmesh-studio          # opens http://localhost:8765
Tier Price Limits
Free — personal use $0 1 user · 3 projects · 50-run history
Pro — commercial teams $29/user/mo 5 seats · unlimited projects · RBAC · API keys · Git sync · AI BYOK
Business — large orgs $79/user/mo Unlimited seats · SSO · BYOC · full audit log
Enterprise Contact us On-premises · custom SLA · dedicated support

Activate with:

export KELPMESH_STUDIO_LICENSE_KEY=km_pro_<your-key>
kelpmesh-studio

Warehouse support

# kelpmesh.yml
warehouse:
  type: duckdb          # zero install, great for local development
  path: ./warehouse.db

# Per-warehouse extras:
# pip install KelpMesh[postgres]
# pip install KelpMesh[snowflake]
# pip install KelpMesh[bigquery]
# pip install KelpMesh[databricks]
# pip install KelpMesh[redshift]
# pip install KelpMesh[mysql]
# pip install KelpMesh[trino]
# pip install KelpMesh[all-warehouses]   # everything at once

Security

# Scan for hardcoded credentials
kelpmesh scan secrets --fail

# Classify PII columns in your warehouse
kelpmesh security classify --table orders

# Apply column masking by role
kelpmesh security mask --table users --columns email,phone --role viewer

# GDPR erasure
kelpmesh security erasure --id-col email --id-value user@example.com

# View audit trail
kelpmesh security audit

Migrate from dbt or SQLMesh

KelpMesh auto-detects the source project format. No --from flag needed in most cases.

# From dbt
kelpmesh import ./dbt-project --output ./kelpmesh-project

# From SQLMesh
kelpmesh import ./sqlmesh-project --output ./kelpmesh-project

# Explicit (if auto-detection doesn't pick it up)
kelpmesh import ./my-project --from dbt
kelpmesh import ./my-project --from sqlmesh

dbt → KelpMesh

dbt KelpMesh
{{ ref('model') }} plain table name (auto-resolved by AST)
{{ source('src', 'tbl') }} plain table name
{{ config(materialized='table') }} -- { materialized: table } header
schema.yml tests (not_null, unique, accepted_values, relationships) SQL assertion files in tests/
Seeds (CSV) seeds/*.sql with VALUES blocks
Snapshots models/snapshots/*.sql with snapshot header
dbt packages Built-in SQL macros or kelpmesh-utils

SQLMesh → KelpMesh

SQLMesh KelpMesh
MODEL (name ..., kind FULL) block -- { materialized: table } header
kind INCREMENTAL_BY_UNIQUE_KEY (unique_key id) -- { materialized: incremental, unique_key: id }
grain payment_id -- { unique_key: payment_id }
audits (UNIQUE_VALUES(...), NOT_NULL(...)) SQL assertion files in tests/
cron '@daily' -- { cron: @daily }
@execution_dt CURRENT_DATE
@start_dt / @end_dt CURRENT_DATE - INTERVAL '7 days' / CURRENT_DATE
YAML unit test fixtures (inputs/outputs) Smoke tests (recreate with kelpmesh create_test)
audits/*.sql tests/*.sql SQL assertions
config.py / config.yaml kelpmesh.yml

SQLMesh note: SQLMesh YAML unit tests use an input/output fixture format that requires running a live warehouse query to generate. After import, use kelpmesh create_test <model> to recreate them properly.


Integrations

Tool How
GitHub Actions kelpmesh ci + built-in workflow at .github/workflows/ci.yml
GitLab CI kelpmesh ci + template at .gitlab-ci.yml
Bitbucket Pipelines kelpmesh ci + template at bitbucket-pipelines.yml
Dagster from kelpmesh_dagster import KelpMeshResource
Prefect from kelpmesh_prefect import KelpMeshBlock
Airflow pip install kelpmesh-airflow
VS Code Search "KelpMesh" in extensions marketplace
pre-commit .pre-commit-hooks.yaml included

Community


Development

git clone https://github.com/RoyPulseAI/kelpmesh
cd kelpmesh
pip install -e ".[dev]"
pytest tests/ -v

See CONTRIBUTING.md.


Author

KelpMesh is designed and built by Roy Pulse AI (@RoyPulseAI).

License

KelpMesh — Apache 2.0
kelpmesh-studio — Apache 2.0 (free tier) · Commercial license (Pro/Business/Enterprise)

See LICENSE.

Release files for KelpMesh 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for KelpMesh 1.0.9
File Size Uploaded
kelpmesh-1.0.9.tar.gz 181.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for KelpMesh 1.0.9
File Interpreter ABI Platform
kelpmesh-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 420.5 kB

Release files / kelpmesh-1.0.9.tar.gz

Download URL kelpmesh-1.0.9.tar.gz
Size 181.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9d497280fce94f77825a39e03b3348207354a262d27403d5ad76b5917cc36cf0
BLAKE2b-256 checksum
How to use checksums
1ea554fe9c87e9673c911a3cd12f5ee26c6eedac380fac7b2318b638503c75fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Release files / kelpmesh-1.0.9-py3-none-any.whl

Download URL kelpmesh-1.0.9-py3-none-any.whl
Size 239.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d3b9e7e46ae8dffa618d6ec2fa4029feadf363792845682e25baa577fd995a2
BLAKE2b-256 checksum
How to use checksums
b3d4128e2dbb23806cc87d44bed6da26d93f18cec854f41d4d0f005c44322139
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page