CLI Setup

This guide will help you setup project using @ngm-dev/cli. This is the recommended way to setup your project.

## Initializing @ngm-dev/cli Once you have your Angular workspace with at-least one application created, you can initialize `@ngm-dev/cli` in your project by running: ```bash npx @ngm-dev/cli init ``` Above command will do the following: - Setup `ngm-dev-cli.json` file in your project. This file contains the configuration for `@ngm-dev/cli`. - Creates `postcssrc.json` - Installs `tailwindcss` and `@angular/material` - Adds needed styles in `angular.json` - Configures Material Symbols > If for some reason CLI fails to complete above steps, you can follow manual setup, go to [Manual Setup](/docs/manual-setup) page. ## Adding blocks to your project Once you have `@ngm-dev/cli` initialized in your project, you can add blocks to your project by running: ```bash npx @ngm-dev/cli add [block-name] ``` Example: ```bash npx @ngm-dev/cli add free-authentication/login-email-password ``` You can find name of the blocks in the block preview section.
### Getting tokens To use `@ngm-dev/cli` with premium blocks, you will need to [get the access](/home#pricing) and then create a token. You can get the token by clicking on "API Tokens" in the profile dropdown or by clicking [here](/account/tokens).
### Setting token Once you have the token, you can set it by running: ```bash npx @ngm-dev/cli auth ``` This will ask for username (email) and token. ## Updating blocks in your project Once you have `@ngm-dev/cli` initialized in your project, you can update blocks in your project by running: ```bash npx @ngm-dev/cli update ``` ## Reporting issues If you have any issues, please report them to [GitHub Issues](https://github.com/Angular-Material-Dev/community/issues).
Previous
Getting Started
Next
Manual Setup
Angular Material Blocks Logo

Angular Material Dev UI (or Angular Material Blocks) is one place stop for developers to explore components and blocks for their Angular Material and Tailwind CSS based applications.

Find us on X (Twitter), LinkedIn, Instagram & Threads