> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cube.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Development mode

> Outlines development mode in Cube Cloud—branch-scoped APIs, save and commit flows, and safe iteration before promoting changes to production.

Development mode allows to test and debug the data model in an isolated
[development environment][ref-environments-dev] before releasing any changes to production.

> [!WARNING]
>
> This page describes development mode in the Cube cloud platform. It is unrelated to
> Cube Core's development mode — which is on when
> [`CUBEJS_DEV_MODE=true`](https://docs.cube.dev/reference/configuration/environment-variables#cubejs_dev_mode)
> — and which is an **authentication bypass**. It switches off JWT verification on the
> data APIs, and Playground's endpoints are served with no authentication at all, so
> anyone who can reach the instance can mint an API token carrying any security context
> (signed with the API secret), read the data model, and overwrite it and `.env`. With
> `CUBEJS_DEV_MODE=true` and no
> [`CUBEJS_SQL_PASSWORD`](https://docs.cube.dev/reference/configuration/environment-variables#cubejs_sql_password)
> set, the SQL API accepts any credentials as well. That is intentional — it is designed
> to run on a developer's local machine for ease of use and debugging. Never use it in
> production, and using it in the Cube cloud platform is highly discouraged because it
> bypasses the platform's security model.

When you enter the development mode, you'll have access to your personal API endpoints
that will track the branch you're on and will be updated automatically when you make
changes to the data model.

## Development flow

### Save changes

When you make changes to the data model, you can save them by clicking the "Save all" button in the actions bar at the top of the screen.

![Save all button](https://ucarecdn.com/8d3c7115-1407-4738-846b-b50032a42841/)

### Commit, merge or publish changes

After saving changes, click the button in the actions bar or in the **Changes**
view. Its label says what it does by default:

* **Commit** commits the changes to the branch you're working on. It's the
  default unless one of the cases below applies. The menu next to the button
  shows that branch's name under **Commit**.
* **Merge into …** merges a shared branch into the branch it was created from.
  It's the default on a shared branch, unless that branch was created from the
  deploy branch.
* **Publish to …** sends the changes to the deploy branch, putting them in
  production. It's the default when you're working on the deploy branch itself
  or on a shared branch created from it. Otherwise, it's in the menu next to the
  button.

To pick another target, use the arrow next to the button. The button then shows
the target you picked.

If the deploy branch takes changes only through a pull request, the Changes
view shows a disabled **Pull request required** button instead of
**Publish to …**. Open a pull request from your branch in your Git repository
to get the changes into production. This happens when:

* A GitHub branch protection rule or ruleset on the deploy branch requires a pull
  request, reviews, or status checks, and Cube's GitHub access can't bypass it.
* **Allow merging to this branch** is turned off on the **Build & deploy** tab of
  the **Settings** screen.

Cube checks GitHub branch protection about once a minute, so a rule you have just
changed can take that long to show in the Changes view.

Before the changes are sent, you can enter a **Message** for the commit. The
message is optional:

* Leave it empty, and the agent writes the message from the changes when they're
  sent.
* Click **Write the message with AI** to get the agent's message in the field, so
  you can read and edit it first.
* If AI is not available, or the agent cannot write the message, the commit gets
  Git's default merge message, such as `Merge branch 'my-branch' into master`.
  This applies to **Commit** too: Cube keeps your changes on a personal
  development branch and merges it into the branch you're working on. The
  changes are sent either way.

To write the message, Cube sends the diff of the changes against the target branch
to the AI model of the agent. For **Commit**, that diff holds the changes you
saved since your last commit.

### Updating the branch

When there are changes in the parent branch, you can update your active branch by pulling changes from the parent branch.
If your active branch got updated in the connected repository, you can update it by pulling changes from the remote.

![Pull from Parent branch button](https://ucarecdn.com/a3f498ba-05d6-4d28-967c-314c6d2cd3cc/)

### Resolving conflicts

In some cases, you may encounter conflicts when merging or pulling changes from the parent branch or remote.
If this happens, you'll see a warning about conflicts in the actions bar.
You'll then be able to either resolve them manually or discard the changes.

![Conflict Resolution UI](https://ucarecdn.com/4834bbf0-7b9c-41ae-b562-4362c25ec3fe/)

## Deep-link into development mode

You can link directly into development mode on the Semantic Model IDE by
adding query parameters to the page URL:

* `?branch=<name>` switches to the given branch, entering development mode
  if you're already in it (or staying read-only otherwise).
* `?devmode=true` enters development mode on the current branch. Combine it
  with `?branch=` to enter development mode on a specific branch in one step:

```text theme={"dark"}
https://your-tenant.cubecloud.dev/d/DEPLOYMENT_ID/schema?branch=my-branch&devmode=true
```

Both parameters are stripped from the URL once applied. They're a no-op for
users without permission to use development mode.

## Finding endpoints

In Development Mode, you'll have dedicated endpoints that will track the branch you're on.
To see them, open the **Status** page and click **API credentials**.

Read more about the available endpoints on the [Environments][ref-environments-endpoints] page.

An [embed session][ref-generate-session] can point at your branch as well: pass its
name as `branchName` and the embedded content queries your development environment
instead of production. That only holds while you're in development mode on the
branch — for a branch an embedded app should reach at any time, enable its [staging
environment][ref-environments-staging] instead.

## Behavior with CLI deployments

Development mode is fully available on deployments that are configured to
[deploy with CLI][ref-deploy-with-cli]: you can enter dev mode, switch
branches, save and commit changes, and merge into the production branch from
the Cube Cloud UI.

However, on CLI deployments, **none of these actions trigger a production
build or redeploy** — production only changes when somebody explicitly runs
`cube deploy` against the deployment. CLI builds use the uploaded project;
include UI changes in your local project if you want them in production. See
[Deploy with CLI → Development mode][ref-deploy-with-cli-dev-mode] for the full
behavior.

## Limitations

The Development API has some limitations compared to Production, and it is
important to be aware of these as they may affect your development process.

### Autoscaling

The Development API **does not** support autoscaling. If you need to test
autoscaling, we recommend creating a separate deployment using a different Git
branch of the same repository.

### Scheduled refresh

Scheduled refresh is also disabled in the Development API. If you need to test
scheduled refreshes, we recommend creating a separate deployment using a
different Git branch of the same repository.

### Pre-aggregations

Development environments share the production environment's Cube Store and
pre-aggregations schema. Pre-aggregations you haven't changed are served from
the production tables. Pre-aggregations you have changed are built separately
when queried, and production never serves those tables. Building large
pre-aggregations from development mode can remove older unused production
tables, so test builds on a separate deployment instead. See [Deployment
environments → Pre-aggregations][ref-environments-preaggs] for details.

[ref-environments-dev]: https://docs.cube.dev/admin/deployment/environments.md#development-environments

[ref-environments-endpoints]: https://docs.cube.dev/admin/deployment/environments.md#api-endpoints

[ref-environments-staging]: https://docs.cube.dev/admin/deployment/environments.md#staging-environments

[ref-environments-preaggs]: https://docs.cube.dev/admin/deployment/environments.md#pre-aggregations

[ref-generate-session]: https://docs.cube.dev/reference/embed-apis/generate-session.md

[ref-deploy-with-cli]: https://docs.cube.dev/admin/deployment/continuous-deployment.md#deploy-with-cli

[ref-deploy-with-cli-dev-mode]: https://docs.cube.dev/admin/deployment/continuous-deployment.md#development-mode-with-cli-deployments


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.