nx-import
Installation
SKILL.md
Quick Start
nx importbrings code from a source repository or folder into the current workspace, preserving commit history.- After nx
22.6.0,nx importresponds with .ndjson outputs and follow-up questions. For earlier versions, always run with--no-interactiveand specify all flags directly. - Run
nx import --helpfor available options. - Make sure the destination directory is empty before importing.
EXAMPLE: target has
libs/utilsandlibs/models; source haslibs/uiandlibs/data-access— you cannot importlibs/intolibs/directly. Import each source library individually.
Primary docs:
- https://nx.dev/docs/guides/adopting-nx/import-project
- https://nx.dev/docs/guides/adopting-nx/preserving-git-histories
Read the nx docs if you have the tools for it.
Import Strategy
Subdirectory-at-a-time (nx import <source> apps --source=apps):