Set up RDE with a new Metabase

You know Metabase but don't have an instance set up for RDE. Create a Git repository, install RDE, and build your first dashboards with a coding agent.

RDE lets a coding agent build your Metabase dashboards, metrics, and transforms in a development Metabase on your machine, and ship them through Git. For the full picture, see Get started with RDE.

A sales overview dashboard built by the RDE agent

Use this guide if you know your way around Metabase but don’t have an instance set up for RDE yet. By the end, you’ll have a development Metabase on your machine, a Git repository that holds your semantic layer, and a first dashboard built by the agent.

Before you start

You need:

  • A Metabase Pro or Enterprise plan, which includes Git sync. A trial works.
  • A data warehouse your machine can reach, and a database user that can read the tables you build on.
  • A GitHub, GitLab, or Bitbucket account where you can create a private repository and a personal access token.
  • A Mac or Linux machine with Node.js 20.19 or later and Git.
  • Docker or Java 21 or later. On a Mac, Docker Desktop, OrbStack, and colima all work.
  • A coding agent such as OpenCode, Claude Code, Codex, Cursor, Gemini CLI, or Windsurf. This guide uses OpenCode.

Part 1: Create a repository

  1. Create a new private repository and initialize it with a README. Metabase can’t connect to a repository that has no commits. This guide uses analytics as the repository name.
  2. Create a personal access token that can read and write to the repository. On GitHub, create a fine-grained token for the repository with the Contents: Read and write permission.

Part 2: Install RDE and create a development Metabase

Run the wizard

npm install -g @metabase/rde
rde init

rde init installs mb, starts a development Metabase at http://localhost:23000, and creates an admin user for it. The wizard prompts you for the following:

  1. Which coding agents should get the rde and data-app skills? Keep OpenCode, or select the agent you use.
  2. Paste your Metabase license token. Find it in your Metabase Store account.
  3. Where should Metabase push the content? Choose Hosted remote (GitHub, GitLab, Bitbucket…), not the default local remote.
  4. Repository URL and Access token. Enter the repository and token from Part 1.
  5. Where should the Metabase content repository live? Choose Clone into another directory and enter a path such as ~/analytics. This directory is where you work with your agent.
  6. Your database. Paste a connection string for your data warehouse, then enter a Display name.

RDE then creates the Library, the collection where your official dashboards and metrics live, and asks whether to push it to main. Answer Yes, since nothing else uses the repository yet.

When the wizard finishes, it prints the URL of your development Metabase and the command that starts your agent. To log in, run rde credentials for the password and rde open to open Metabase in your browser.

Start your agent

Start your coding agent in the repository directory:

cd ~/analytics
opencode

If you use another agent, run its command instead. The rde init summary lists the command for each agent you select.

The first time you start the agent, it asks for permission to run mb and other commands on your machine. Approve them. It then asks a few setup questions. It saves your answers to .scratch/STATE.md and reads them at the start of each session, so you don’t have to answer again. RDE excludes the .scratch/ directory from Git, so you can also use it for your working files.

  • Is this instance production or staging? Answer staging. It’s your development Metabase, and your changes reach main through pull requests.
  • Which Metabase? If mb knows more than one, pick the development Metabase. Use the URL that rde status shows.

Part 3: Build your first dashboards and metrics

Describe what you want in plain language. For example, you can ask for a set of clean tables, a metric, or a dashboard. The agent plans the work, builds it in your development Metabase, and verifies the results. Whenever it reaches a business decision, it stops and asks you to decide. To review what it built, run rde open. Only the Library and transforms sync to Git, so the agent builds there. Dashboards and questions in other collections stay in the development Metabase.

To move the agent’s work into Git, follow the same three steps every time:

  1. Export. The agent asks for permission before it writes anything to Git. It shows you the changes and the name of the branch, which starts with agent/. When you approve, it exports to that branch. The agent never pushes to main without your confirmation.
  2. Review and merge. Open a pull request and review the YAML files. When you’re ready, merge the pull request and delete the branch.
  3. Return to main. Tell the agent that the pull request is merged. It switches your development Metabase back to main, and you run git checkout main && git pull.

Commands

CommandWhat it does
rde statusShows your development Metabase, its databases, and its sync state
rde start / rde stopStarts or stops your development Metabase
rde openOpens your development Metabase in the browser
rde credentialsPrints the login for your development Metabase
rde doctorChecks the setup and says how to fix what’s broken. rde doctor --fix repairs what it can
mb git-sync statusShows the branch and whether there are unexported changes

Troubleshooting

Start with rde doctor. It checks everything from Docker to the license and suggests a fix for each failure.

  • “Cannot connect to uninitialized repository.” The repository has no commits. Add a README.
  • “There are unsaved changes in the Remote Sync collection.” Your development Metabase has work that isn’t exported. Ask the agent to export it to a branch first.