Skip to main content

Vetra Drive

Introducing Vetra Drive for Builders​

Vetra Studio is the builder environment where you create, manage, and collaborate on Powerhouse packages. It consists of two main components:

  • Vetra Studio Drive: Serves as a hub for developers to access, manage & share specifications through a remote Vetra drive. It functions as the orchestration hub where you as a builder assemble all the necessary specifications for your intended use-case, software solution, or package. Each specification document corresponds to a module — a distinct building block of your package (such as a document model, editor, or data integration).
  • Vetra Package Library: Store, publish, and fork git repositories of packages in the Vetra Package Library.
    Visit the Vetra Package Library here
info

What is a Specification Document? A specification document is a configuration file that defines how a specific module in your package should behave. Think of it as a blueprint: it describes the structure, rules, and relationships that Powerhouse uses to generate the actual code for that module. Specification documents make Specification-Driven Design & Development possible: you communicate your solution and intent through a structured framework designed for AI collaboration. Specs are a shared language that enables precise, iterative edits.

As Vetra Studio matures, each of these specification documents will offer an interface by which you as a builder get more control over the modules that make up your package. For now, the specification documents offer you a template for code generation.

Modules
The list of available modules color coded according to the 3 categories.

Module Categories​

1. Document Models​

A document model is a structured data type that defines what information your application can store and how it can be modified. Unlike traditional databases, document models use operations (actions like "add item" or "update title") rather than direct data manipulation, making them ideal for collaborative and auditable applications.

  • Document model specification: Defines the structure and operations of a document model using GraphQL SDL (Schema Definition Language), ensuring consistent data management and processing.

→ Learn more about Document Models

2. User Experiences​

  • Editor specification: Outlines the interface and functionalities of a document model editor, allowing users to interact with and modify document data.
  • Drive-app specification: Specifies the UI and interactions for managing documents within a drive, providing tailored views and functionalities.

→ Learn more about Building Document Editors → Learn more about Building a Drive Explorer

3. Data Integrations​

  • Subgraph specification: Details the connections and relationships within a subgraph (a subset of your data exposed via a GraphQL API), facilitating efficient data querying and manipulation.
  • Codegen Processor Specification: Describes the process for automatically generating code from document model specifications, ensuring alignment with intended architecture.
  • RelationalDb Processor Specification: Defines how relational databases are structured and queried, supporting efficient data management and retrieval.

→ Learn more about Using Subgraphs → Learn more about Relational DB Processor

Vetra Studio Drive
The Vetra Studio Drive, a builder app that collects all of the specifications of a package.

Configure a Vetra Drive in Your Project​

You can connect to a remote Vetra drive instead of using the local one auto-generated when you run ph run vetra (where ph is short for "powerhouse", the CLI tool and the Organization behind Vetra).

  • Without the --remote-drive option: Vetra will create a local drive for you that lives in your browser's local storage. This is useful for solo development or experimentation.
  • With the --remote-drive argument: Vetra will connect to a remote drive instead of creating a local one. The remote drive can be hosted wherever you want (e.g., on your own server or a shared team environment).

The Powerhouse config includes a Vetra URL for consistent project configuration across different environments.

vetra: {
driveId: string;
driveUrl: string;
}

Imagine you are a builder and want to work on, or continue with a set of specifications from your teammates. You could then add the specific remote Vetra drive to your Powerhouse configuration in the powerhouse.config.json file to get going:

"vetra": {
"driveId": "bai-specifications",
"driveUrl": "https://switchboard.staging.vetra.io/d/bai-specifications"
}

An example of a builder team building on the Powerhouse Vetra Ecosystem and its complementary Vetra Studio Drive specifications for the different packages can be found here.

Connect Claude to the Reactor MCP​

Claude can connect directly to your project's Reactor via the Model Context Protocol (MCP), giving it live access to your drives, documents, and document model operations.

ph init writes the configuration into the project: .mcp.json for Claude Code, .cursor/mcp.json for Cursor and .gemini/settings.json for Gemini CLI. The .mcp.json it writes is:

{
"mcpServers": {
"reactor-mcp": {
"type": "stdio",
"command": "node",
"args": ["--run", "mcp"]
}
}
}

ph mcp serves the reactor-mcp tools over stdio from the project's own ph-cli. node --run mcp runs the project's mcp script (ph-cli mcp), which works on every platform. On the first tool call it connects to the project's running Vetra, or starts ph vetra --watch in the background and writes its output to .ph/vetra.log, so you don't need to start Vetra first.

For a client that doesn't start in the project directory, such as Claude Desktop, copy the entry from .cursor/mcp.json and replace ${workspaceFolder} with the project's path. A project created before ph mcp points reactor-mcp at http://localhost:4001/mcp; run ph migrate to switch it to the launcher.

→ See Connecting Claude with Reactor MCP for a step-by-step walkthrough.

📦 Vetra Remote Drive Commands

Remote drives enable collaborative development by syncing specifications across team members.

Key Commands:

  • ph init --remote-drive <url> - Create or connect to a project using a remote drive
  • ph run vetra - Start development with a preview drive for testing local changes

Workflows:

  • Project Owner: ph init --remote-drive → Create GitHub repo → Push → ph run vetra to configure
  • Collaborator: ph init --remote-drive <url> → ph run vetra to start developing

Preview Drive:

The preview drive allows you to safely test changes before they affect the shared remote drive.

  • The main "Vetra" drive syncs with the remote and contains the stable package configuration.
  • The "Vetra Preview" drive is created locally for testing document models and editors before syncing your changes to the team.
  • ph run vetra loads your local documents and editors. The --watch flag of the classic ph vetra command is no longer needed.

→ Full Vetra Remote Drive Reference

Up next​

With your drive set up, create a package with Vetra to see the end-to-end flow, then build one by hand in the Manual Todo tutorial.