Cube is a free, open source data engineering & integration project written in Rust and released under a custom open-source licence. It has 20,857 GitHub stars, 2,138 forks and 1,185 open issues, and was last pushed 3 hours ago. On this registry it ranks #2 of 39 tracked projects in Data Engineering & Integration, with 5 head-to-head comparisons available. It gained 45 stars over the last 6 tracked days.

Cube — Unify data models and metrics across your entire stack

What is Cube?

What it is

Cube Core is an open-source semantic layer for AI, BI, and embedded analytics. It lives in the data analytics and data engineering ecosystem for SQL warehouses, BI tools, applications, and AI agents. It lets teams define metrics, dimensions, joins, and access rules once in code, then expose them through SQL, REST, and GraphQL APIs. It is headless and ships no user interface.

The concrete problem is fragmented business logic. Many BI tools rely on a semantic layer, but most semantic layers are proprietary and tightly coupled to one platform. Teams often rebuild the same metrics, dimensions, and access rules in each tool. Cube Core provides an open, standalone semantic layer that any analytics application or AI agent can consume through standard APIs. This lets teams define metrics once and reuse them across internal BI, embedded analytics, and agentic analytics.

Key capabilities

  • Defines metrics, dimensions, joins, and access rules in code, so the same business logic can be reused.
  • Exposes the model through SQL, REST, and GraphQL APIs, so BI tools, applications, and agents can query the same definitions.
  • Works with SQL data sources, including Snowflake, Databricks, BigQuery, Presto, Amazon Athena, and Postgres.
  • Provides a built-in relational caching engine for sub-second latency and high concurrency on API requests.
  • Supports agentic and conversational analytics use cases through APIs that AI agents can consume.

Who uses it and how

  • Analytics teams use it as a shared metrics layer for internal BI, so dashboards and reports draw from one definition set.
  • Product teams use it for embedded analytics, exposing metrics, dimensions, and access rules to customer-facing applications through APIs.
  • Data engineers use it to connect BI tools and agents to warehouses and query engines without rewriting joins and access rules per tool.
  • AI application builders use it for agentic analytics, letting agents query metrics through SQL, REST, or GraphQL APIs.

Getting started

Run Cube Core locally or self-host it with Docker, using the cubejs/cube image with ports 4000 and 15432, a mounted configuration folder, and CUBEJS_DEV_MODE=true. After startup, open http://localhost:4000 to continue setup.

When to use it — and when not to

Use Cube Core when the main need is a reusable, API-first semantic layer across BI tools, applications, and agents. Do not use it when a complete BI platform with built-in chat, workbooks, and dashboards is required, because Cube Core is headless and commercial Cube provides those capabilities. A self-hoster must operate the Docker deployment, connect SQL data sources, and secure development mode, because CUBEJS_DEV_MODE=true disables JWT verification on REST and GraphQL APIs, serves Playground without authentication, and can allow arbitrary SQL through the SQL API if CUBEJS_SQL_PASSWORD is not set.

project readme (upstream, from github) — read inline

Cube Core — Open-Source Semantic Layer


WebsiteDocsExamplesBlogSlackX

npm version GitHub Actions FOSSA Status

Cube Core is the open-source semantic layer. Define metrics, dimensions, joins, and access rules once in code, then expose them through SQL, REST, and GraphQL APIs to anything downstream — BI tools, custom applications, or AI agents. Cube Core is headless: it doesn't ship a UI, so you can build the analytics experience that fits your product.

Cube Core works with all SQL data sources, including cloud data warehouses like Snowflake, Databricks, and BigQuery; query engines like Presto and Amazon Athena; and application databases like Postgres. It has a built-in relational caching engine to provide sub-second latency and high concurrency for API requests.

<img src="https://raw.githubusercontent.com/cube-js/cube/master/docs/content/cube-core-schema.png" alt="Cube Core — semantic layer connecting data sources to embedded analytics, BI tools, and AI agents"

/>

Learn more about connecting Cube to data sources and analytics & visualization tools.

Why Cube Core?

Every BI tool relies on a semantic layer as its core engine — the component that defines metrics, dimensions, and business logic and hides the complexity of the underlying data sources. Most semantic layers are proprietary, tightly coupled to a single BI platform, and can't be reused across other tools.

Cube Core is an open, standalone semantic layer that any analytics application or AI agent can consume through standard APIs. Define your metrics once and use them everywhere — internal BI, embedded analytics, AI agents — without re-implementing the model in each place.

Getting Started

You can run Cube Core locally or self-host it with Docker.

Once Docker is installed, in a new folder for your project, run:

docker run -p 4000:4000 \
  -p 15432:15432 \
  -v ${PWD}:/cube/conf \
  -e CUBEJS_DEV_MODE=true \
  cubejs/cube

Then open http://localhost:4000 in your browser to continue setup.

Development mode is an authentication bypass. In the official images — whose entrypoint is the cubejs CLI — CUBEJS_DEV_MODE=true also forces NODE_ENV=development, which switches off JWT verification on the REST (JSON) and GraphQL APIs, so they accept requests with no token at all. Playground and its supporting endpoints are served with no authentication either, so anyone who can reach the instance is handed a ready-to-use API token (and can mint others carrying any security context, signed with your API secret), can read your data model, and can overwrite it and your .env. With no CUBEJS_SQL_PASSWORD set, the SQL API accepts any credentials as well, allowing arbitrary SQL against connected data sources.

This is intentional — development mode is designed to run on a developer's local machine for ease of use and debugging. Never expose it to the internet or use it in production. Using development mode in the Cube cloud platform is highly discouraged, as it bypasses the platform's security model. Cube is also in development mode whenever NODE_ENV is not production, but cubejs server and the official images already set it to production. See CUBEJS_DEV_MODE.

For a step-by-step guide, see the docs.

Cube Core vs. Cube

Cube is our commercial product — an agentic analytics platform built on Cube Core. Same semantic layer underneath, plus the rest of what makes it a full BI platform: Analytics Chat, workbooks and dashboards, embedded analytics surfaces, managed deployment, RBAC, multi-tenancy, and integrations with Tableau, Power BI, Excel, and Google Sheets.

The data model is fully compatible both ways: a model you build in Cube Core runs unchanged in Cube, and vice versa. Cube Core stays open-source and is what we run inside Cube ourselves.

  • Use Cube Core when you want to own the stack — a custom BI experience, deeply integrated embedded analytics, or AI agents that need a governed semantic foundation.
  • Use Cube when you want a managed, full-featured BI platform out of the box — internal analytics or customer-facing embedded analytics without building the surrounding platform yourself.

For more on how we think about the split, see The Future of Cube Core and Cube.

For a tour of what's in Cube today, watch the workshop:

Cube agentic analytics workshop on YouTube

Or try Cube for free.

Resources

Contributing

There are many ways you can contribute to Cube Core! Here are a few possibilities:

  • Star this repo and follow us on X.
  • Add Cube to your stack on Stackshare.
  • Upvote issues with 👍 reaction so we know what the demand is for particular issues to prioritize them within the roadmap.
  • Create issues every time you feel something is missing or goes wrong.
  • Ask questions on Stack Overflow with cube.js tag if others might have these questions as well.
  • Provide pull requests for all open issues and especially for those with help wanted and good first issue labels.

All sorts of contributions are welcome and extremely helpful 🙌 Please refer to the contribution guide for more information.

License

Cube Client is MIT licensed.

Cube Backend is Apache 2.0 licensed.

FOSSA Status

Frequently asked questions

Is Cube free to use?

Cube is open source. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Cube do?

Unify data models and metrics across your entire stack

What is Cube written in?

Cube is primarily written in Rust. Its source is publicly available at https://github.com/cube-js/cube, and it has 20,857 GitHub stars.