auto-detects environment prefix