~/tools/cube
tool

Cube

Cube is an open source semantic layer for analytics — a headless BI backend that defines your metrics once and serves them to dashboards, apps, and AI agents through SQL, REST, and GraphQL APIs.

What is Cube?

Cube is an open source semantic layer that sits between your database and your analytics tools. You define metrics, dimensions, joins, and access rules once in code, and Cube exposes that single data model through SQL, REST, and GraphQL APIs — so dashboards, custom apps, and AI agents all query the same governed definitions and get the same numbers.

What is Cube best for?

Cube is best for data and engineering teams who want one consistent source of truth for business metrics instead of redefining “revenue” or “active users” in every BI tool. It shines for embedded analytics inside a product (multi-tenant, customer-facing charts) and for feeding a governed model to LLM agents. It’s a headless backend, so you bring your own frontend.

What can Cube do?

  • Define a semantic data model (metrics, dimensions, joins, access control) once in YAML or JavaScript.
  • Expose that model over SQL, REST, GraphQL, and MDX APIs for any downstream tool.
  • Connect to most SQL sources — Snowflake, Databricks, BigQuery, Redshift, Postgres, Presto, Athena, and more.
  • Serve sub-second queries at high concurrency via a built-in pre-aggregation and caching engine (Cube Store).
  • Power embedded, multi-tenant analytics with row-level security per user or tenant.
  • Act as an MCP server so AI assistants like Claude, Cursor, and ChatGPT can query your data against the governed model.

Where does Cube fall short?

Cube is headless — the open source core has no built-in dashboards or visualization UI. You still need a BI tool (Superset, Metabase) or your own charting frontend to see anything, so it’s not a drop-in replacement for a full BI suite on its own.

The polished analytics experience — dashboards, workbooks, the AI analytics chat, and embedded UIs — lives in the commercial Cube Cloud, not the open source project. Self-hosting gets you the API and modeling layer, but not that turnkey interface.

Pre-aggregations at scale depend on Cube Store, a separate Rust-based service you deploy and run alongside Cube — an extra moving part to operate if you want the sub-second performance.

Is Cube free?

Yes, partly. Cube Core is free and open source — the backend is Apache-2.0 licensed and the client libraries are MIT — so you can self-host the semantic layer and all its APIs at no cost. Cube Cloud is the paid managed platform: a free hobbyist tier, then Starter at $40 per developer/month and Premium at $80 per developer/month, plus Enterprise. Cloud adds hosted infrastructure, dashboards, embedded analytics, AI agents, and SLAs.

What does Cube replace?

Cube stands in for the modeling layer of proprietary BI platforms. It’s most directly an open source Looker alternative — replacing LookML with a code-defined semantic layer that isn’t locked to one vendor’s frontend. Paired with a visualization tool, it can also back use cases teams reach for Tableau or Power BI for, especially embedded, customer-facing analytics.

FAQ

Is Cube open source? Yes. Cube Core is open source — the backend under Apache-2.0 and the client under MIT — and developed in the open on GitHub. The managed Cube Cloud service is a separate commercial product built on top of it.

Can I self-host Cube for free? Yes. You can run Cube Core yourself with Docker at no cost, connect it to your data warehouse, and use the SQL, REST, and GraphQL APIs. You only pay if you choose Cube Cloud for the hosted UI, dashboards, and infrastructure.

Is Cube a good Looker alternative? For the semantic layer, yes — it gives you a governed, code-defined metrics model without vendor lock-in. The difference is that Looker includes its own exploration and dashboard UI, while Cube is headless and expects you to bring a frontend or use Cube Cloud.

What do I need to run Cube? A supported SQL data source (a warehouse like Snowflake or BigQuery, or a database like Postgres) and Docker to run Cube itself. For sub-second pre-aggregations you also run Cube Store, its caching service.