Back to directory

Data & Analytics · Data Engineering & Integration

Cube

A code-first semantic layer for governed analytics and AI

Cube is an open-source semantic layer for metrics, dimensions, joins, access policies, caching, and APIs. Cube Core supports BI tools, embedded applications, and AI agents through SQL, REST, GraphQL, and metadata APIs. Cube Cloud adds managed deployment, workbooks, dashboards, analytics chat, embedded surfaces, and collaboration features.

Key facts

License
Apache License 2.0 by default; Cube Backend Apache License 2.0; Cube Client MIT
Main language
TypeScript, Rust
Maintainer
Cube Dev, Inc.
First released
2019
Latest release
v1.8.9, October 21, 2026
GitHub stars
21,046, October 2026
Hosted option
Cube Cloud: Free; Starter $40 per developer/month; Premium $80 per developer/month; Enterprise custom

What Cube is

Cube began as Cube.js, which Pavel Tiunov and Artyom Keydunov open-sourced in March 2019, establishing the project’s first release year. Cube Dev, Inc. became its maintainer and was formed to support continued development while keeping core functionality open source; the repository now identifies Cube Dev, Inc. as maintainer. The project’s adoption is reflected in 21,046 GitHub stars in October 2026, while a September 2020 company announcement recorded more than 70,000 deployed servers and over 100 GitHub contributors. Cube Core is the project’s open-source semantic layer, defining metrics, dimensions, joins, access rules, and caching for SQL, REST, GraphQL, and metadata APIs. Cube Cloud extends that foundation with managed deployment, workbooks, dashboards, Analytics Chat, and embedded analytics. In September 2020, Cube Dev announced a $6.2 million funding round led by Bain Capital Ventures, with several additional participating investors.

How it works

Cube is a code-first semantic layer for governed analytics and AI, defining metrics, dimensions, joins, views, caching rules, and access policies in version-controlled YAML or JavaScript. Teams can expose the same model through Postgres-compatible SQL, REST, GraphQL, and metadata APIs for BI tools, embedded applications, and AI agents, while Python or JavaScript policies enforce row-level and tenant-aware access across consumers. A typical workflow begins with connecting Cube Core to a SQL source such as Postgres, Snowflake, Databricks, or BigQuery, then defining an orders cube with revenue and order-count measures, customer dimensions, and joins to a date model. A view presents the curated dataset, and a pre-aggregation declaration enables background refresh into Cube Store. An application or BI client then queries the governed view, receives results through the selected API, and uses the shared definitions without direct warehouse access. Cube Cloud adds workbooks, dashboards, Analytics Chat, embedded surfaces, and managed deployment.

Architecture and recent releases

Cube is an open-source semantic layer maintained by Cube Dev, Inc. Its core is built mainly with TypeScript and Rust, with Python and JavaScript supporting models and policies. The architecture includes API instances, a Refresh Worker, and Cube Store. APIs handle SQL, REST, GraphQL, and metadata requests; the worker refreshes pre-aggregations; and Cube Store supports routers, workers, distributed query processing, and Parquet storage using local paths, AWS S3, or Google Cloud. Models define cubes, views, measures, dimensions, joins, and access rules in YAML or JavaScript, while policies use Python or JavaScript. Cube runs locally or in production through Docker, command-line tools, and binary distributions, and APIs can scale horizontally behind a load balancer. Integrations include major warehouses, BI tools, spreadsheets, and AI agents. Version 1.8.9 arrived October 21, 2026, with several SQL and storage updates.

License and pricing

Cube Core is open source under Apache License 2.0 by default, while the repository identifies Cube Backend as Apache 2.0 and Cube Client as MIT; files or packages with their own headers or license files can differ. These licenses permit commercial use subject to their terms, and self-hosted Cube Core can be run locally or in production without buying Cube Cloud. Core provides code-defined semantic models, access policies, caching, and SQL, REST, GraphQL, and metadata APIs, but it does not include Cube Cloud’s complete workbook, dashboard, managed deployment, or collaboration product. Cube Cloud offers a Free plan with source connections, up to five workbooks, dashboards, Analytics Chat, and AI-agent features. Starter costs $40 per developer monthly, Premium costs $80, and Enterprise pricing is custom. Paid plans can add charges for deployment compute, API instances, Cube Store workers, and multi-cluster deployment.

Limitations and how it compares

Cube’s main limitation is operational scope. Self-hosting often requires API instances, a Refresh Worker, Cube Store, model files, connected databases, storage, credentials, authentication, refresh schedules, and backups. Pre-aggregations also require refresh, invalidation, storage, and monitoring. Because Cube Core is headless, teams wanting an immediate dashboard interface may prefer Apache Superset or Metabase, both open-source alternatives. dbt Semantic Layer and MetricFlow are narrower comparisons focused on metric definitions within dbt workflows, while Looker is a proprietary governed BI platform with a more integrated user experience. Cube serves one code-first model through SQL, REST, GraphQL, and metadata APIs for BI tools, applications, and AI agents, applying row-level and tenant-aware policies across consumers. Cube Cloud adds managed deployment, workbooks, dashboards, Analytics Chat, and embedded surfaces, but paid plans and extra compute charges apply.

Main features

  • Code-first semantic models. Define cubes, views, measures, dimensions, joins, and access policies in YAML or JavaScript managed through version control.
  • Governed query APIs. Expose shared definitions through Postgres-compatible SQL, REST, GraphQL, and metadata APIs for BI tools and applications.
  • Pre-aggregation caching. Declare rollups that refresh in the background and store columnar results in Cube Store for repeated analytical queries.
  • Semantic-layer access control. Apply Python or JavaScript policies, including row-level and tenant-aware rules, consistently across every connected consumer.
  • Embedded analytics foundation. Use APIs and compatible models to place governed analytics inside products, while Cube Cloud adds embedded dashboards.
  • AI agent access. Agents can inspect model metadata and query Semantic SQL without connecting directly to underlying warehouse tables.

Self-hosting Cube

Cube Core can run locally or in production with Docker, command-line tools, and binary distributions. A typical production deployment has API instances, a Refresh Worker, and Cube Store. API instances and refresh processes need access to the model files and connected data sources. Cube Store uses router and worker roles, with local storage or cloud object storage for metadata and Parquet pre-aggregations. API instances can scale horizontally, and Cube Store can run as a cluster for higher concurrency. Operators must configure credentials, secrets, network access, authentication, refresh schedules, storage, and backups. The project does not publish one universal CPU or memory minimum. Development mode bypasses authentication and must not be exposed to the internet or used in production.

Strengths

  • One semantic model can serve SQL clients, BI tools, applications, and AI agents.
  • Apache License 2.0 covers the backend by default.
  • Cube Store supports distributed query processing and pre-aggregation storage.
  • Code-first models fit review, CI, branching, and policy workflows.

Drawbacks

  • Production self-hosting requires several coordinated services rather than one dashboard container.
  • Cube Core does not include Cube Cloud's complete workbook and dashboard product.
  • Pre-aggregation management adds refresh, storage, invalidation, and monitoring work.

What teams replace with it

Teams usually evaluate Cube when they want to move off Looker, Tableau, Power BI, ThoughtSpot.

For side-by-side commercial comparisons, browse our alternatives hub.

Open-source alternatives to Cube

Frequently asked questions

Is Cube free to use?

Cube Core is open source, with Apache License 2.0 applying by default and MIT applying to the client. Teams can run Core on their own infrastructure without purchasing Cube Cloud. Cube Cloud has a Free plan, followed by Starter at $40 per developer monthly and Premium at $80. Enterprise pricing is custom.

Can companies use Cube commercially?

Yes, subject to the applicable component license. The repository states that Apache License 2.0 is the default, while the README identifies Cube Backend as Apache 2.0 and Cube Client as MIT. These licenses permit commercial use under their terms. Cube Cloud is a separate commercial service with additional hosted features and plans.

How do you self-host Cube?

Run Cube Core with Docker or its command-line and binary distributions, connect it to a supported SQL data source, and make the model available to services. Production normally includes API instances, a Refresh Worker, and Cube Store. Configure authentication, credentials, storage, and networking. The project does not publish one universal hardware minimum.

How does Cube compare with dbt Semantic Layer?

Cube is a standalone serving runtime with SQL, REST, GraphQL, metadata APIs, caching, access policies, and embedded analytics support. dbt Semantic Layer centers metric definitions within dbt projects. Cube fits teams needing one governed layer for applications, BI, and agents, while dbt fits teams whose metric workflow already centers on dbt.

How does Cube protect data?

Cube applies access policies in the semantic layer so the same rules can govern BI tools, applications, and agents. Models support row-level and tenant-aware behavior through Python or JavaScript policies. Self-hosted operators remain responsible for authentication and secrets. The README warns that development mode bypasses authentication and must not be exposed publicly.

Similar projects to compare

Sources

Last updated 2026-10-22.