Project Linking

Project linking allows you to associate a local directory with a DPage organization and project. This saves time by avoiding the need to specify IDs for every command.

How it Works

When you link a project, the CLI creates a .dpage/ directory in your current folder with a project.json file. This file contains the organization and project IDs for that directory.

Link a Project

Run the linkcommand in your project's root directory:

Terminal
dpage link

The CLI will guide you through an interactive selection process:

1

Select Organization

Choose from a list of organizations you belong to.
2

Select Project

Choose the specific project you want to link to this directory.
3

Select Navigation Engine

Choose which navigation runtime generated miniapps should target in this workspace (Manifest, React Navigation, or Auto). Defaults to the project's server-side setting.
4

Confirmation

The CLI will create the local configuration and update your .gitignore.
The .dpage/ directory is automatically added to your.gitignore. You should not commit this directory to version control, as linking is developer-specific.

Auto-Confirmation

For non-interactive use, you can skip prompts using the --yes flag. The CLI keeps the server-side targetNavigationEngine value without prompting:

Terminal
dpage link --yes

Navigation Engine

Every linked workspace records a targetNavigationEngine in .dpage/project.json. Codegen requests from this workspace use that value to decide which navigation runtime the generated miniapp must be compatible with.

  • Manifest - Default. Uses the portable router; no react-navigation-specific constraints.
  • React Navigation - Strict: every visible bottomTabs child must declare a tabItem.icon (hidden tabs exempt). Bundles that omit icons will fail server validation.
  • Auto - Let the host pick at runtime. Non-strict validation; icons are encouraged but not enforced.

Re-run dpage link to change the selected engine for a workspace, or update the project-wide default from Project Settings → Navigation Engine in the Dashboard.

JSON
{
  "organizationId": "org_abc123",
  "organizationName": "My Organization",
  "projectId": "proj_xyz789",
  "projectName": "My Project",
  "targetNavigationEngine": "manifest",
  "linkedAt": "2025-11-13T10:30:00.000Z"
}

Unlinking

To remove the association between a directory and a DPage project, run:

Terminal
dpage unlink

This will safely delete the .dpage/ directory and its contents.

Resolution Order

Commands that require a project context (like indexing) resolve it in this order:

  1. Flags: --organization-id and --project-id passed directly to the command.
  2. Linked Project: IDs found in .dpage/project.json.
  3. Error: If neither is found, the command will fail with a helpful error message.
If you're working on multiple projects, linking is the most efficient way to switch between them. Just cd into the directory and run your commands.