Spec Version:

How to Migrate from Rudder CLI Spec v0.1 to v1 Beta

Migrate your Rudder CLI project from spec format v0.1 to v1 with an automated command.
Available Plans
  • free
  • starter
  • growth
  • enterprise

This migration guide helps you migrate your Rudder CLI project from spec version 0.1 to v1.

Overview

rudder/v1 is a comprehensive redesign of the original rudder/v0.1 spec format. It improves consistency across resource kinds, replaces ambiguous field names, adopts snake case conventions, and moves to compact URN-style references throughout.

When you run the migrate command, Rudder CLI automatically rewrites the spec files present in the specified location and applies changes related to:

  • Spec version upgrades
  • Rename resource kinds
  • Using compact URN references
  • Updating property and custom type definitions
  • Updating Tracking Plan rules
  • Updating variant definitions
  • Updating import metadata
  • Updating event stream source references
warning
As the migration process rewrites the spec files in place, RudderStack recommends committing or backing up your project before running the migrate command.

Run the migration

To migrate your project automatically, run the following command:

rudder-cli migrate --location <path-to-project>

Breaking changes

The following sections list the breaking changes introduced in the spec format upgrade from v0.1 to v1.

info
The migrate command automatically handles these changes.

Update the version field

The field-name, convention, and reference changes in rudder/v1 break the existing spec contract. The version is bumped to signal the new contract, so tooling and validation can distinguish it from legacy spec version rudder/v0.1.

Rename the Tracking Plan kind

The Tracking Plan kind changes from tp to tracking-plan. The abbreviated tp was an opaque abbreviation, while tracking-plan is self-documenting and consistent with how the resource is named everywhere else.

Compact URN references

All cross-resource references change from the path-based format (#/<kind>/<group>/<id>) to the compact URN format (#<resource-type>:<id>). Path-based references were verbose and order-dependent, while compact URNs are shorter and encode the resource type, making references unambiguous and easier to read.

The following table lists the updated reference format for each resource type:

Resourcev0.1v1
Property#/properties/group/prop_id#property:prop_id
Event#/events/group/event_id#event:event_id
Category#/categories/group/cat_id#category:cat_id
Custom type#/custom-types/group/type_id#custom-type:type_id
Tracking plan#/tp/group/tp_id#tracking-plan:tp_id

The following example shows an event referencing a category:

Updated property definitions

Property definitions undergo four changes:

  • propConfig is renamed to config for brevity and consistency with other resource field naming
  • config keys move to snake case to align with YAML ecosystem conventions
  • type becomes types (an array) to eliminate fragile comma-separated string parsing
  • Array item types are hoisted to top-level to reduce nesting and make type information more discoverable

propConfig renamed to config

config keys converted to snake case

Multi-type type string replaced by types array

Properties with multiple types use a types array instead of a comma-separated type string.

Array item types hoisted to top-level

Full property definition example

Custom type definitions

Custom type definitions undergo two changes:

  • $ref (a JSON Schema artifact with no semantic meaning in this context) is replaced by the clearer property
  • config keys follow the same snake case convention as properties

$ref replaced by property in type properties

Config keys converted from camel to snake case

Tracking Plan rules

Tracking Plan rules undergo two structural changes:

  • The event object wrapper was redundant, so event now holds a direct reference string consistent with how other references are expressed.
  • allow_unplanned is renamed to additional_properties and moved to rule level for clarity.
  • $ref is replaced by property in rule properties, using compact URNs

The event object replaced with a direct reference string

The event field changes from an object (containing $ref, allow_unplanned, and identity_section) to a direct reference string. The allow_unplanned and identity_section fields move to rule level:

  • event.$ref becomes event (direct string)
  • event.allow_unplanned becomes additional_properties (moved to rule level and renamed)
  • event.identity_section becomes identity_section (moved to rule level)

$ref replaced by property in rule properties

Full Tracking Plan example

Variant definitions

Variants appear in both custom types and Tracking Plan rules — they undergo the following changes:

  • The variant default is restructured to remove an array-of-objects pattern in favor of an explicit properties wrapper that matches the shape used in rules
  • All $ref fields within variant discriminators and cases are replaced by property with compact URN references

Variant default restructured from array to object

Variant discriminator and case properties

Variant discriminator and case properties follow the same $ref to property change.

Import metadata

The local_id field in import metadata is replaced by a urn field that includes the resource type. The urn field encodes the resource type alongside the local ID, eliminating ambiguity when multiple resource types share the same ID values.

The URN format is <resource-type>:<local-id>.

Valid resource types include:

  • property
  • event
  • category
  • custom-type
  • tracking-plan
  • event-stream-source
  • retl-source-sql-model

Event stream source references

The Tracking Plan reference in event stream source governance uses the compact URN format, consistent with the unified compact URN format adopted for all cross-resource references in v1.


Questions? We're here to help.

Join the RudderStack Slack community or email us for support