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 init my-enterprise-app
jangular init my-app -g com.company -a my-backend

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 docker

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 test
jangular test --backend
jangular test --frontend

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 build
jangular build --backend --prod
jangular build --frontend

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

jangular --test

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 8080
  • npm run start:frontend - Start the Angular frontend development server on port 4200
  • npm run install:all - Install dependencies for both backend and frontend

Build Scripts

  • npm run build - Build both backend and frontend for production
  • npm run build:backend - Build only the backend
  • npm run build:frontend - Build only the frontend

Testing Scripts

  • npm run test - Run tests for both backend and frontend
  • npm run test:backend - Run only backend tests
  • npm run test:frontend - Run only frontend tests

Development Tip: Use npm run start:backend and npm run start:frontend in separate terminals for the best development experience with hot reloading.


Quick Reference

Complete project setup workflow:

# Create new project
jangular init my-project
# Enter project directory
cd my-project
# Install all dependencies
npm run install:all
# Start development servers (in separate terminals)
npm run start:backend# Terminal 1: Spring Boot on :8080
npm run start:frontend# Terminal 2: Angular on :4200
# Testing and building
jangular test# Run all tests
jangular build --prod# Production build
jangular docker# Docker management
# System verification
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