CLI Reference
For Advanced Users
Most users never need the CLI. The IDE plugin handles everything automatically. This reference is for automation, scripting, and troubleshooting scenarios.
When to Use CLI
Seção intitulada “When to Use CLI”| Scenario | Why CLI? |
|---|---|
| IDE can’t find JVM | Run galataj doctor |
| Headless servers | No IDE available |
| Docker | Manual attach |
| Debugging | Check status, logs |
Essential Commands
Seção intitulada “Essential Commands”galataj doctor
Seção intitulada “galataj doctor”Diagnose system issues. Run this first when something doesn’t work.
galataj doctor✓ CLI: v1.0.0✓ Java: Found (17.0.1)✓ Controller: Found✓ Agent: Found✓ Controller: Running✓ Ports: Availablegalataj status
Seção intitulada “galataj status”Check what’s running.
galataj statusController: Running (PID: 12345)HTTP Port: 9877TCP Port: 9876
Attached JVMs: 1- abc123 (PID: 67890) - MyAppgalataj jvms
Seção intitulada “galataj jvms”List available JVMs.
galataj jvmsFound 2 JVM(s):
1. com.example.MyApp ID: abc123 PID: 12345
2. order-service ID: def456 Environment: dockergalataj attach
Seção intitulada “galataj attach”Attach profiler to a JVM.
# By PIDgalataj attach --pid 12345
# By JVM IDgalataj attach --jvm-id abc123galataj detach
Seção intitulada “galataj detach”Stop profiling a JVM.
galataj detach --jvm-id abc123Controller Management
Seção intitulada “Controller Management”# Start controllergalataj controller start
# Start with custom portgalataj controller start --port 8888
# Stop controllergalataj controller stopLicense Commands
Seção intitulada “License Commands”# Check statusgalataj license status
# Activate licensegalataj license login YOUR-LICENSE-KEY
# Open purchase pagegalataj license purchase
# Validate licensegalataj license validateJSON Output
Seção intitulada “JSON Output”Most commands support --json for scripting:
galataj jvms --jsongalataj status --jsongalataj license status --jsongalataj doctor --jsonExit Codes
Seção intitulada “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Controller not running |
| 3 | JVM not found |
| 4 | Attach failed |
| 5 | License error |