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