nx/docs/generated/cli/import.md
Isaac Mann 520706b10b
feat(nx-dev): show arg aliases (#29653)
List aliases of command arguments
2025-01-16 17:13:02 -05:00

31 lines
1.8 KiB
Markdown

---
title: 'import - CLI command'
description: 'Import code and git history from another repository into this repository.'
---
# import
Import code and git history from another repository into this repository.
## Usage
```shell
nx import [sourceRepository] [destinationDirectory]
```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ----------------------------------------- | ------- | --------------------------------------------------------------------------- |
| `--depth` | number | The depth to clone the source repository (limit this for faster git clone). |
| `--destinationDirectory`, `--destination` | string | The directory in the current workspace to import into. |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | Interactive mode. (Default: `true`) |
| `--ref` | string | The branch from the source repository to import. |
| `--sourceDirectory`, `--source` | string | The directory in the source repository to import from. |
| `--sourceRepository` | string | The remote URL of the source to import. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |