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
Section titled “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
Section titled “Essential Commands”galataj doctor
Section titled “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
Section titled “galataj status”Check what’s running.
galataj statusController: Running (PID: 12345)HTTP Port: 9877TCP Port: 9876
Attached JVMs: 1- abc123 (PID: 67890) - MyAppgalataj jvms
Section titled “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
Section titled “galataj attach”Attach profiler to a JVM.
# By PIDgalataj attach --pid 12345
# By JVM IDgalataj attach --jvm-id abc123galataj detach
Section titled “galataj detach”Stop profiling a JVM.
galataj detach --jvm-id abc123Controller Management
Section titled “Controller Management”# Start controllergalataj controller start
# Start with custom portgalataj controller start --port 8888
# Stop controllergalataj controller stopLicense Commands
Section titled “License Commands”# Check statusgalataj license status
# Activate licensegalataj license login YOUR-LICENSE-KEY
# Open purchase pagegalataj license purchase
# Validate licensegalataj license validateJSON Output
Section titled “JSON Output”Most commands support --json for scripting:
galataj jvms --jsongalataj status --jsongalataj license status --jsongalataj doctor --jsonExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Controller not running |
| 3 | JVM not found |
| 4 | Attach failed |
| 5 | License error |