इसे छोड़कर कंटेंट पर जाएं

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.


ScenarioWhy CLI?
IDE can’t find JVMRun galataj doctor
Headless serversNo IDE available
DockerManual attach
DebuggingCheck status, logs

Diagnose system issues. Run this first when something doesn’t work.

Terminal window
galataj doctor
✓ CLI: v1.0.0
✓ Java: Found (17.0.1)
✓ Controller: Found
✓ Agent: Found
✓ Controller: Running
✓ Ports: Available

Check what’s running.

Terminal window
galataj status
Controller: Running (PID: 12345)
HTTP Port: 9877
TCP Port: 9876
Attached JVMs: 1
- abc123 (PID: 67890) - MyApp

List available JVMs.

Terminal window
galataj jvms
Found 2 JVM(s):
1. com.example.MyApp
ID: abc123
PID: 12345
2. order-service
ID: def456
Environment: docker

Attach profiler to a JVM.

Terminal window
# By PID
galataj attach --pid 12345
# By JVM ID
galataj attach --jvm-id abc123

Stop profiling a JVM.

Terminal window
galataj detach --jvm-id abc123

Terminal window
# Start controller
galataj controller start
# Start with custom port
galataj controller start --port 8888
# Stop controller
galataj controller stop

Terminal window
# Check status
galataj license status
# Activate license
galataj license login YOUR-LICENSE-KEY
# Open purchase page
galataj license purchase
# Validate license
galataj license validate

Most commands support --json for scripting:

Terminal window
galataj jvms --json
galataj status --json
galataj license status --json
galataj doctor --json

CodeMeaning
0Success
1General error
2Controller not running
3JVM not found
4Attach failed
5License error