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

# Use project IDs to prevent duplicate projects after rename

> [!NOTE]
>
> **Applies to:**
>
> * Plan - Any
> * Deployment - Any
> *
> *

Summary

When a project is renamed, SDK code that references the old project name will automatically create a new duplicate project. To prevent this, use stable `project_id` parameters instead of project names in SDK initialization and environment variables.

## Configuration Steps

### Step 1: Locate your project ID

Find the project ID in Project Settings or retrieve it via the Projects API. Project IDs remain stable across renames.

### Step 2: Update SDK initialization

Replace project name parameters with project ID parameters in your SDK initialization code.

**Python SDK:**

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
# Before (using name - creates duplicate after rename)
braintrust.init(project="my-project-name")

# After (using ID - stable across renames)
braintrust.init(project_id="proj_abc123xyz")

```

**TypeScript SDK:**

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// Before (using name - creates duplicate after rename)
braintrust.init({ project: "my-project-name" });

// After (using ID - stable across renames)
braintrust.init({ projectId: "proj_abc123xyz" });

```

### Step 3: Update environment variables and configuration

Replace project name references in environment variables, CI/CD pipelines, and API calls with the corresponding project IDs.


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