--- title: 'init - CLI command' description: 'Adds nx.json file and installs nx if not installed already' --- # init Adds nx.json file and installs nx if not installed already ## Usage ```bash nx init ``` [Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.