A comprehensive CLI tool to automate Angular project initialization with intelligent version management and prerequisite handling
npm install ng-angular-setupbash
npm install -g ng-angular-setup
`
$3
`bash
npx ng-angular-setup
`
š Usage
$3
`bash
ng-angular-setup
`
or
`bash
ng-angular-setup create
`
This starts the interactive CLI that guides you through:
1. System environment check
2. Angular version selection
3. Node.js compatibility check and resolution
4. Project configuration
5. Template selection
6. Library search and installation
7. Additional features setup
8. Profile saving option
$3
`bash
ng-angular-setup check
`
Displays current versions of Node.js, npm, nvm, and Angular CLI.
$3
#### List all saved profiles
`bash
ng-angular-setup profile list
`
#### Show profile details
`bash
ng-angular-setup profile show
`
#### Delete a profile
`bash
ng-angular-setup profile delete
`
#### Export a profile
`bash
ng-angular-setup profile export
`
Example:
`bash
ng-angular-setup profile export my-enterprise-setup ./enterprise-profile.json
`
#### Import a profile
`bash
ng-angular-setup profile import
`
Example:
`bash
ng-angular-setup profile import ./enterprise-profile.json
`
$3
`bash
ng-angular-setup examples
`
šÆ Usage Examples
$3
1. Run ng-angular-setup
2. Select Angular version 17
3. Choose "Enterprise" template
4. Select "Interactive search" for libraries
5. Search and add additional packages
6. Enable Git initialization
7. Enable README generation
8. Save as profile for future use
$3
1. Run ng-angular-setup
2. Select "Yes" to use saved profile
3. Choose your saved profile
4. Confirm configuration
5. Project is created automatically
$3
1. Run ng-angular-setup
2. Select latest Angular version
3. Choose "PWA Ready" template
4. Select "Testing Bundle" from bundles
5. Enable ESLint + Prettier
6. Enable Husky hooks
7. Project created with complete testing setup
šļø Project Structure
`
ng-angular-setup/
āāā src/
ā āāā commands/ # CLI command handlers
ā āāā utils/ # Helper functions
ā ā āāā version-checker.js # Version detection and management
ā ā āāā compatibility.js # Compatibility checking
ā ā āāā npm-search.js # npm registry search
ā ā āāā installer.js # Package installation
ā ā āāā prompt-handler.js # Interactive prompts
ā ā āāā file-utils.js # File operations
ā ā āāā profile-manager.js # Profile management
ā āāā templates/ # Project templates
ā ā āāā templates.js # Template definitions
ā āāā index.js # CLI entry point
ā āāā runner.js # Main CLI flow
āāā package.json
āāā README.md
`
š§ Configuration
$3
The CLI includes several pre-configured templates:
- basic: Minimal Angular setup with routing
- enterprise: Complete setup with NgRx, Material, ESLint
- pwa: Progressive Web App ready
- material: Angular Material UI components
- testing: Jest and Testing Library setup
- standalone: Modern standalone components
$3
Pre-configured library combinations for common use cases:
- uiFramework: Angular Material suite
- stateManagement: NgRx complete setup
- forms: Form utilities and validators
- testing: Complete testing stack
- performance: Optimization tools
- authentication: Auth integration
- utilities: Common utility libraries
- http: HTTP and API tools
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature`)