nrwl/nx-import

Importez, fusionnez ou combinez des dépôts dans un espace de travail Nx en utilisant nx import. À utiliser lorsque l'utilisateur demande d'adopter Nx sur plusieurs dépôts, de déplacer des projets dans un monorepo ou d'importer du code/historique depuis un autre dépôt.

Qu'est-ce que nx-import ?

Cette compétence permet d'importer, fusionner ou combiner des dépôts existants dans un espace de travail Nx via la commande `nx import`. Elle est conçue pour les développeurs qui souhaitent migrer plusieurs dépôts vers une architecture monorepo avec Nx, en conservant l'historique Git complet et en configurant automatiquement les projets importés. Idéale pour adopter Nx progressivement, elle prend en charge les dépôts locaux ou distants, et permet de spécifier le répertoire de destination et le nom du projet. La compétence s'appuie sur la commande `nx import` de Nx, qui nécessite que Nx soit installé dans le dépôt cible. Elle est particulièrement utile pour les équipes cherchant à centraliser leur code tout en gardant une traçabilité complète.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nrwl/nx-ai-agents-config/tree/main/skills/nx-import

Installed? Explore more Productivité et collaboration skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Que fait nx-import ?

Importez, fusionnez ou combinez des dépôts dans un espace de travail Nx en utilisant nx import. À utiliser lorsque l'utilisateur demande d'adopter Nx sur plusieurs dépôts, de déplacer des projets dans un monorepo ou d'importer du code/historique depuis un autre dépôt.

Utilisation

nx import <dépôt> [options]

Arguments

  • <dépôt> : Chemin ou URL du dépôt à importer (obligatoire).

Options

OptionDescription
--destinationRépertoire de destination pour l'import (défaut : libs/<dépôt>)
--project-nameNom du projet pour le dépôt importé (défaut : nom du dépôt)
--dry-runSimule l'import sans effectuer de modifications
--verboseAffiche des informations détaillées pendant l'import

Exemples

  1. Importer un dépôt distant :

    nx import https://github.com/utilisateur/depot.git
    
  2. Importer un dépôt local avec un nom de projet personnalisé :

    nx import ./chemin/vers/mon-depot --project-name mon-projet
    
  3. Simuler l'import d'un dépôt :

    nx import [email protected]:utilisateur/depot.git --dry-run
    

Prérequis

  • Nx doit être installé dans l'espace de travail cible.
  • Le dépôt source doit être accessible (local ou distant) avec l'historique Git.

Notes

  • L'import conserve l'historique Git complet du dépôt source.
  • Les fichiers du dépôt source sont placés dans un sous-répertoire de l'espace de travail Nx.
  • Les dépendances et configurations du projet importé peuvent nécessiter une mise à jour manuelle.

Liens

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

nrwl/link-workspace-packages

Link workspace packages in monorepos (npm, yarn, pnpm, bun). USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) user imports from a sibling package and needs to add it as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use the package manager's workspace commands to fix actual linking.

nrwl/monitor-ci

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access.

nrwl/nx-generate

Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a new app, create a new lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.

nrwl/nx-plugins

Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.

nrwl/nx-run-tasks

Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.

nrwl/nx-workspace

Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.

Skills associés