Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Supabase CLI supports multiple local projects with git worktrees and native runtime

The Supabase CLI now supports running multiple local projects on a single machine using git worktrees and a native runtime, offering improved isolation, performance, and flexibility for developers.

Share
AI-generated conceptual illustration accompanying: Supabase CLI supports multiple local projects with git worktrees and native runtime
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Local project setup with git worktrees and native runtime

The Supabase CLI now supports running multiple local projects on a single machine, with each project hosted in its own git worktree. This approach allows developers to manage separate environments—such as billing and signup applications—without conflicts. By using git worktree add, each project can be initialized and run independently, with commands like supabase start launching Postgres, Storage, Edge Functions, and MCP servers on unique ports. The CLI automatically assigns and remembers these ports across restarts, streamlining the development workflow.

For environments where Docker is unavailable or not desired, the CLI can be configured to use a native runtime instead. This is done via the --runtime native flag, which supports Linux (amd64 and arm64, glibc 2.35 or later) and macOS 14 or later on Apple silicon. This flexibility ensures that developers can work efficiently regardless of their system setup.

Isolation and performance benefits of native runtime

Running a local Supabase project per agent with native runtime provides significant isolation and performance benefits. According to Supabase, the billing agent can reset the database without affecting the signup agent's tests, ensuring clean environments for each task. Performance metrics from Supabase show that starting a project with cached artifacts takes 3.9 seconds in native runtime, which is 90% faster than the Docker runtime. Restarting with existing data takes 1.4 seconds in native runtime, 96% faster than Docker. The native runtime also reduces download size to 360 MB, 81% smaller than the Docker version. Idle memory usage is 290 MiB in native runtime, 89% less than the Docker runtime. As noted in Supabase, the native runtime runs all 13 Supabase services as plain processes with the same pinned versions as Docker images, including full Postgres extensions like pgvector.

Configuration and setup for multiple agents

Setting up multiple agents with Supabase involves configuring each agent to read its own URLs and keys from the output of supabase start --output-format json, rather than relying on default values. With Declarative Schemas 2.0, agents can edit schema files directly, allowing the CLI to generate the necessary migrations automatically. For a new app, the command _10SUPABASE_EXPERIMENTAL_STACK=1 supabase init initializes the project with experimental features enabled. For an existing app, enabling the experimental stack requires adding stack = true under [experimental] in supabase/config.toml, followed by completing the port-removal checklist before the first start. When multiple agents are running on the same computer, the setup involves using Docker or Podman, assigning each agent its own worktree, and running supabase start separately for each agent.

Branching and project inheritance

Branching and project inheritance in Supabase allow developers to create isolated environments for testing and review without compromising the integrity of the main project. According to the Branching guide, branches inherit their base project's configuration, ensuring consistency while enabling customization for specific tasks. Secrets and production data remain secure in the parent project unless explicitly included in a branch, making it safe to share with reviewers once ready. Additionally, the experimental engine operates separately from the local project, maintaining distinct data, flags, and output. However, users are advised to review the differences and limitations before migrating workflows, as changes in the experimental engine may affect behavior. This approach supports flexible development practices while maintaining control over sensitive information and configurations.

Performance improvements and resource usage

Performance improvements in the new Supabase engine significantly reduce project startup and restart times, with Docker and native runtimes achieving up to 96% faster performance compared to the default engine, according to Supabase. The download size is also reduced by up to 81%, and idle memory usage drops by 89%, making it feasible to run multiple projects on a single laptop. These improvements are attributed to the experimental engine's optimizations, which allow for faster initialization and more efficient resource management. Additionally, Supabase notes that features like authentication, storage, and Edge Functions are preserved during project creation, with function bundles copied in parallel to maintain consistent performance across projects of varying sizes. The time to ready for projects has also improved dramatically, with the median startup time dropping from 102 seconds to 21 seconds, as reported in Supabase.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more