nx-import

Import and merge repositories into a single Nx workspace with history.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/lhew/movingday --skill nx-import-lhew
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nx-import
Source: https://github.com/lhew/movingday/tree/main/.agents/skills/nx-import
Command: npx skills add https://github.com/lhew/movingday --skill nx-import-lhew

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Import, merge, or consolidate multiple repositories into a single Nx workspace, enabling teams to adopt Nx across projects, unify codebases, and preserve history during migrations.

Core Features & Use Cases

  • Import code from a source repository or folder into the current workspace, preserving commit history.
  • Support subdirectory imports (one-repo-at-a-time) or whole-repo imports, with guidance for destination structure and conflict resolution.
  • Follow best practices for workspace setup (apps/libs layout, tsconfig, nx.json) and handle common migration scenarios, including preserving history and streamlining future work.

Quick Start

Run nx import with the appropriate flags to bring code from a source repository into the current Nx workspace, ensuring the destination directory is empty before importing.

Frequently Asked Questions about nx-import

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consolidate multiple repositories into a single Nx workspace?▼

You can consolidate multiple repositories into a single Nx workspace by using the nx import command. This process merges source repositories while preserving commit history and requires an empty destination directory.

Can I import a subdirectory from a git repository into an Nx monorepo?▼

Yes, Nx import supports subdirectory imports from a git repository on a one-repo-at-a-time basis. This allows you to migrate specific project folders while preserving their commit history.

Does importing repositories into an Nx workspace preserve git history?▼

Yes, importing repositories into an Nx workspace preserves git history during the migration. This ensures past commits and code context remain intact when you consolidate projects into a monorepo.

What are the requirements for the destination directory when consolidating repos with nx import?▼

When consolidating repos with nx import, the destination directory must be completely empty. The target workspace should also follow standard Nx conventions, including the apps/libs layout and nx.json configuration.

How does nx import handle version differences during repository migration?▼

Nx import handles version differences during repository migration by accounting for post-22.6.0 .ndjson outputs and managing interactive prompts. This ensures compatibility across different Nx versions when merging codebases.

What is the best way to adopt Nx across multiple existing projects?▼

The best way to adopt Nx across multiple existing projects is to consolidate them into a unified workspace. Use nx import to merge repositories while following standard workspace setup practices for apps and libs.