CLI Commands
Complete reference for all JAngular CLI commands and options. Copy and paste these commands to get started quickly.
jangular init
Syntax: jangular init <projectName>
Initialize a new Java + Angular project with the specified name. This command creates a complete full-stack project structure with Spring Boot backend and Angular frontend.
Options
-g, --group-id <groupId>
- Java group ID (default: com.example)-a, --artifact-id <artifactId>
- Java artifact ID (default: backend)
Examples
jangular docker
Syntax: jangular docker
Manage and monitor Docker services for your project. This command provides an interactive interface for managing containerized services including database, backend, and frontend containers.
Features
- Start and stop containers
- View service logs in real-time
- Check database health and connectivity
- Reset volumes and data
- Production mode deployment
Usage
jangular test
Syntax: jangular test [options]
Run tests for the generated project. By default, runs tests for both backend and frontend components.
Options
-b, --backend
- Test only the backend (Spring Boot tests)-f, --frontend
- Test only the frontend (Angular tests)-a, --all
- Test both backend and frontend (default)
Examples
jangular build
Syntax: jangular build [options]
Build the project for production. Creates optimized builds for deployment.
Options
-b, --backend
- Build only the backend-f, --frontend
- Build only the frontend-a, --all
- Build both backend and frontend (default)-p, --prod
- Build with production profile
Examples
jangular --test
Syntax: jangular --test
Run a system test check for JAngular CLI to verify all required dependencies and system requirements are properly installed.
Usage
Generated Project Scripts
After project initialization, the following npm scripts are available in the root package.json
:
Development Scripts
npm run start:backend
- Start the Spring Boot backend server on port 8080npm run start:frontend
- Start the Angular frontend development server on port 4200npm run install:all
- Install dependencies for both backend and frontend
Build Scripts
npm run build
- Build both backend and frontend for productionnpm run build:backend
- Build only the backendnpm run build:frontend
- Build only the frontend
Testing Scripts
npm run test
- Run tests for both backend and frontendnpm run test:backend
- Run only backend testsnpm run test:frontend
- Run only frontend tests
Development Tip: Use
npm run start:backend
andnpm run start:frontend
in separate terminals for the best development experience with hot reloading.
Quick Reference
Complete project setup workflow:
jangular init my-project
cd my-project
npm run install:all
npm run start:backend# Terminal 1: Spring Boot on :8080
npm run start:frontend# Terminal 2: Angular on :4200
jangular test# Run all tests
jangular build --prod# Production build
jangular docker# Docker management
jangular --test# Check system requirements
jangular --help# Show help information
🚀Pro Tips
- • Open two terminals for the best development experience
- • Backend runs on
http://localhost:8080
- • Frontend runs on
http://localhost:4200
- • Use
jangular docker
for containerized deployment - • Run
jangular --test
to verify system setup